]> git.baikalelectronics.ru Git - kernel.git/commit
asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()
authorRomain Perier <romain.perier@free-electrons.com>
Thu, 14 Apr 2016 13:36:03 +0000 (15:36 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 21 Apr 2016 09:06:09 +0000 (11:06 +0200)
commit427f64fb29f3ad71feb76803df53dc8203e177a2
tree7204cd2e2e821bde02b0279fd610b7139e82d51d
parent75448f31c117ee8b3c0824bd09b6489653c0cbbf
asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()

The recent decoupling of pagefault disable and preempt disable added an
explicit preempt_disable/enable() pair to the futex_atomic_cmpxchg_inatomic()
implementation in asm-generic/futex.h. But it forgot to add preempt_enable()
calls to the error handling code pathes, which results in a preemption count
imbalance.

This is observable on boot when the test for atomic_cmpxchg() is calling
futex_atomic_cmpxchg_inatomic() on a NULL pointer.

Add the missing preempt_enable() calls to the error handling code pathes.

[ tglx: Massaged changelog ]

Fixes: 8ecefdfb78c0 ("sched/preempt, futex: Disable preemption in UP futex_atomic_cmpxchg_inatomic() explicitly")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Cc: linux-arch@vger.kernel.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1460640963-690-1-git-send-email-romain.perier@free-electrons.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-generic/futex.h