Re: [RFC] [PATCH] 2.5.35 patch for making DIO async

Suparna Bhattacharya (suparna@in.ibm.com)
Thu, 19 Sep 2002 16:22:14 +0530


On Wed, Sep 18, 2002 at 01:47:06PM -0700, Badari Pulavarty wrote:
> Ben,
>
> aio_read/aio_write() are now working with a minor fix to fs/aio.c
>
> io_submit_one():
>
> if (likely(EIOCBQUEUED == ret))
>
> needs to be changed to
>
> if (likely(-EIOCBQUEUED == ret))
> ^^^
>
>
> I was wondering what happens to following case (I think this
> happend in my test program).
>
> Lets say, I did an sys_io_submit() and my test program did exit().
> When the IO complete happend, it tried to do following and got
> an OOPS in aio_complete().
>
> if (ctx == &ctx->mm->default_kioctx) {
>
> I think "mm" is freed up, when process exited. Do you think this is
> possible ? How do we handle this ?

Do you see this only in the sync case ?
init_sync_iocb ought to increment ctx->reqs_active, so that
exit_aio waits for the iocb's to complete.

Regards
Suparna
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/