Skip to content
Commit 45e3d5a2 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Linus Torvalds
Browse files

lib/test_lockup.c: minimum fix to get it compiled on PREEMPT_RT

On PREEMPT_RT the locks are quite different so they can't be tested as it
is done below.  The alternative is to test for the waitlock within
rtmutex.

This is the bare minimun to get it compiled.  Problems which exist on
PREEMP_RT:

 - none of the locks (spinlock_t, rwlock_t, mutex_t, rw_semaphore) may
   be acquired with disabled preemption or interrupts.

   If I read the code correct the it is possible to acquire a mutex_t
   with disabled interrupts.

   I don't know how to obtain a lock pointer. Technically they are not
   exported to userland.

 - memory can not be allocated with disabled preemption or interrupts
   even with GFP_ATOMIC.

Link: https://lkml.kernel.org/r/20201028181041.xyeothhkouc3p4md@linutronix.de


Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 180644f8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment