linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/aio.c: fix wrong return value regression in __io_submit_one
@ 2019-04-09  6:06 Murphy Zhou
  2019-04-09 23:13 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Murphy Zhou @ 2019-04-09  6:06 UTC (permalink / raw)
  To: linux-fsdevel, viro; +Cc: Murphy Zhou

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(-)

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.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/aio.c: fix wrong return value regression in __io_submit_one
  2019-04-09  6:06 [PATCH] fs/aio.c: fix wrong return value regression in __io_submit_one Murphy Zhou
@ 2019-04-09 23:13 ` Al Viro
  2019-04-10  2:55   ` Murphy Zhou
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2019-04-09 23:13 UTC (permalink / raw)
  To: Murphy Zhou; +Cc: linux-fsdevel

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...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/aio.c: fix wrong return value regression in __io_submit_one
  2019-04-09 23:13 ` Al Viro
@ 2019-04-10  2:55   ` Murphy Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Murphy Zhou @ 2019-04-10  2:55 UTC (permalink / raw)
  To: Al Viro; +Cc: Linux-Fsdevel

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-10  2:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09  6:06 [PATCH] fs/aio.c: fix wrong return value regression in __io_submit_one Murphy Zhou
2019-04-09 23:13 ` Al Viro
2019-04-10  2:55   ` Murphy Zhou

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).