Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=87e2831c3fa39cbf6f7ab676bb5aef039b9659e2 Commit: 87e2831c3fa39cbf6f7ab676bb5aef039b9659e2 Parent: 745ad48e8cac47beec0b2f72dc3c64424bce1fec Author: Yan Zheng <[EMAIL PROTECTED]> AuthorDate: Mon Oct 8 12:16:20 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Oct 8 12:58:14 2007 -0700
AIO: fix cleanup in io_submit_one(...) When IOCB_FLAG_RESFD flag is set and iocb->aio_resfd is incorrect, statement 'goto out_put_req' is executed. At label 'out_put_req', aio_put_req(..) is called, which requires 'req->ki_filp' set. Signed-off-by: Yan Zheng<[EMAIL PROTECTED]> Cc: Zach Brown <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/aio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index dbe699e..ea2e198 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1562,6 +1562,7 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, fput(file); return -EAGAIN; } + req->ki_filp = file; if (iocb->aio_flags & IOCB_FLAG_RESFD) { /* * If the IOCB_FLAG_RESFD flag of aio_flags is set, get an @@ -1576,7 +1577,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, } } - req->ki_filp = file; ret = put_user(req->ki_key, &user_iocb->aio_key); if (unlikely(ret)) { dprintk("EFAULT: aio_key\n"); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html