Re: [RFC PATCH] lockdep: Keep dynamic key hash nodes in lockdep-owned storage
From: Davide Caratti
Date: Wed Oct 28 2026 - 10:27:46 EST
On Wed, Oct 28, 2026 at 04:44:49AM -0700, Vlad Poenaru wrote:
> On Mon, Oct 26, 2026 at 07:07:39AM -0700, Boqun Feng wrote: > Yeah, I
> If the qdisc case should be narrowed anyway, net/sched could skip the
> key for pfifo_fast, the only qdisc with TCQ_F_NOLOCK in its
> static_flags, as it already does for ingress, clsact and noqueue.
I was tempted to do ^^ this in the past, but then I gave up because
TCQ_F_NOLOCK can theoretically flip [1]. So I was afraid there was one
(remote, but still possible) situation where pfifo would use the qdisc
lock with no lockdep annotation.
> takes q.lock only around its requeue lists (gso_skb, skb_bad_txq) and in
> control paths, never across a nested transmit, so I don't think that
> brings back the mirred false positive from af0cb3fa3f9e, but netdev
> would have to agree.
maybe this doesn't happen for real, because only non-root pfifos would
have TCQ_F_NOLOCK bit cleared. But I wasn't 100% sure, and also afraid
of causing troubles on qdisc dismantle - so I decided to settle with a
better though sub-optimal allocation of dynamic keys for pfifo. If we are
sure that pfifos never use their qdisc root lock, I'm ok for a patch that
avoids registering dynamic keys like it happens for clsact.
--
davide
[1] https://elixir.bootlin.com/linux/v7.3/source/net/sched/sch_api.c#L1198