Skip to content

net: fix netpoll crash with bnxt

Jakub Kicinski netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: disable netpoll on fresh napisnet/core/dev.c net/core/netpoll.c+3 -28 replies
2/2bnxt: don't enable NAPI until rings are readydrivers/net/ethernet/broadcom/bnxt/bnxt.c+4 -81 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMichael Chan
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/2] net: fix netpoll crash with bnxt

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(-)
Signature · 1 line
2.26.2