]> www.infradead.org Git - users/jedix/linux-maple.git/commit
locking/mutex: Make mutex::wait_lock irq safe
authorJuri Lelli <juri.lelli@redhat.com>
Wed, 9 Oct 2024 23:53:35 +0000 (16:53 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 14 Oct 2024 10:52:40 +0000 (12:52 +0200)
commit5ec58525a1f1bd6ca8ea778e9df55cd82bc02e11
treed2424f880f5053612b769298c7f2bcd3f9d66442
parent894d1b3db41cf7e6ae0304429a1747b3c3f390bc
locking/mutex: Make mutex::wait_lock irq safe

With the proxy-execution series, we traverse the task->mutex->task
blocked_on/owner chain in the scheduler core. We do this while holding
the rq::lock to keep the structures in place while taking and
releasing the alternating lock types.

Since the mutex::wait_lock is one of the locks we will take in this
way under the rq::lock in the scheduler core, we need to make sure
that its usage elsewhere is irq safe.

[rebase & fix {un,}lock_wait_lock helpers in ww_mutex.h]
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Connor O'Brien <connoro@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Metin Kaya <metin.kaya@arm.com>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: Metin Kaya <metin.kaya@arm.com>
Link: https://lore.kernel.org/r/20241009235352.1614323-3-jstultz@google.com
kernel/locking/mutex.c
kernel/locking/ww_mutex.h