From: Greg Kroah-Hartman Date: Thu, 15 Jul 2021 17:32:30 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.4.133~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdfab4b571276fe6abbb27cccc86d79f21d6c244;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: io_uring-fix-clear-ioring_setup_r_disabled-in-wrong-function.patch --- diff --git a/queue-5.10/io_uring-fix-clear-ioring_setup_r_disabled-in-wrong-function.patch b/queue-5.10/io_uring-fix-clear-ioring_setup_r_disabled-in-wrong-function.patch new file mode 100644 index 00000000000..4f15b6230f7 --- /dev/null +++ b/queue-5.10/io_uring-fix-clear-ioring_setup_r_disabled-in-wrong-function.patch @@ -0,0 +1,40 @@ +From yangyingliang@huawei.com Thu Jul 15 19:31:46 2021 +From: Yang Yingliang +Date: Thu, 15 Jul 2021 21:18:25 +0800 +Subject: io_uring: fix clear IORING_SETUP_R_DISABLED in wrong function +To: , +Cc: , +Message-ID: <20210715131825.2410912-1-yangyingliang@huawei.com> + +From: Yang Yingliang + +In commit 3ebba796fa25 ("io_uring: ensure that SQPOLL thread is started for exit"), +the IORING_SETUP_R_DISABLED is cleared in io_sq_offload_start(), but when backport +it to stable-5.10, IORING_SETUP_R_DISABLED is cleared in __io_req_task_submit(), +move clearing IORING_SETUP_R_DISABLED to io_sq_offload_start() to fix this. + +Fixes: 6cae8095490ca ("io_uring: ensure that SQPOLL thread is started for exit") +Signed-off-by: Yang Yingliang +Signed-off-by: Greg Kroah-Hartman +--- + fs/io_uring.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/io_uring.c ++++ b/fs/io_uring.c +@@ -2087,7 +2087,6 @@ static void __io_req_task_submit(struct + __io_req_task_cancel(req, -EFAULT); + mutex_unlock(&ctx->uring_lock); + +- ctx->flags &= ~IORING_SETUP_R_DISABLED; + if (ctx->flags & IORING_SETUP_SQPOLL) + io_sq_thread_drop_mm(); + } +@@ -7992,6 +7991,7 @@ static void io_sq_offload_start(struct i + { + struct io_sq_data *sqd = ctx->sq_data; + ++ ctx->flags &= ~IORING_SETUP_R_DISABLED; + if ((ctx->flags & IORING_SETUP_SQPOLL) && sqd->thread) + wake_up_process(sqd->thread); + } diff --git a/queue-5.10/series b/queue-5.10/series index 5088ae18b2d..52ac73648bb 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -205,3 +205,4 @@ media-gspca-sq905-fix-control-request-direction.patch media-gspca-sunplus-fix-zero-length-control-requests.patch media-rtl28xxu-fix-zero-length-control-request.patch media-uvcvideo-fix-pixel-format-change-for-elgato-cam-link-4k.patch +io_uring-fix-clear-ioring_setup_r_disabled-in-wrong-function.patch