io_uring: don't touch scm_fp_list after queueing skb
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 6 Apr 2022 11:43:58 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:18 +0000 (20:03 +0200)
commitec3c0bd9a209f60cf4b17de2e45b8c86f09d358c
treee5c315e4ac554167dfdbbcfa713d49f7a98bd949
parent03a0b9cf7afcb568336d1dc89763395538d27d48
io_uring: don't touch scm_fp_list after queueing skb

[ Upstream commit a07211e3001435fe8591b992464cd8d5e3c98c5a ]

It's safer to not touch scm_fp_list after we queued an skb to which it
was assigned, there might be races lurking if we screw subtle sync
guarantees on the io_uring side.

Fixes: 6b06314c47e14 ("io_uring: add file set registration")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c