* [PATCH] aio: Fix an error code in __io_submit_one()
@ 2019-04-03 6:22 Dan Carpenter
2019-04-03 16:46 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-04-03 6:22 UTC (permalink / raw)
To: Alexander Viro; +Cc: linux-aio, linux-fsdevel, kernel-janitors
This accidentally returns the wrong variable. The "req->ki_eventfd"
pointer is NULL so this return success.
Fixes: 7316b49c2a11 ("aio: move sanity checks and request allocation to io_submit_one()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index a4cc2a1cccb7..7ccecaab487a 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1794,7 +1794,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
*/
eventfd = eventfd_ctx_fdget(iocb->aio_resfd);
if (IS_ERR(eventfd))
- return PTR_ERR(req->ki_eventfd);
+ return PTR_ERR(eventfd);
req->ki_eventfd = eventfd;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-03 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 6:22 [PATCH] aio: Fix an error code in __io_submit_one() Dan Carpenter
2019-04-03 16:46 ` Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).