Patch "io_uring: don't mark S_ISBLK async work as unbounded" has been added to the 5.11-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 mark S_ISBLK async work as unbounded

to the 5.11-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-mark-s_isblk-async-work-as-unbounded.patch
and it can be found in the queue-5.11 subdirectory.

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



commit ffa3236a625bfa6b64e14e35850c31b24b1f1c55
Author: Jens Axboe <axboe@xxxxxxxxx>
Date:   Thu Apr 1 08:38:34 2021 -0600

    io_uring: don't mark S_ISBLK async work as unbounded
    
    [ Upstream commit 4b982bd0f383db9132e892c0c5144117359a6289 ]
    
    S_ISBLK is marked as unbounded work for async preparation, because it
    doesn't match S_ISREG. That is incorrect, as any read/write to a block
    device is also a bounded operation. Fix it up and ensure that S_ISBLK
    isn't marked unbounded.
    
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/io_uring.c b/fs/io_uring.c
index b1b3154c8d50..95b4a89dad4e 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1546,7 +1546,7 @@ static void io_prep_async_work(struct io_kiocb *req)
 	if (req->flags & REQ_F_ISREG) {
 		if (def->hash_reg_file || (ctx->flags & IORING_SETUP_IOPOLL))
 			io_wq_hash_work(&req->work, file_inode(req->file));
-	} else {
+	} else if (!req->file || !S_ISBLK(file_inode(req->file)->i_mode)) {
 		if (def->unbound_nonreg_file)
 			req->work.flags |= IO_WQ_WORK_UNBOUND;
 	}



[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