Is there an existing issue for this?
Current Behavior
The present ordering of TplMutex acquire is:
set atomic lock = true
<preemption window>
raise TPL_NOTIFY
and release is:
restore previous/lower TPL
<queued callbacks may run here>
set atomic lock = false
This means that there is a window where event handlers running at a callback equal to the lock level (which would normally be prevented by the TPL raise can observe the Mutex as Locked (due to the atomic). This could lead to re-entrancy/deadlock.
Expected Behavior
It should not be possible for a callback at or below the TplMutex lock level to observe the Mutex as locked().
Steps To Reproduce
By inspection.
Build Environment
- OS(s):
- Targets Impacted:
N/A
Version Information
Commit: 517de6ea31857538d65c2fedf39d24fa1fb2b1ba
Urgency
Medium
Are you going to fix this?
I will fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response
Is there an existing issue for this?
Current Behavior
The present ordering of TplMutex acquire is:
and release is:
This means that there is a window where event handlers running at a callback equal to the lock level (which would normally be prevented by the TPL raise can observe the Mutex as Locked (due to the atomic). This could lead to re-entrancy/deadlock.
Expected Behavior
It should not be possible for a callback at or below the TplMutex lock level to observe the Mutex as locked().
Steps To Reproduce
By inspection.
Build Environment
Version Information
Urgency
Medium
Are you going to fix this?
I will fix it
Do you need maintainer feedback?
Maintainer feedback requested
Anything else?
No response