mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
io_uring: fix incorrect io_kiocb reference in io_link_skb
[ Upstream commit2c139a47ef] In io_link_skb function, there is a bug where prev_notif is incorrectly assigned using 'nd' instead of 'prev_nd'. This causes the context validation check to compare the current notification with itself instead of comparing it with the previous notification. Fix by using the correct prev_nd parameter when obtaining prev_notif. Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Fixes:6fe4220912("io_uring/notif: implement notification stacking") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0991418bf9
commit
50a98ce1ea
@@ -85,7 +85,7 @@ static int io_link_skb(struct sk_buff *skb, struct ubuf_info *uarg)
|
||||
return -EEXIST;
|
||||
|
||||
prev_nd = container_of(prev_uarg, struct io_notif_data, uarg);
|
||||
prev_notif = cmd_to_io_kiocb(nd);
|
||||
prev_notif = cmd_to_io_kiocb(prev_nd);
|
||||
|
||||
/* make sure all noifications can be finished in the same task_work */
|
||||
if (unlikely(notif->ctx != prev_notif->ctx ||
|
||||
|
||||
Reference in New Issue
Block a user