diff mbox series

fs/aio.c: fix wrong return value regression in __io_submit_one

Message ID 20190409060650.28901-1-jencce.kernel@gmail.com (mailing list archive)
State New, archived
Headers show
Series fs/aio.c: fix wrong return value regression in __io_submit_one | expand

Commit Message

Murphy Zhou April 9, 2019, 6:06 a.m. UTC
Now it returns 0 when actually error happened, causing kernel hang easily.

Fixes: 7316b49 "aio: move sanity checks and request allocation to io_submit_one()"
Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 fs/aio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Al Viro April 9, 2019, 11:13 p.m. UTC | #1
On Tue, Apr 09, 2019 at 02:06:50PM +0800, Murphy Zhou wrote:
> Now it returns 0 when actually error happened, causing kernel hang easily.
> 
> Fixes: 7316b49 "aio: move sanity checks and request allocation to io_submit_one()"
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>

See 18bfb9c6a8a5 (aio: Fix an error code in __io_submit_one()) in
vfs.git#fixes...
Murphy Zhou April 10, 2019, 2:55 a.m. UTC | #2
On Wed, Apr 10, 2019 at 7:13 AM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> On Tue, Apr 09, 2019 at 02:06:50PM +0800, Murphy Zhou wrote:
> > Now it returns 0 when actually error happened, causing kernel hang easily.
> >
> > Fixes: 7316b49 "aio: move sanity checks and request allocation to io_submit_one()"
> > Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
>
> See 18bfb9c6a8a5 (aio: Fix an error code in __io_submit_one()) in
> vfs.git#fixes...

Got it, Thanks!
diff mbox series

Patch

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;
 	}