Re: [PATCH net] netdev: prevent accessing NAPI instances from another namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux