futex: Always cleanup owner tid in unlock_pi
authorThomas Gleixner <tglx@linutronix.de>
Tue, 3 Jun 2014 12:27:07 +0000 (12:27 +0000)
committersungmin ha <sungmin82.ha@samsung.com>
Wed, 18 Mar 2015 04:59:07 +0000 (13:59 +0900)
commite2bca799c8dacde24afdc972ca584dab3f193281
treec8b9f652517accba147563363e7d9b894eec0cee
parentf6742d435161411548913d571e6b791d10963583
futex: Always cleanup owner tid in unlock_pi

If the owner died bit is set at futex_unlock_pi, we currently do not
cleanup the user space futex.  So the owner TID of the current owner
(the unlocker) persists.  That's observable inconsistant state,
especially when the ownership of the pi state got transferred.

Clean it up unconditionally.

Change-Id: I307738524ed76726d03f0579891f509cb4e6fb10
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Will Drewry <wad@chromium.org>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/futex.c