Patch "io_uring/kbuf: return correct iovec count from classic buffer peek" has been added to the 6.10-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/kbuf: return correct iovec count from classic buffer peek

to the 6.10-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-kbuf-return-correct-iovec-count-from-classi.patch
and it can be found in the queue-6.10 subdirectory.

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



commit 0b8c4de6d50e6eb0935b48b19d80c76fae2fd51a
Author: Jens Axboe <axboe@xxxxxxxxx>
Date:   Fri Aug 30 10:45:54 2024 -0600

    io_uring/kbuf: return correct iovec count from classic buffer peek
    
    [ Upstream commit f274495aea7b15225b3d83837121b22ef96e560c ]
    
    io_provided_buffers_select() returns 0 to indicate success, but it should
    be returning 1 to indicate that 1 vec was mapped. This causes peeking
    to fail with classic provided buffers, and while that's not a use case
    that anyone should use, it should still work correctly.
    
    The end result is that no buffer will be selected, and hence a completion
    with '0' as the result will be posted, without a buffer attached.
    
    Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers")
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 1af2bd56af44a..bdfa30b38321b 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -129,7 +129,7 @@ static int io_provided_buffers_select(struct io_kiocb *req, size_t *len,
 
 	iov[0].iov_base = buf;
 	iov[0].iov_len = *len;
-	return 0;
+	return 1;
 }
 
 static struct io_uring_buf *io_ring_head_to_buf(struct io_uring_buf_ring *br,




[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