Re: [patch] aio: fix buggy put_ioctx call in aio_complete - v2

2007-02-01 Thread Jeff Moyer
==> On Fri, 29 Dec 2006 17:34:26 -0800, "Chen, Kenneth W" <[EMAIL PROTECTED]> said: Kenneth> An AIO bug was reported that sleeping function is being called in softirq Kenneth> context: Kenneth> The real problem is that the condition check of ctx->reqs_active in Kenneth> wait_for_all_aios() is i

[patch] aio: fix buggy put_ioctx call in aio_complete - v2

2006-12-29 Thread Chen, Kenneth W
An AIO bug was reported that sleeping function is being called in softirq context: BUG: warning at kernel/mutex.c:132/__mutex_lock_common() Call Trace: [] __mutex_lock_slowpath+0x640/0x6c0 [] mutex_lock+0x20/0x40 [] flush_workqueue+0xb0/0x1a0 [] __put_ioctx+0xc0/0x240 [] a

RE: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread Chen, Kenneth W
[EMAIL PROTECTED] wrote on Thursday, December 21, 2006 9:35 AM > kenneth.w.chen> Take ioctx_lock is one part, the other part is to move > kenneth.w.chen> spin_unlock_irqrestore(&ctx->ctx_lock, flags); > kenneth.w.chen> in aio_complete all the way down to the end of the > kenneth.w.chen> funct

Re: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread jmoyer
==> Regarding RE: [patch] aio: fix buggy put_ioctx call in aio_complete; "Chen, Kenneth W" <[EMAIL PROTECTED]> adds: kenneth.w.chen> [EMAIL PROTECTED] wrote on Thursday, December 21, 2006 8:56 kenneth.w.chen> AM I think I'm going to abandon this whole synchronize k

RE: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread Chen, Kenneth W
[EMAIL PROTECTED] wrote on Thursday, December 21, 2006 8:56 AM > kenneth.w.chen> I think I'm going to abandon this whole synchronize thing > kenneth.w.chen> and going to put the wake up call inside ioctx_lock spin > kenneth.w.chen> lock along with the other patch you mentioned above in the > kennet

Re: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread jmoyer
==> Regarding RE: [patch] aio: fix buggy put_ioctx call in aio_complete; "Chen, Kenneth W" <[EMAIL PROTECTED]> adds: kenneth.w.chen> I think I'm going to abandon this whole synchronize thing kenneth.w.chen> and going to put the wake up call inside ioctx_lock spin k

RE: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread Chen, Kenneth W
Andrew Morton wrote on Thursday, December 21, 2006 12:18 AM > Alas, your above description doesn't really tell us what the bug is, so I'm > at a bit of a loss here. > > http://marc.theaimsgroup.com/?l=linux-aio&m=116616463009218&w=2> > > So that's a refcounting bug. But it's really a locking bug

Re: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread Andrew Morton
On Wed, 20 Dec 2006 23:58:43 -0800 "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote on Wednesday, December 20, 2006 8:06 PM > > On Tue, 19 Dec 2006 13:49:18 -0800 > > "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > > > Regarding to a bug report on: > > > http://marc.theaimsgroup.c

RE: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-21 Thread Chen, Kenneth W
Andrew Morton wrote on Wednesday, December 20, 2006 8:06 PM > On Tue, 19 Dec 2006 13:49:18 -0800 > "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > > Regarding to a bug report on: > > http://marc.theaimsgroup.com/?l=linux-kernel&m=116599593200888&w=2 > > > > flush_workqueue() is not allowed to be ca

Re: [patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-20 Thread Andrew Morton
On Tue, 19 Dec 2006 13:49:18 -0800 "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > Regarding to a bug report on: > http://marc.theaimsgroup.com/?l=linux-kernel&m=116599593200888&w=2 > > flush_workqueue() is not allowed to be called in the softirq context. > However, aio_complete() called from I/O

[patch] aio: fix buggy put_ioctx call in aio_complete

2006-12-19 Thread Chen, Kenneth W
Regarding to a bug report on: http://marc.theaimsgroup.com/?l=linux-kernel&m=116599593200888&w=2 flush_workqueue() is not allowed to be called in the softirq context. However, aio_complete() called from I/O interrupt can potentially call put_ioctx with last ref count on ioctx and trigger a bug war