aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2021-11-25 13:07:11 +0100
committerChristian Brauner <[email protected]>2021-11-26 12:09:09 +0100
commit0f8821da48458982cf379eb4432f23958f2e3a6c (patch)
tree95089eb557bdf7a7e67a1396819052d074ae1ec5 /net/lapb/lapb_subr.c
parent136057256686de39cc3a07c2e39ef6bc43003ff6 (diff)
fs/namespace: Boost the mount_lock.lock owner instead of spinning on PREEMPT_RT.
The MNT_WRITE_HOLD flag is used to hold back any new writers while the mount point is about to be made read-only. __mnt_want_write() then loops with disabled preemption until this flag disappears. Callers of mnt_hold_writers() (which sets the flag) hold the spinlock_t of mount_lock (seqlock_t) which disables preemption on !PREEMPT_RT and ensures the task is not scheduled away so that the spinning side spins for a long time. On PREEMPT_RT the spinlock_t does not disable preemption and so it is possible that the task setting MNT_WRITE_HOLD is preempted by task with higher priority which then spins infinitely waiting for MNT_WRITE_HOLD to get removed. Acquire mount_lock::lock which is held by setter of MNT_WRITE_HOLD. This will PI-boost the owner and wait until the lock is dropped and which means that MNT_WRITE_HOLD is cleared again. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Acked-by: Christian Brauner <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions