]> Git Repo - linux.git/commit
locking/rwsem: Fix down_write_killable()
authorPeter Zijlstra <[email protected]>
Thu, 12 May 2016 11:57:45 +0000 (13:57 +0200)
committerIngo Molnar <[email protected]>
Sun, 15 May 2016 20:55:00 +0000 (22:55 +0200)
commit04cafed7fc19a8010771c788708ac97c405fc3de
treed1e92439bc057cbb202fdf1138be1c4f2d3d0156
parent00fb16e26ac8559e69c3bb14284f4a548d28ee0d
locking/rwsem: Fix down_write_killable()

The new signal_pending exit path in __rwsem_down_write_failed_common()
was fingered as breaking his kernel by Tetsuo Handa.

Upon inspection it was found that there are two things wrong with it;

 - it forgets to remove WAITING_BIAS if it leaves the list empty, or
 - it forgets to wake further waiters that were blocked on the now
   removed waiter.

Especially the first issue causes new lock attempts to block and stall
indefinitely, as the code assumes that pending waiters mean there is
an owner that will wake when it releases the lock.

Reported-by: Tetsuo Handa <[email protected]>
Tested-by: Tetsuo Handa <[email protected]>
Tested-by: Michal Hocko <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Vince Weaver <[email protected]>
Cc: Waiman Long <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/locking/rwsem-xadd.c
This page took 0.054835 seconds and 4 git commands to generate.