Commit 4b6c7be5 authored by Jens Axboe's avatar Jens Axboe Committed by sanglipeng
Browse files

io_uring/net: disable partial retries for recvmsg with cmsg

stable inclusion
from stable-v5.10.186
commit 3845c38417bdec561ccc4385e044c554ad837684
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8L5XP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3845c38417bdec561ccc4385e044c554ad837684

--------------------------------

Commit 78d0d206 upstream.

We cannot sanely handle partial retries for recvmsg if we have cmsg
attached. If we don't, then we'd just be overwriting the initial cmsg
header on retries. Alternatively we could increment and handle this
appropriately, but it doesn't seem worth the complication.

Move the MSG_WAITALL check into the non-multishot case while at it,
since MSG_WAITALL is explicitly disabled for multishot anyway.

Link: https://lore.kernel.org/io-uring/0b0d4411-c8fd-4272-770b-e030af6919a0@kernel.dk/


Cc: stable@vger.kernel.org # 5.10+
Reported-by: default avatarStefan Metzmacher <metze@samba.org>
Reviewed-by: default avatarStefan Metzmacher <metze@samba.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent a3f331c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment