Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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<yanzheng@21cn.com>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yan Zheng and committed by
Linus Torvalds
87e2831c 745ad48e

+1 -1
+1 -1
fs/aio.c
··· 1562 1562 fput(file); 1563 1563 return -EAGAIN; 1564 1564 } 1565 + req->ki_filp = file; 1565 1566 if (iocb->aio_flags & IOCB_FLAG_RESFD) { 1566 1567 /* 1567 1568 * If the IOCB_FLAG_RESFD flag of aio_flags is set, get an ··· 1577 1576 } 1578 1577 } 1579 1578 1580 - req->ki_filp = file; 1581 1579 ret = put_user(req->ki_key, &user_iocb->aio_key); 1582 1580 if (unlikely(ret)) { 1583 1581 dprintk("EFAULT: aio_key\n");