Subject: Re: [PATCH v2 net-next 3/7] net: add function to retrieve original skb device using NAPI ID

From: Miroslav Lichvar <[email-masked]>
Date: Tue, 16 May 2017 11:51:06 +0200

On Tue, May 02, 2017 at 12:16:13PM -0400, Willem de Bruijn wrote:
> On Tue, May 2, 2017 at 6:10 AM, Miroslav Lichvar <[email-masked]> wrote:
> >  /**
> > + *     dev_get_by_napi_id - find a device by napi_id
> > + *     @napi_id: ID of the NAPI struct
> > + *
> > + *     Search for an interface by NAPI ID. Returns %NULL if the device
> > + *     is not found or a pointer to the device. The device has not had
> > + *     its reference counter increased so the caller must be careful
> > + *     about locking. The caller must hold RCU lock.
> 
> Instead of a comment, can check with
> 
>   WARN_ON_ONCE(!rcu_read_lock_held());

The other dev_get_* functions have the same comment, so I think it's
better to keep it for consistency. I'll add the warning and sent
a new series with the other changes you have suggested.

Thanks,

-- 
Miroslav Lichvar