stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree
@ 2020-06-15 13:59 gregkh
  2020-06-15 15:18 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2020-06-15 13:59 UTC (permalink / raw)
  To: asml.silence, axboe; +Cc: stable


The patch below does not apply to the 5.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 4518a3cc273cf82efdd36522fb1f13baad173c70 Mon Sep 17 00:00:00 2001
From: Pavel Begunkov <asml.silence@gmail.com>
Date: Tue, 26 May 2020 20:34:02 +0300
Subject: [PATCH] io_uring: fix flush req->refs underflow

In io_uring_cancel_files(), after refcount_sub_and_test() leaves 0
req->refs, it calls io_put_req(), which would also put a ref. Call
io_free_req() instead.

Cc: stable@vger.kernel.org
Fixes: 2ca10259b418 ("io_uring: prune request from overflow list on flush")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 0b51f21e5432..37422fcdaa7f 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7534,7 +7534,7 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx,
 			 * all we had, then we're done with this request.
 			 */
 			if (refcount_sub_and_test(2, &cancel_req->refs)) {
-				io_put_req(cancel_req);
+				io_free_req(cancel_req);
 				finish_wait(&ctx->inflight_wait, &wait);
 				continue;
 			}


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

* Re: FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree
  2020-06-15 13:59 FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree gregkh
@ 2020-06-15 15:18 ` Jens Axboe
  2020-06-15 20:16   ` Sasha Levin
  2020-06-15 20:20   ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Jens Axboe @ 2020-06-15 15:18 UTC (permalink / raw)
  To: gregkh, asml.silence; +Cc: stable

On 6/15/20 7:59 AM, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 5.6-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.

Greg, if you could cherry pick this one:

commit d8f1b9716cfd1a1f74c0fedad40c5f65a25aa208
Author: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Date:   Sun Apr 26 15:54:43 2020 +0800

    io_uring: fix mismatched finish_wait() calls in io_uring_cancel_files()

first (which should also go into stable), the below will apply without
conflicts after that.

-- 
Jens Axboe


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

* Re: FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree
  2020-06-15 15:18 ` Jens Axboe
@ 2020-06-15 20:16   ` Sasha Levin
  2020-06-15 20:20   ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2020-06-15 20:16 UTC (permalink / raw)
  To: Jens Axboe; +Cc: gregkh, asml.silence, stable

On Mon, Jun 15, 2020 at 09:18:29AM -0600, Jens Axboe wrote:
>On 6/15/20 7:59 AM, gregkh@linuxfoundation.org wrote:
>>
>> The patch below does not apply to the 5.6-stable tree.
>> If someone wants it applied there, or to any other stable or longterm
>> tree, then please email the backport, including the original git commit
>> id to <stable@vger.kernel.org>.
>
>Greg, if you could cherry pick this one:
>
>commit d8f1b9716cfd1a1f74c0fedad40c5f65a25aa208
>Author: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
>Date:   Sun Apr 26 15:54:43 2020 +0800
>
>    io_uring: fix mismatched finish_wait() calls in io_uring_cancel_files()
>
>first (which should also go into stable), the below will apply without
>conflicts after that.

I've grabbed both, thanks!

-- 
Thanks,
Sasha

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

* Re: FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree
  2020-06-15 15:18 ` Jens Axboe
  2020-06-15 20:16   ` Sasha Levin
@ 2020-06-15 20:20   ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-06-15 20:20 UTC (permalink / raw)
  To: Jens Axboe; +Cc: asml.silence, stable

On Mon, Jun 15, 2020 at 09:18:29AM -0600, Jens Axboe wrote:
> On 6/15/20 7:59 AM, gregkh@linuxfoundation.org wrote:
> > 
> > The patch below does not apply to the 5.6-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> 
> Greg, if you could cherry pick this one:
> 
> commit d8f1b9716cfd1a1f74c0fedad40c5f65a25aa208
> Author: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
> Date:   Sun Apr 26 15:54:43 2020 +0800
> 
>     io_uring: fix mismatched finish_wait() calls in io_uring_cancel_files()
> 
> first (which should also go into stable), the below will apply without
> conflicts after that.

That worked great, thanks!

greg k-h

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

end of thread, other threads:[~2020-06-15 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 13:59 FAILED: patch "[PATCH] io_uring: fix flush req->refs underflow" failed to apply to 5.6-stable tree gregkh
2020-06-15 15:18 ` Jens Axboe
2020-06-15 20:16   ` Sasha Levin
2020-06-15 20:20   ` Greg KH

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