[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170516095106.GC4156@localhost>
Date: Tue, 16 May 2017 11:51:06 +0200
From: Miroslav Lichvar <mlichvar@...hat.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Network Development <netdev@...r.kernel.org>,
Richard Cochran <richardcochran@...il.com>,
Willem de Bruijn <willemb@...gle.com>,
Soheil Hassas Yeganeh <soheil@...gle.com>,
"Keller, Jacob E" <jacob.e.keller@...el.com>,
Denny Page <dennypage@...com>, Jiri Benc <jbenc@...hat.com>
Subject: Re: [PATCH v2 net-next 3/7] net: add function to retrieve original
skb device using NAPI ID
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 <mlichvar@...hat.com> 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
Powered by blists - more mailing lists