* [PATCH] io_uring/cmd_net: fix wrong argument types for skb_queue_splice()
@ 2025-11-20 20:24 Jens Axboe
2025-11-21 8:53 ` Günther Noack
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2025-11-20 20:24 UTC (permalink / raw)
To: io-uring
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.
Cc: stable@vger.kernel.org
Reported-by: Google Big Sleep <big-sleep-vuln-reports+bigsleep-462435176@google.com>
Fixes: 9e4ed359b8ef ("io_uring/netcmd: add tx timestamping cmd support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diff --git a/io_uring/cmd_net.c b/io_uring/cmd_net.c
index 27a09aa4c9d0..3b75931bd569 100644
--- a/io_uring/cmd_net.c
+++ b/io_uring/cmd_net.c
@@ -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;
}
--
Jens Axboe
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring/cmd_net: fix wrong argument types for skb_queue_splice()
2025-11-20 20:24 [PATCH] io_uring/cmd_net: fix wrong argument types for skb_queue_splice() Jens Axboe
@ 2025-11-21 8:53 ` Günther Noack
0 siblings, 0 replies; 2+ messages in thread
From: Günther Noack @ 2025-11-21 8:53 UTC (permalink / raw)
To: Jens Axboe; +Cc: io-uring
On Thu, Nov 20, 2025 at 01:24:14PM -0700, Jens Axboe wrote:
> 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.
>
> Cc: stable@vger.kernel.org
> Reported-by: Google Big Sleep <big-sleep-vuln-reports+bigsleep-462435176@google.com>
> Fixes: 9e4ed359b8ef ("io_uring/netcmd: add tx timestamping cmd support")
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
> diff --git a/io_uring/cmd_net.c b/io_uring/cmd_net.c
> index 27a09aa4c9d0..3b75931bd569 100644
> --- a/io_uring/cmd_net.c
> +++ b/io_uring/cmd_net.c
> @@ -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;
> }
>
> --
Thanks for the quick patch!
Reviewed-by: Günther Noack <gnoack@google.com>
Tested-by: Günther Noack <gnoack@google.com>
—Günther
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-21 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 20:24 [PATCH] io_uring/cmd_net: fix wrong argument types for skb_queue_splice() Jens Axboe
2025-11-21 8:53 ` Günther Noack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox