Centos-kernel-stream-9/kernel/locking
Čestmír Kalina 9361f76aa8 rtmutex: Drop rt_mutex::wait_lock before scheduling
JIRA: https://issues.redhat.com/browse/RHEL-60306

commit d33d26036a0274b472299d7dcdaa5fb34329f91b
Author: Roland Xu <mu001999@outlook.com>
Date: Thu, 15 Aug 2024 10:58:13 +0800

    rt_mutex_handle_deadlock() is called with rt_mutex::wait_lock held.  In the
    good case it returns with the lock held and in the deadlock case it emits a
    warning and goes into an endless scheduling loop with the lock held, which
    triggers the 'scheduling in atomic' warning.

    Unlock rt_mutex::wait_lock in the dead lock case before issuing the warning
    and dropping into the schedule for ever loop.

    [ tglx: Moved unlock before the WARN(), removed the pointless comment,
      	massaged changelog, added Fixes tag ]

    Fixes: 3d5c9340d1 ("rtmutex: Handle deadlock detection smarter")
    Signed-off-by: Roland Xu <mu001999@outlook.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/all/ME0P300MB063599BEF0743B8FA339C2CECC802@ME0P300MB0635.AUSP300.PROD.OUTLOOK.COM

Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
2024-12-18 17:06:50 +01:00
..
Makefile
irqflag-debug.c
lock_events.c locking/debug: Fix debugfs API return value checks to use IS_ERR() 2024-05-22 19:52:14 -04:00
lock_events.h locking/qspinlock: Always evaluate lockevent* non-event parameter once 2024-12-16 22:02:24 +01:00
lock_events_list.h
lockdep.c lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT 2024-12-18 17:06:50 +01:00
lockdep_internals.h
lockdep_proc.c locking/lockdep: Fix string sizing bug that triggers a format-truncation compiler-warning 2024-05-22 19:52:14 -04:00
lockdep_states.h
locktorture.c locktorture: Add MODULE_DESCRIPTION() 2024-12-16 22:02:25 +01:00
mcs_spinlock.h
mutex-debug.c locking/mutex: Introduce devm_mutex_init() 2024-12-13 11:26:39 -03:00
mutex.c locking/mutex: Document that mutex_unlock() is non-atomic 2024-05-22 19:52:16 -04:00
mutex.h
osq_lock.c locking/osq_lock: Clarify osq_wait_next() 2024-05-22 19:52:16 -04:00
percpu-rwsem.c locking/percpu-rwsem: Trigger contention tracepoints only if contended 2024-12-16 22:02:24 +01:00
qrwlock.c
qspinlock.c locking/qspinlock: Use atomic_try_cmpxchg_relaxed() in xchg_tail() 2024-12-16 22:02:25 +01:00
qspinlock_paravirt.h locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node() 2024-12-18 17:06:50 +01:00
qspinlock_stat.h
rtmutex.c rtmutex: Drop rt_mutex::wait_lock before scheduling 2024-12-18 17:06:50 +01:00
rtmutex_api.c locking/rtmutex: Fix task->pi_waiters integrity 2024-01-15 10:10:43 -05:00
rtmutex_common.h locking/rtmutex: Fix task->pi_waiters integrity 2024-01-15 10:10:43 -05:00
rwbase_rt.c locking/rtmutex: Add a lockdep assert to catch potential nested blocking 2024-03-27 10:06:01 -04:00
rwsem.c locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers 2024-12-16 22:02:26 +01:00
semaphore.c
spinlock.c locking/local_lock: Add local nested BH locking infrastructure. 2024-10-08 11:35:35 +02:00
spinlock_debug.c
spinlock_rt.c locking/rtmutex: Add a lockdep assert to catch potential nested blocking 2024-03-27 10:06:01 -04:00
test-ww_mutex.c locking/ww_mutex/test: Make sure we bail out instead of livelock 2024-05-22 19:52:14 -04:00
ww_mutex.h locking/rtmutex: Fix task->pi_waiters integrity 2024-01-15 10:10:43 -05:00
ww_rt_mutex.c locking/rtmutex: Avoid unconditional slowpath for DEBUG_RT_MUTEXES 2024-03-27 10:05:57 -04:00