Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
io_uring/net: save msghdr->msg_control for retries
Commit cac9e44 upstream. If the application sets ->msg_control and we have to later retry this command, or if it got queued with IOSQE_ASYNC to begin with, then we need to retain the original msg_control value. This is due to the net stack overwriting this field with an in-kernel pointer, to copy it in. Hitting that path for the second time will now fail the copy from user, as it's attempting to copy from a non-user address. Cc: stable@vger.kernel.org # 5.10+ Link: axboe/liburing#880 Reported-and-tested-by: Marek Majkowski <marek@cloudflare.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 34a7e5021a437bf813e1b52fc9043b43d48e2325) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
- Loading branch information