netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: fix netpoll crash with bnxt
@ 2020-08-26 19:40 Jakub Kicinski
  2020-08-26 19:40 ` [PATCH net 1/2] net: disable netpoll on fresh napis Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jakub Kicinski @ 2020-08-26 19:40 UTC (permalink / raw)
  To: davem; +Cc: eric.dumazet, michael.chan, netdev, kernel-team, Jakub Kicinski

Hi!

Rob run into crashes when using XDP on bnxt. Upon investigation
it turns out that during driver reconfig irq core produces
a warning message when IRQs are requested. This triggers netpoll,
which in turn accesses uninitialized driver state. Same crash can
also be triggered on this platform by changing the number of rings.

Looks like we have two missing pieces here, netif_napi_add() has
to make sure we start out with netpoll blocked. The driver also
has to be more careful about when napi gets enabled.

Tested XDP and channel count changes, the warning message no longer
causes a crash. Not sure if the memory barriers added in patch 1
are necessary, but it seems we should have them.

Jakub Kicinski (2):
  net: disable netpoll on fresh napis
  bnxt: don't enable NAPI until rings are ready

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++--------
 net/core/dev.c                            |  3 ++-
 net/core/netpoll.c                        |  2 +-
 3 files changed, 7 insertions(+), 10 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-08-27 22:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-26 19:40 [PATCH net 0/2] net: fix netpoll crash with bnxt Jakub Kicinski
2020-08-26 19:40 ` [PATCH net 1/2] net: disable netpoll on fresh napis Jakub Kicinski
2020-08-27  7:25   ` Eric Dumazet
2020-08-27 15:10     ` Jakub Kicinski
2020-08-27 15:43       ` Eric Dumazet
2020-08-27 17:47         ` Jakub Kicinski
2020-08-27 22:32           ` [RFC -next 0/3] " Jakub Kicinski
2020-08-27 22:32             ` [RFC -next 1/3] net: remove napi_hash_del() from driver-facing API Jakub Kicinski
2020-08-27 22:32             ` [RFC -next 2/3] net: manage napi add/del idempotence explicitly Jakub Kicinski
2020-08-27 22:32             ` [RFC -next 3/3] net: make sure napi_list is safe for RCU traversal Jakub Kicinski
2020-08-26 19:40 ` [PATCH net 2/2] bnxt: don't enable NAPI until rings are ready Jakub Kicinski
2020-08-26 20:23   ` Michael Chan
2020-08-26 23:17 ` [PATCH net 0/2] net: fix netpoll crash with bnxt David Miller

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).