asCa missing locking
Bug #1815999 reported by
mdavidsaver
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
New
|
Low
|
Unassigned |
Bug Description
I noticed that there is a distinct lack of any locking in asCa.c to guard access to the global 'pasbase' and all the tree accessible through it. A half hearted attempt is made with 'caInitializing'.
To post a comment you must log in.
I do see a lock being taken and released in asCaStart() and asCaStop() around the signal/wait for asCaTask() to do its thing. This isn't easy to follow and certainly not how I would have written it, but in conjunction with the RCU-like approach to modifying the volatile ASBASE *pasbase in asLibRoutines.c and the LOCK/UNLOCK pair in asInitialize() I suspect there is enough here to prevent races.
No objections to it being rewritten, but I don't see it as a priority.