futex: Drop refcount if requeue_pi() acquired the rtmutex
authorThomas Gleixner <tglx@linutronix.de>
Sat, 19 Dec 2015 20:07:38 +0000 (20:07 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 13 Feb 2016 10:34:05 +0000 (10:34 +0000)
commit58467344684846506b9d95d32a2af7b818b4a885
treedc2161a57c093b5ff35e5e742e040642cda90cb6
parent27d5e195aa0e49927dc65213be3d2ab69d21f797
futex: Drop refcount if requeue_pi() acquired the rtmutex

commit fb75a4282d0d9a3c7c44d940582c2d226cf3acfb upstream.

If the proxy lock in the requeue loop acquires the rtmutex for a
waiter then it acquired also refcount on the pi_state related to the
futex, but the waiter side does not drop the reference count.

Add the missing free_pi_state() call.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <darren@dvhart.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Bhuvanesh_Surachari@mentor.com
Cc: Andy Lowe <Andy_Lowe@mentor.com>
Link: http://lkml.kernel.org/r/20151219200607.178132067@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/futex.c