Patch "io_uring/net: correctly handle multishot recvmsg retry setup" has been added to the 6.6-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/net: correctly handle multishot recvmsg retry setup

to the 6.6-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-net-correctly-handle-multishot-recvmsg-retr.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 6d287bffa0b7d6e6c748ffb91d62001ee7e47695
Author: Jens Axboe <axboe@xxxxxxxxx>
Date:   Thu Mar 7 17:48:03 2024 -0700

    io_uring/net: correctly handle multishot recvmsg retry setup
    
    [ Upstream commit deaef31bc1ec7966698a427da8c161930830e1cf ]
    
    If we loop for multishot receive on the initial attempt, and then abort
    later on to wait for more, we miss a case where we should be copying the
    io_async_msghdr from the stack to stable storage. This leads to the next
    retry potentially failing, if the application had the msghdr on the
    stack.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/io_uring/net.c b/io_uring/net.c
index 4aaeada03f1e7..386a6745ae32f 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -915,7 +915,8 @@ int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags)
 			kfree(kmsg->free_iov);
 		io_netmsg_recycle(req, issue_flags);
 		req->flags &= ~REQ_F_NEED_CLEANUP;
-	}
+	} else if (ret == -EAGAIN)
+		return io_setup_async_msg(req, kmsg, issue_flags);
 
 	return ret;
 }




[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