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:59:20 +0000 (20:59 +0200)
commit285f5d724005758a8b215fa0a9ef3e282d646edb
tree3ebbbd23ffc94a3b7220f04ceb27af0066a20993
parent50c981bd77900293c32f91b3d28344554a5f3c0b
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