]>
Commit | Line | Data |
---|---|---|
bb1e2a50 GKH |
1 | From f27071cb7fe3e1d37a9dbe6c0dfc5395cd40fa43 Mon Sep 17 00:00:00 2001 |
2 | From: Darren Hart <dvhart@linux.intel.com> | |
3 | Date: Fri, 20 Jul 2012 11:53:30 -0700 | |
4 | Subject: futex: Fix bug in WARN_ON for NULL q.pi_state | |
5 | ||
6 | From: Darren Hart <dvhart@linux.intel.com> | |
7 | ||
8 | commit f27071cb7fe3e1d37a9dbe6c0dfc5395cd40fa43 upstream. | |
9 | ||
10 | The WARN_ON in futex_wait_requeue_pi() for a NULL q.pi_state was testing | |
11 | the address (&q.pi_state) of the pointer instead of the value | |
12 | (q.pi_state) of the pointer. Correct it accordingly. | |
13 | ||
14 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> | |
15 | Cc: Dave Jones <davej@redhat.com> | |
16 | Link: http://lkml.kernel.org/r/1c85d97f6e5f79ec389a4ead3e367363c74bd09a.1342809673.git.dvhart@linux.intel.com | |
17 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | |
18 | Signed-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); |