Skip to content

Commit 50a98ce

Browse files
Yang Xiuweigregkh
authored andcommitted
io_uring: fix incorrect io_kiocb reference in io_link_skb
[ Upstream commit 2c139a4 ] 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 <[email protected]> Reviewed-by: Pavel Begunkov <[email protected]> Fixes: 6fe4220 ("io_uring/notif: implement notification stacking") Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0991418 commit 50a98ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/notif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int io_link_skb(struct sk_buff *skb, struct ubuf_info *uarg)
8585
return -EEXIST;
8686

8787
prev_nd = container_of(prev_uarg, struct io_notif_data, uarg);
88-
prev_notif = cmd_to_io_kiocb(nd);
88+
prev_notif = cmd_to_io_kiocb(prev_nd);
8989

9090
/* make sure all noifications can be finished in the same task_work */
9191
if (unlikely(notif->ctx != prev_notif->ctx ||

0 commit comments

Comments
 (0)