]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] rt-mutex: Fix stale return value
authorThomas Gleixner <tglx@linutronix.de>
Fri, 8 Jun 2007 10:29:28 +0000 (10:29 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Aug 2007 08:02:25 +0000 (10:02 +0200)
commitb3b66101b6dda551a35f98c048951ba9842250fa
treedfef0f9b60cdfe4612da93cf3f7fffc4515edd82
parent61540c3cf703e55fddb9ed6b9bf032b5c4d61813
[PATCH] rt-mutex: Fix stale return value

Alexey Kuznetsov found some problems in the pi-futex code.

The major problem is a stale return value in rt_mutex_slowlock():

When the pi chain walk returns -EDEADLK, but the waiter was woken up
during the phases where the locks were dropped, the rtmutex could be
acquired, but due to the stale return value -EDEADLK returned to the
caller.

Reset the return value in the woken up path.

Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/rtmutex.c