mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Bui Viet Dung <dungvn2345@gmail.com>, Jens Axboe <axboe@kernel.dk>
Cc: Willem de Bruijn <willemb@google.com>, lollipopkit <a@lolli.tech>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] io_uring/cmd_net: prevent infinite retry loop on unextractable timestamp skb
Date: Wed, 14 Oct 2026 02:14:16 +0100	[thread overview]
Message-ID: <86ae9136-3413-45b2-99b0-fbe404ef1b39@gmail.com> (raw)
In-Reply-To: <6ac7afc4.cf15ae49.1a8a2a.2a55@mx.google.com>

n 10/8/26 15:59, Bui Viet Dung wrote:
> On Thu, Oct 8, 2026 at 3:43 PM Pavel Begunkov <asml.silence@gmail.com> wrote:
>> Sounds fine since there are only timestamp skbs in this list, do
>> you have a test case?
> 
> Hi Pavel,
> 
> Thanks for the review.
> 
> The issue was spotted during code inspection of the error handling path
> in io_uring_cmd_timestamp(): specifically when skb_get_tx_timestamp() returns
> a negative error (e.g. -ENOENT due to missing PHC bindings with
> SOF_TIMESTAMPING_BIND_PHC or unavailable timestamp data). Since the
> multishot apoll remains armed on EPOLLERR and the unhandled skb is spliced
> back onto the head of sk_error_queue, it immediately re-triggers the command
> in a tight busy-loop.
> 
> Below is a standalone test program demonstrating the TX_TIMESTAMP command
> setup and execution with CQE32:

Did you actually reproduce it? This program doesn't for me, nor does
fault injection. Taking a look at the code, io_uring_cmd_timestamp()
returns -EAGAIN, and the request will wait for the next wake up in the
polling code. There are bits to improve, but that's not an infinite loop.

-- 
Pavel Begunkov


      parent reply	other threads:[~2026-10-14  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  5:07 Bui Viet Dung
2026-10-08 14:43 ` Pavel Begunkov
2026-10-08 14:59   ` Bui Viet Dung
2026-10-09 11:48     ` Pavel Begunkov
2026-10-14  1:14     ` Pavel Begunkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ae9136-3413-45b2-99b0-fbe404ef1b39@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=a@lolli.tech \
    --cc=axboe@kernel.dk \
    --cc=dungvn2345@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®