public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix timeout in robust path
@ 2005-12-07 19:34 Dinakar Guniguntala
  2005-12-11 13:51 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Dinakar Guniguntala @ 2005-12-07 19:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, David Singleton

[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]

Hi Ingo,

I hit the following BUG when exercising the robust futex path

testpi-1/4920[CPU#0]: BUG in FREE_WAITER at kernel/rt.c:1368
 [<c011f180>] __WARN_ON+0x60/0x80 (8)
 [<c03f6581>] __down_mutex+0x601/0x844 (48)
 [<c013813a>] pi_setprio+0xa1/0x632 (104)
 [<c0127386>] lock_timer_base+0x19/0x33 (8)
 [<c03f884d>] _spin_lock_irqsave+0x1d/0x46 (12)
 [<c0127386>] lock_timer_base+0x19/0x33 (8)
 [<c0127386>] lock_timer_base+0x19/0x33 (16)
 [<c01273d8>] __mod_timer+0x38/0xdf (16)
 [<c013fb9b>] sub_preempt_count+0x1a/0x1e (12)
 [<c03f81e1>] __down_interruptible+0x922/0xaf7 (20)
 [<c01411f5>] futex_wait_robust+0x14c/0x216 (16)
 [<c01394e8>] process_timeout+0x0/0x9 (48)
 [<c01411f5>] futex_wait_robust+0x14c/0x216 (64)
 [<c013d042>] down_futex+0x7d/0xe2 (12)
 [<c01411f5>] futex_wait_robust+0x14c/0x216 (12)
 [<c013d066>] down_futex+0xa1/0xe2 (8)
 [<c01411f5>] futex_wait_robust+0x14c/0x216 (12)
 [<c01411f5>] futex_wait_robust+0x14c/0x216 (24)
 [<c01419de>] do_futex+0x92/0xf8 (72)
 [<c0141b3c>] sys_futex+0xf8/0x104 (40)
 [<c0103017>] sysenter_past_esp+0x54/0x75 (60)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c013fb00>] .... add_preempt_count+0x1a/0x1e
.....[<00000000>] ..   ( <= stext+0x3feffd68/0x8)

------------------------------
| showing all locks held by: |  (testpi-1/4920 [f6326120,  59]):
------------------------------

When calling futex_wait_robust, we need to ensure that the timeout
is reset to zero, incase userspace timeout is NULL.
Please consider applying

        -Dinakar

Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com>


[-- Attachment #2: rt22-timeout.patch --]
[-- Type: text/plain, Size: 465 bytes --]

Index: linux-2.6.14/kernel/futex.c
===================================================================
--- linux-2.6.14.orig/kernel/futex.c	2005-12-08 00:31:29.000000000 +0530
+++ linux-2.6.14/kernel/futex.c	2005-12-08 00:33:01.000000000 +0530
@@ -1535,6 +1535,8 @@
 			return -EFAULT;
 		timeout = timespec_to_jiffies(&t) + 1;
 	}
+	if (op == FUTEX_WAIT_ROBUST && utime == NULL)
+		timeout = 0;
 	/*
 	 * requeue parameter in 'utime' if op == FUTEX_REQUEUE.
 	 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-11 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-07 19:34 [PATCH] Fix timeout in robust path Dinakar Guniguntala
2005-12-11 13:51 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox