netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Q: what protects dev->napi_list?
@ 2012-08-24  9:46 Cong Wang
  2012-08-24 10:12 ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Cong Wang @ 2012-08-24  9:46 UTC (permalink / raw)
  To: netdev; +Cc: Eric Dumazet, Sylvain Munaut, David Miller

Hi,

Sylvain reported a netpoll CPU stall
http://marc.info/?l=linux-netdev&m=134563282530588&w=2

I tried to provide some fix for it:
http://marc.info/?l=linux-netdev&m=134571069921429&w=2

When reviewing that code, I noticed a problem, it seems dev->napi_list
is not protected by any lock? What if the device driver calls
netif_napi_del() meanwhile we are iterating &dev->napi_list in
poll_napi()? It seems netif_napi_del()/netif_napi_add() are usually
called with the RTNL lock held during driver init/uninit, but again
poll_napi() doesn't have RTNL lock.

Am I missing anything?

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-25  6:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24  9:46 Q: what protects dev->napi_list? Cong Wang
2012-08-24 10:12 ` Eric Dumazet
2012-08-24 10:39   ` Cong Wang
2012-08-24 11:29     ` Eric Dumazet
2012-08-25  6:08       ` Cong Wang
2012-08-25  6:49         ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).