2005-12-07 19:15:34

by Dinakar Guniguntala

[permalink] [raw]
Subject: [PATCH] Fix timeout in robust path

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 <[email protected]>


Attachments:
(No filename) (1.62 kB)
rt22-timeout.patch (465.00 B)
Download all attachments

2005-12-11 13:52:05

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] Fix timeout in robust path


* Dinakar Guniguntala <[email protected]> wrote:

> Hi Ingo,
>
> I hit the following BUG when exercising the robust futex path

thanks - i picked your fix up via David's patch-2.6.14-rt22-rf11.

Ingo