diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-18 11:59:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-18 11:59:42 +0200 |
commit | c2112b9c1ca0a6952a71036971cab0ed277711a7 (patch) | |
tree | 08ab0970d08f8669e1164257cab98a3b39d06d9c | |
parent | b7ba43478df9d0f8f7a30ca794c6a942a02300e7 (diff) | |
download | stable-queue-c2112b9c1ca0a6952a71036971cab0ed277711a7.tar.gz |
6.1-stable patches
added patches:
io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch
-rw-r--r-- | queue-6.1/io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch | 57 | ||||
-rw-r--r-- | queue-6.1/series | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/queue-6.1/io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch b/queue-6.1/io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch new file mode 100644 index 0000000000..a0c45c912f --- /dev/null +++ b/queue-6.1/io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch @@ -0,0 +1,57 @@ +From 69f86e86be3e44a2be3f79e0269fea50d4da3a93 Mon Sep 17 00:00:00 2001 +From: Alexey Izbyshev <izbyshev@ispras.ru> +Date: Fri, 5 Apr 2024 15:55:51 +0300 +Subject: io_uring: Fix io_cqring_wait() not restoring sigmask on get_timespec64() failure + +From: Alexey Izbyshev <izbyshev@ispras.ru> + +Commit 978e5c19dfefc271e5550efba92fcef0d3f62864 upstream. + +This bug was introduced in commit 950e79dd7313 ("io_uring: minor +io_cqring_wait() optimization"), which was made in preparation for +adc8682ec690 ("io_uring: Add support for napi_busy_poll"). The latter +got reverted in cb3182167325 ("Revert "io_uring: Add support for +napi_busy_poll""), so simply undo the former as well. + +Cc: stable@vger.kernel.org +Fixes: 950e79dd7313 ("io_uring: minor io_cqring_wait() optimization") +Signed-off-by: Alexey Izbyshev <izbyshev@ispras.ru> +Link: https://lore.kernel.org/r/20240405125551.237142-1-izbyshev@ispras.ru +Signed-off-by: Jens Axboe <axboe@kernel.dk> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + io_uring/io_uring.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/io_uring/io_uring.c ++++ b/io_uring/io_uring.c +@@ -2426,6 +2426,14 @@ static int io_cqring_wait(struct io_ring + return 0; + } while (ret > 0); + ++ if (uts) { ++ struct timespec64 ts; ++ ++ if (get_timespec64(&ts, uts)) ++ return -EFAULT; ++ timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns()); ++ } ++ + if (sig) { + #ifdef CONFIG_COMPAT + if (in_compat_syscall()) +@@ -2439,14 +2447,6 @@ static int io_cqring_wait(struct io_ring + return ret; + } + +- if (uts) { +- struct timespec64 ts; +- +- if (get_timespec64(&ts, uts)) +- return -EFAULT; +- timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns()); +- } +- + init_waitqueue_func_entry(&iowq.wq, io_wake_function); + iowq.wq.private = current; + INIT_LIST_HEAD(&iowq.wq.entry); diff --git a/queue-6.1/series b/queue-6.1/series index a0b0e292fb..561c5e301d 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -2,3 +2,4 @@ drm-vmwgfx-enable-dma-mappings-with-sev.patch drm-amdgpu-fix-incorrect-active-rb-bitmap-for-gfx11.patch drm-amdgpu-fix-incorrect-number-of-active-rbs-for-gf.patch drm-amd-display-do-not-recursively-call-manual-trigg.patch +io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch |