summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Xiuwei <yangxiuwei@kylinos.cn>2025-09-19 17:03:52 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 11:13:49 +0200
commita89c34babc2e5834aa0905278f26f4dbe4b26b76 (patch)
tree64fa6be3315cda9c2d8ccb03df3367fd583d6768
parent922338efaad63cfe30d459dfc59f9d69ff93ded4 (diff)
io_uring: fix incorrect io_kiocb reference in io_link_skb
[ Upstream commit 2c139a47eff8de24e3350dadb4c9d5e3426db826 ] 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: 6fe4220912d19 ("io_uring/notif: implement notification stacking") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--io_uring/notif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/notif.c b/io_uring/notif.c
index 28859ae3ee6e..d4cf5a1328e6 100644
--- a/io_uring/notif.c
+++ b/io_uring/notif.c
@@ -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 ||