* WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92()
@ 2011-12-26 9:46 Sasha Levin
2011-12-27 17:35 ` [PATCH block/for-3.3/core] block: remove WARN_ON_ONCE() in exit_io_context() Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2011-12-26 9:46 UTC (permalink / raw)
To: tj, Jens Axboe; +Cc: linux-kernel
Hi,
Commit 6e736be7 ("block: make ioc get/put interface more conventional
and fix race on alloction") added a warning to exit_io_context() which
is triggered by failed clone() syscall.
Here is the warning;
[ 294.417656] ------------[ cut here ]------------
[ 294.418897] WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92()
[ 294.420538] Pid: 17090, comm: trinity Not tainted 3.2.0-rc6-next-20111222-sasha-dirty #77
[ 294.422231] Call Trace:
[ 294.422701] [<ffffffff8181a7a2>] ? exit_io_context+0x40/0x92
[ 294.423842] [<ffffffff8181a7a2>] ? exit_io_context+0x40/0x92
[ 294.424919] [<ffffffff810b69a3>] warn_slowpath_common+0x8f/0xb2
[ 294.426036] [<ffffffff810b6a77>] warn_slowpath_null+0x18/0x1a
[ 294.427114] [<ffffffff8181a7a2>] exit_io_context+0x40/0x92
[ 294.428121] [<ffffffff810b58c9>] copy_process+0x126f/0x1453
[ 294.429131] [<ffffffff810891f6>] ? do_page_fault+0x48a/0x4a4
[ 294.430162] [<ffffffff810b5c1b>] do_fork+0x120/0x3e9
[ 294.431160] [<ffffffff82421b57>] ? mutex_unlock+0x9/0xb
[ 294.432150] [<ffffffff8110f999>] ? lock_release_holdtime+0xc6/0xd4
[ 294.433296] [<ffffffff82424bdd>] ? retint_swapgs+0x13/0x1b
[ 294.434336] [<ffffffff8106242f>] sys_clone+0x26/0x28
[ 294.435277] [<ffffffff82425803>] stub_clone+0x13/0x20
[ 294.436230] [<ffffffff82425479>] ? system_call_fastpath+0x16/0x1b
[ 294.437381] ---[ end trace a2e4eb670b375238 ]---
--
Sasha.
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH block/for-3.3/core] block: remove WARN_ON_ONCE() in exit_io_context()
2011-12-26 9:46 WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92() Sasha Levin
@ 2011-12-27 17:35 ` Tejun Heo
2011-12-27 17:53 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2011-12-27 17:35 UTC (permalink / raw)
To: Jens Axboe; +Cc: Sasha Levin, linux-kernel
6e736be7 "block: make ioc get/put interface more conventional and fix
race on alloction" added WARN_ON_ONCE() in exit_io_context() which
triggers if !PF_EXITING. All tasks hitting exit_io_context() from
task exit should have PF_EXITING set but task struct tearing down
after fork failure calls into the function without PF_EXITING,
triggering the condition.
WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92()
Pid: 17090, comm: trinity Not tainted 3.2.0-rc6-next-20111222-sasha-dirty #77
Call Trace:
[<ffffffff810b69a3>] warn_slowpath_common+0x8f/0xb2
[<ffffffff810b6a77>] warn_slowpath_null+0x18/0x1a
[<ffffffff8181a7a2>] exit_io_context+0x40/0x92
[<ffffffff810b58c9>] copy_process+0x126f/0x1453
[<ffffffff810b5c1b>] do_fork+0x120/0x3e9
[<ffffffff8106242f>] sys_clone+0x26/0x28
[<ffffffff82425803>] stub_clone+0x13/0x20
---[ end trace a2e4eb670b375238 ]---
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
Heh, sorry about that. Forgot about fork failure path. Just removing
the WARN_ON_ONCE() should be enough. Thanks for reporting the problem.
block/blk-ioc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 33fae7d..27a06e0 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -230,9 +230,6 @@ void exit_io_context(struct task_struct *task)
{
struct io_context *ioc;
- /* PF_EXITING prevents new io_context from being attached to @task */
- WARN_ON_ONCE(!(current->flags & PF_EXITING));
-
task_lock(task);
ioc = task->io_context;
task->io_context = NULL;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH block/for-3.3/core] block: remove WARN_ON_ONCE() in exit_io_context()
2011-12-27 17:35 ` [PATCH block/for-3.3/core] block: remove WARN_ON_ONCE() in exit_io_context() Tejun Heo
@ 2011-12-27 17:53 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2011-12-27 17:53 UTC (permalink / raw)
To: Tejun Heo; +Cc: Sasha Levin, linux-kernel
On 2011-12-27 18:35, Tejun Heo wrote:
> 6e736be7 "block: make ioc get/put interface more conventional and fix
> race on alloction" added WARN_ON_ONCE() in exit_io_context() which
> triggers if !PF_EXITING. All tasks hitting exit_io_context() from
> task exit should have PF_EXITING set but task struct tearing down
> after fork failure calls into the function without PF_EXITING,
> triggering the condition.
>
> WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92()
> Pid: 17090, comm: trinity Not tainted 3.2.0-rc6-next-20111222-sasha-dirty #77
> Call Trace:
> [<ffffffff810b69a3>] warn_slowpath_common+0x8f/0xb2
> [<ffffffff810b6a77>] warn_slowpath_null+0x18/0x1a
> [<ffffffff8181a7a2>] exit_io_context+0x40/0x92
> [<ffffffff810b58c9>] copy_process+0x126f/0x1453
> [<ffffffff810b5c1b>] do_fork+0x120/0x3e9
> [<ffffffff8106242f>] sys_clone+0x26/0x28
> [<ffffffff82425803>] stub_clone+0x13/0x20
> ---[ end trace a2e4eb670b375238 ]---
>
> Reported-by: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> Heh, sorry about that. Forgot about fork failure path. Just removing
> the WARN_ON_ONCE() should be enough. Thanks for reporting the problem.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-27 18:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-26 9:46 WARNING: at block/blk-ioc.c:234 exit_io_context+0x40/0x92() Sasha Levin
2011-12-27 17:35 ` [PATCH block/for-3.3/core] block: remove WARN_ON_ONCE() in exit_io_context() Tejun Heo
2011-12-27 17:53 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox