]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.5.1/futex-fix-bug-in-warn_on-for-null-q.pi_state.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.5.1 / futex-fix-bug-in-warn_on-for-null-q.pi_state.patch
CommitLineData
bb1e2a50
GKH
1From f27071cb7fe3e1d37a9dbe6c0dfc5395cd40fa43 Mon Sep 17 00:00:00 2001
2From: Darren Hart <dvhart@linux.intel.com>
3Date: Fri, 20 Jul 2012 11:53:30 -0700
4Subject: futex: Fix bug in WARN_ON for NULL q.pi_state
5
6From: Darren Hart <dvhart@linux.intel.com>
7
8commit f27071cb7fe3e1d37a9dbe6c0dfc5395cd40fa43 upstream.
9
10The WARN_ON in futex_wait_requeue_pi() for a NULL q.pi_state was testing
11the address (&q.pi_state) of the pointer instead of the value
12(q.pi_state) of the pointer. Correct it accordingly.
13
14Signed-off-by: Darren Hart <dvhart@linux.intel.com>
15Cc: Dave Jones <davej@redhat.com>
16Link: http://lkml.kernel.org/r/1c85d97f6e5f79ec389a4ead3e367363c74bd09a.1342809673.git.dvhart@linux.intel.com
17Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20---
21 kernel/futex.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24--- a/kernel/futex.c
25+++ b/kernel/futex.c
26@@ -2343,7 +2343,7 @@ static int futex_wait_requeue_pi(u32 __u
27 * signal. futex_unlock_pi() will not destroy the lock_ptr nor
28 * the pi_state.
29 */
30- WARN_ON(!&q.pi_state);
31+ WARN_ON(!q.pi_state);
32 pi_mutex = &q.pi_state->pi_mutex;
33 ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1);
34 debug_rt_mutex_free_waiter(&rt_waiter);