From db9531a97cb25a3e9fc16d5efb5bbaca076b920e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 17 Feb 2020 15:07:13 +0100 Subject: [PATCH] drop queue-5.5/io_uring-fix-double-prep-iovec-leak.patch --- .../io_uring-fix-double-prep-iovec-leak.patch | 69 ------------------- ...raw-bdev-writes-if-we-hit-eopnotsupp.patch | 2 +- queue-5.5/series | 1 - 3 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 queue-5.5/io_uring-fix-double-prep-iovec-leak.patch diff --git a/queue-5.5/io_uring-fix-double-prep-iovec-leak.patch b/queue-5.5/io_uring-fix-double-prep-iovec-leak.patch deleted file mode 100644 index f596d2dbd1f..00000000000 --- a/queue-5.5/io_uring-fix-double-prep-iovec-leak.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5f798beaf35d79355cbf18019c1993a84475a2c3 Mon Sep 17 00:00:00 2001 -From: Pavel Begunkov -Date: Sat, 8 Feb 2020 13:28:02 +0300 -Subject: io_uring: fix double prep iovec leak - -From: Pavel Begunkov - -commit 5f798beaf35d79355cbf18019c1993a84475a2c3 upstream. - -Requests may be prepared multiple times with ->io allocated (i.e. async -prepared). Preparation functions don't handle it and forget about -previously allocated resources. This may happen in case of: -- spurious defer_check -- non-head (i.e. async prepared) request executed in sync (via nxt). - -Make the handlers check, whether they already allocated resources, which -is true IFF REQ_F_NEED_CLEANUP is set. - -Cc: stable@vger.kernel.org # 5.5 -Signed-off-by: Pavel Begunkov -Signed-off-by: Jens Axboe -Signed-off-by: Greg Kroah-Hartman - ---- - fs/io_uring.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - ---- a/fs/io_uring.c -+++ b/fs/io_uring.c -@@ -1816,7 +1816,8 @@ static int io_read_prep(struct io_kiocb - if (unlikely(!(req->file->f_mode & FMODE_READ))) - return -EBADF; - -- if (!req->io) -+ /* either don't need iovec imported or already have it */ -+ if (!req->io || req->flags & REQ_F_NEED_CLEANUP) - return 0; - - io = req->io; -@@ -1903,7 +1904,8 @@ static int io_write_prep(struct io_kiocb - if (unlikely(!(req->file->f_mode & FMODE_WRITE))) - return -EBADF; - -- if (!req->io) -+ /* either don't need iovec imported or already have it */ -+ if (!req->io || req->flags & REQ_F_NEED_CLEANUP) - return 0; - - io = req->io; -@@ -2649,6 +2651,9 @@ static int io_poll_wake(struct wait_queu - /* for instances that support it check for an event match first: */ - if (mask && !(mask & poll->events)) - return 0; -+ /* iovec is already imported */ -+ if (req->flags & REQ_F_NEED_CLEANUP) -+ return 0; - - list_del_init(&poll->wait.entry); - -@@ -3151,6 +3156,9 @@ static int io_req_defer(struct io_kiocb - /* Still need defer if there is pending req in defer list. */ - if (!req_need_defer(req) && list_empty(&ctx->defer_list)) - return 0; -+ /* iovec is already imported */ -+ if (req->flags & REQ_F_NEED_CLEANUP) -+ return 0; - - if (!req->io && io_alloc_async_ctx(req)) - return -EAGAIN; diff --git a/queue-5.5/io_uring-retry-raw-bdev-writes-if-we-hit-eopnotsupp.patch b/queue-5.5/io_uring-retry-raw-bdev-writes-if-we-hit-eopnotsupp.patch index 385923539d5..fa95957f2b3 100644 --- a/queue-5.5/io_uring-retry-raw-bdev-writes-if-we-hit-eopnotsupp.patch +++ b/queue-5.5/io_uring-retry-raw-bdev-writes-if-we-hit-eopnotsupp.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/io_uring.c +++ b/fs/io_uring.c -@@ -1980,6 +1980,12 @@ static int io_write(struct io_kiocb *req +@@ -1978,6 +1978,12 @@ static int io_write(struct io_kiocb *req ret2 = call_write_iter(req->file, kiocb, &iter); else ret2 = loop_rw_iter(WRITE, req->file, kiocb, &iter); diff --git a/queue-5.5/series b/queue-5.5/series index acf23821504..395fddce608 100644 --- a/queue-5.5/series +++ b/queue-5.5/series @@ -1,5 +1,4 @@ io_uring-fix-deferred-req-iovec-leak.patch -io_uring-fix-double-prep-iovec-leak.patch io_uring-retry-raw-bdev-writes-if-we-hit-eopnotsupp.patch input-synaptics-switch-t470s-to-rmi4-by-default.patch input-synaptics-enable-smbus-on-thinkpad-l470.patch -- 2.47.3