Re: [PATCH net-next 1/2] lockdep: Introduce lockdep_unregister_key_nosync()

From: Eric Dumazet

Date: Mon Oct 19 2026 - 13:44:51 EST


Le lun. 19 oct. 2026 à 19:02, Vlad Poenaru <vlad.wing@xxxxxxxxx> a écrit :
>
> From: Bart Van Assche <bvanassche@xxxxxxx>
>
> Add a variant of lockdep_unregister_key() that neither sleeps nor waits
> for an RCU grace period. Instead the caller must make sure that a grace
> period elapses after the call before the memory holding the key is
> freed or reused.
>
> That lets callers that already free the key's memory with call_rcu() or
> kfree_rcu() avoid waiting for a second grace period. The qdisc code is
> such a caller: all qdiscs except ingress, clsact and noqueue embed a
> dynamic lockdep key and are freed with call_rcu(), and replacing an mq
> root on a multi-queue NIC destroys one qdisc per TX queue under RTNL,
> each currently waiting for its own expedited grace period.
>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: Waiman Long <longman@xxxxxxxxxx>
> Cc: Boqun Feng <boqun@xxxxxxxxxx>
> Link: https://lore.kernel.org/all/20250203175939.3133477-2-bvanassche@xxxxxxx/
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> [vlad: rebase onto synchronize_rcu_expedited(), spell out the grace
> period requirement in the comments and changelog, describe the qdisc
> use case]
> Signed-off-by: Vlad Poenaru <vlad.wing@xxxxxxxxx>

Acked-by: Eric Dumazet <edumazet@xxxxxxxxx>

Thanks.