Skip to content

locking/rtmutex: Cure two subtle bugs

Thomas Gleixner lkml 1 version Applied

Status from this message: The following commit has been merged into the locking/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2locking/rtmutex: Dont dereference waiter locklesskernel/locking/rtmutex.c kernel/locking/rtmutex_common.h+16 -20 replies
2/2locking/rtmutex: Dequeue waiter on ww_mutex deadlockkernel/locking/rtmutex.c+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/2] locking/rtmutex: Cure two subtle bugs

The recent updates to rtmutex introduced two subtle bugs:

1) The spinwait mechanism added a UAF which triggers a BUG_ON()

2) The ww_mutex addition leaves a waiter queued in the error exit path resulting in rb tree corruption

The fixes are straight forward, but the rtmutex based ww_mutex implementation still has some more rough egdes which need to be ironed out.

Thanks,

tglx

---
 rtmutex.c        |   12 +++++++++---
 rtmutex_common.h |   13 +++++++++++++
 2 files changed, 22 insertions(+), 3 deletions(-)