Patch "io_uring: don't block level reissue off completion path" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring: don't block level reissue off completion path

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-don-t-block-level-reissue-off-completion-path.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From ef04688871f3386b6d40ade8f5c664290420f819 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@xxxxxxxxx>
Date: Tue, 27 Jul 2021 10:50:31 -0600
Subject: io_uring: don't block level reissue off completion path

From: Jens Axboe <axboe@xxxxxxxxx>

commit ef04688871f3386b6d40ade8f5c664290420f819 upstream.

Some setups, like SCSI, can throw spurious -EAGAIN off the softirq
completion path. Normally we expect this to happen inline as part
of submission, but apparently SCSI has a weird corner case where it
can happen as part of normal completions.

This should be solved by having the -EAGAIN bubble back up the stack
as part of submission, but previous attempts at this failed and we're
not just quite there yet. Instead we currently use REQ_F_REISSUE to
handle this case.

For now, catch it in io_rw_should_reissue() and prevent a reissue
from a bogus path.

Cc: stable@xxxxxxxxxxxxxxx
Reported-by: Fabian Ebner <f.ebner@xxxxxxxxxxx>
Tested-by: Fabian Ebner <f.ebner@xxxxxxxxxxx>
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/io_uring.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2457,6 +2457,12 @@ static bool io_rw_should_reissue(struct
 	 */
 	if (percpu_ref_is_dying(&ctx->refs))
 		return false;
+	/*
+	 * Play it safe and assume not safe to re-import and reissue if we're
+	 * not in the original thread group (or in task context).
+	 */
+	if (!same_thread_group(req->task, current) || !in_task())
+		return false;
 	return true;
 }
 #else


Patches currently in stable-queue which might be from axboe@xxxxxxxxx are

queue-5.13/io_uring-fix-io_prep_async_link-locking.patch
queue-5.13/io_uring-fix-poll-requests-leaking-second-poll-entries.patch
queue-5.13/blk-iocost-fix-operation-ordering-in-iocg_wake_fn.patch
queue-5.13/io_uring-don-t-block-level-reissue-off-completion-path.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux