[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0703141620340.4982@alien.or.mcafeemobile.com>
Date: Wed, 14 Mar 2007 16:24:54 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Benjamin LaHaise <bcrl@...ck.org>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Suparna Bhattacharya <suparna@...ibm.com>,
Zach Brown <zach.brown@...cle.com>
Subject: Re: [patch 13/13] signalfd/timerfd/asyncfd v5 - KAIO asyncfd support
(example/maybe-broken) ...
On Wed, 14 Mar 2007, Benjamin LaHaise wrote:
> On Wed, Mar 14, 2007 at 03:19:21PM -0700, Davide Libenzi wrote:
> > + /*
> > + * Check if the user asked us to deliver the result through an
> > + * asyncfd. Note that asyncfd_add_results() may sleep. It seems
> > + * OK looking at the code, but I'm not sure since inside a USB driver,
> > + * aio_complete() is called with a spinlock held. !!CHECK
> > + */
>
> That won't work. aio_complete() is supposed to be irq safe.
Can you point me to a kernel path that ends up calling aio_complete() in a
do-not-sleep mode?
The offender I see is drivers/usb/gadget/inode.c that calls it with a
spinlock held.
The aio_run_iocb function seem to release/reacquire the lock before
calling aio_complete().
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists