Commit 803bd62
committed
signal: serialize signalfd mask update against signal-dispatch read
set_mask() wrote _mask without any lock, while the signal-dispatch path reads
it via watches() while holding registry_lock. A concurrent signalfd() mask
update racing a signal delivery could read a torn/stale sigset_t and mis-route
a single signal. Take registry_lock in set_mask() so the update is serialized
against the dispatch-time reads (matching the lock the read side already holds).1 parent e18263d commit 803bd62
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
0 commit comments