Re: [net-next v5 5/9] net: napi: Add napi_config

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

 



On Thu, Oct 10, 2024 at 06:20:57AM +0200, Eric Dumazet wrote:
> On Wed, Oct 9, 2024 at 2:56 AM Joe Damato <jdamato@xxxxxxxxxx> wrote:

[...]

> > +
> > +static void napi_hash_add_with_id(struct napi_struct *napi,
> > +                                 unsigned int napi_id)
> > +{
> > +       spin_lock(&napi_hash_lock);
> > +       __napi_hash_add_with_id(napi, napi_id);
> 
> Hmmm... there is no check if 'napi_id' is already used and hashed.
> 
> I would add
> 
> WARN_ON_ONCE(napi_by_id(napi_id));

Thanks for the careful review, Eric.

I agree that adding this is a good idea and I will do so for the v6.

Jakub: I hope that it's OK if I retain your Reviewed-by tag as the
change Eric suggested is a minor one?

If you'd prefer I drop your Reviewed-by from this one, please let me
know.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux