From: Kuniyuki Iwashima <kuniyu@google.com>
To: Wentao Guan <guanwentao@uniontech.com>
Cc: edumazet@google.com, ncardwell@google.com, kuba@kernel.org,
netdev@vger.kernel.org, melotti@google.com
Subject: Re: [PATCH net-next v2] tcp: cancel cloned request timers without waiting
Date: Sat, 21 Nov 2026 21:03:23 +0000 [thread overview]
Message-ID: <awIHB92bMoqKk-FA@google.com> (raw)
In-Reply-To: <72918C6B4A6E0CC7+20261120040954.57832-2-guanwentao@uniontech.com>
On Fri, 20 Nov 2026 12:09:55 +0800, Wentao Guan wrote:
> When a cloned request is migrated again, its timer has the same lockdep
> class as the running request callback. Using timer_delete_sync() through
> __inet_csk_reqsk_queue_drop(..., false) can therefore trigger a
> recursive-locking splat and disable lockdep.
>
> The clone is unhashed when inet_ehash_insert() fails, so
> reqsk_queue_unlink() is a no-op. Its timer is pinned to the current CPU,
> allowing it to be cancelled without waiting for its callback. Use
> timer_delete() and drop the timer reference directly instead of
> synchronously deleting it through the queue helper.
>
> This change depends on the request lifetime changes in
> commit 4e2b3ef19e0e ("inet: reject unhashed sockets during established lookups")
> Without them, __reqsk_free() frees nreq immediately and the pending
> timer can still trigger a UAF.
>
> Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
prev parent reply other threads:[~2026-11-21 21:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 4:09 [PATCH net-next v2] tcp: cancel cloned request timers without waiting Wentao Guan
2026-11-20 4:17 ` netdev-bot+sinfo
2026-11-21 21:03 ` Kuniyuki Iwashima [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=awIHB92bMoqKk-FA@google.com \
--to=kuniyu@google.com \
--cc=edumazet@google.com \
--cc=guanwentao@uniontech.com \
--cc=kuba@kernel.org \
--cc=melotti@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.