Jakub Kicinski wrote: > On Tue, 07 Jan 2025 08:10:36 -0500 Willem de Bruijn wrote: > > > +/* must be called under rcu_read_lock(), as we dont take a reference */ > > > > Instead of function comments, invariant checks in code? > > > > Like in dev_get_by_napi_id: > > > > WARN_ON_ONCE(!rcu_read_lock_held()); > > Can I do it as a follow up? Adding the warning to napi_by_id() > reveals that napi_hash_add() currently walks the list without > holding the RCU lock :) Ah I should have noticed that :) Of course, or ignore in this case then.