* FAILED: patch "[PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation" failed to apply to 5.8-stable tree
@ 2020-09-28 14:04 gregkh
2020-09-28 14:52 ` Stefano Garzarella
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2020-09-28 14:04 UTC (permalink / raw)
To: axboe, sgarzare; +Cc: stable
The patch below does not apply to the 5.8-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 f3cd4850504ff612d0ea77a0aaf29b66c98fcefe Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Thu, 24 Sep 2020 14:55:54 -0600
Subject: [PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation
If we cancel these requests, we'll leak the memory associated with the
filename. Add them to the table of ops that need cleaning, if
REQ_F_NEED_CLEANUP is set.
Cc: stable@vger.kernel.org
Fixes: e62753e4e292 ("io_uring: call statx directly")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fs/io_uring.c b/fs/io_uring.c
index e6004b92e553..0ab16df31288 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5671,6 +5671,11 @@ static void __io_clean_op(struct io_kiocb *req)
io_put_file(req, req->splice.file_in,
(req->splice.flags & SPLICE_F_FD_IN_FIXED));
break;
+ case IORING_OP_OPENAT:
+ case IORING_OP_OPENAT2:
+ if (req->open.filename)
+ putname(req->open.filename);
+ break;
}
req->flags &= ~REQ_F_NEED_CLEANUP;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation" failed to apply to 5.8-stable tree
2020-09-28 14:04 FAILED: patch "[PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation" failed to apply to 5.8-stable tree gregkh
@ 2020-09-28 14:52 ` Stefano Garzarella
2020-09-28 15:04 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Garzarella @ 2020-09-28 14:52 UTC (permalink / raw)
To: axboe; +Cc: gregkh, stable
Jens, if you want I can do the backport for 5.8.
Stefano
On Mon, Sep 28, 2020 at 04:04:25PM +0200, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 5.8-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 f3cd4850504ff612d0ea77a0aaf29b66c98fcefe Mon Sep 17 00:00:00 2001
> From: Jens Axboe <axboe@kernel.dk>
> Date: Thu, 24 Sep 2020 14:55:54 -0600
> Subject: [PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation
>
> If we cancel these requests, we'll leak the memory associated with the
> filename. Add them to the table of ops that need cleaning, if
> REQ_F_NEED_CLEANUP is set.
>
> Cc: stable@vger.kernel.org
> Fixes: e62753e4e292 ("io_uring: call statx directly")
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index e6004b92e553..0ab16df31288 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -5671,6 +5671,11 @@ static void __io_clean_op(struct io_kiocb *req)
> io_put_file(req, req->splice.file_in,
> (req->splice.flags & SPLICE_F_FD_IN_FIXED));
> break;
> + case IORING_OP_OPENAT:
> + case IORING_OP_OPENAT2:
> + if (req->open.filename)
> + putname(req->open.filename);
> + break;
> }
> req->flags &= ~REQ_F_NEED_CLEANUP;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-28 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28 14:04 FAILED: patch "[PATCH] io_uring: ensure open/openat2 name is cleaned on cancelation" failed to apply to 5.8-stable tree gregkh
2020-09-28 14:52 ` Stefano Garzarella
2020-09-28 15:04 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.