Skip to contentSkip to conversation

io_uring/cmd_net: fix wrong argument types for skb_queue_splice()

PATCH In review Jens Axboe 2 participants 2 messages Nov 20, 2025 – Nov 21, 2025 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring/cmd_net: fix wrong argument types for skb_queue_splice()

If timestamp retriving needs to be retried and the local list of SKB's already has entries, then it's spliced back into the socket queue. However, the arguments for the splice helper are transposed, causing exactly the wrong direction of splicing into the on-stack list. Fix that up.

Fixes 9e4ed359b8ef ("io_uring/netcmd: add tx timestamping cmd support")

---

io_uring/cmd_net.c +1 -1
index 27a09aa4c9d0..3b75931bd569 100644
@@ -127,7 +127,7 @@ static int io_uring_cmd_timestamp(struct socket *sock,
 
 	if (!unlikely(skb_queue_empty(&list))) {
 		scoped_guard(spinlock_irqsave, &q->lock)
-			skb_queue_splice(q, &list);
+			skb_queue_splice(&list, q);
 	}
 	return -EAGAIN;
 }
Signature · 1 line
Jens Axboe
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 28 lines · Jens Axboe

If timestamp retriving needs to be retried and the local list of SKB's already has entries, then it's spliced back into the socket queue. However, the arguments for the splice helper are transposed, causing exactly the wrong direction of splicing into the on-stack list. Fix that up.

Fixes 9e4ed359b8ef ("io_uring/netcmd: add tx timestamping cmd support")

---

io_uring/cmd_net.c +1 -1
index 27a09aa4c9d0..3b75931bd569 100644
@@ -127,7 +127,7 @@ static int io_uring_cmd_timestamp(struct socket *sock,
 
 	if (!unlikely(skb_queue_empty(&list))) {
 		scoped_guard(spinlock_irqsave, &q->lock)
-			skb_queue_splice(q, &list);
+			skb_queue_splice(&list, q);
 	}
 	return -EAGAIN;
 }
Signature · 1 line
-- 

Thanks for the quick patch!

—Günther