Skip to content

eth: fix calling napi_enable() in atomic context

Jakub Kicinski linux-wireless netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 0 repliesApplied 7/7
  2. v27 patches 3 repliesSuperseded
  3. v17 patches 16 repliesSuperseded

Changes in v3 from the cover letter

- [patch 1] move the annotation
v2: https://lore.kernel.org/[email protected]
- [patch 1] correct commit msg (can't sleep -> needs to sleep)
- [patch 1] add re-locking annotation to tg3_irq_quiesce()
- [patch 6] actually switch to napi_enable_locked()
- [patch 7] reword the commit msg slightly
v1: https://lore.kernel.org/[email protected]

Patches in v3 All 7 applied

#Subject and filesSizeRepliesApplied
1/7eth: tg3: fix calling napi_enable() in atomic contextdrivers/net/ethernet/broadcom/tg3.c+31 -40 repliesApplied
2/7eth: forcedeth: remove local wrappers for napi enable/disabledrivers/net/ethernet/nvidia/forcedeth.c+8 -220 repliesApplied
3/7eth: forcedeth: fix calling napi_enable() in atomic contextdrivers/net/ethernet/nvidia/forcedeth.c+3 -10 repliesApplied
4/7eth: 8139too: fix calling napi_enable() in atomic contextdrivers/net/ethernet/realtek/8139too.c+3 -10 repliesApplied
5/7eth: niu: fix calling napi_enable() in atomic contextdrivers/net/ethernet/sun/niu.c+9 -10 repliesApplied
6/7eth: via-rhine: fix calling napi_enable() in atomic contextdrivers/net/ethernet/via/via-rhine.c+10 -10 repliesApplied
7/7wifi: mt76: move napi_enable() from under BHdrivers/net/wireless/mediatek/mt76/mt7603/mac.c drivers/net/wireless/mediatek/mt76/mt7615/pci.c drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c +9 more+69 -360 repliesApplied

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchEric DumazetMichael ChanZhu YanjunFrancois Romieu
1/7R-b R-b
2/7R-b A-b
3/7R-b A-b
4/7R-b A-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH net v3 0/7] eth: fix calling napi_enable() in atomic context

Dan has reported that I missed a lot of drivers which call napi_enable() in atomic with the naive coccinelle search for spin locks:
https://lore.kernel.org/[email protected]

Fix them. Most of the fixes involve taking the netdev_lock() before the spin lock. mt76 is special because we can just move napi_enable() from the BH section.

All patches compile tested only.

v3:
- [patch 1] move the annotation
v2: https://lore.kernel.org/[email protected]
- [patch 1] correct commit msg (can't sleep -> needs to sleep)
- [patch 1] add re-locking annotation to tg3_irq_quiesce()
- [patch 6] actually switch to napi_enable_locked()
- [patch 7] reword the commit msg slightly
v1: https://lore.kernel.org/[email protected]

Jakub Kicinski (7):
eth: tg3: fix calling napi_enable() in atomic context
eth: forcedeth: remove local wrappers for napi enable/disable
eth: forcedeth: fix calling napi_enable() in atomic context
eth: 8139too: fix calling napi_enable() in atomic context
eth: niu: fix calling napi_enable() in atomic context
eth: via-rhine: fix calling napi_enable() in atomic context
wifi: mt76: move napi_enable() from under BH

 drivers/net/ethernet/broadcom/tg3.c           | 35 ++++++++++++++++---
 drivers/net/ethernet/nvidia/forcedeth.c       | 32 ++++++-----------
 drivers/net/ethernet/realtek/8139too.c        |  4 ++-
 drivers/net/ethernet/sun/niu.c                | 10 +++++-
 drivers/net/ethernet/via/via-rhine.c          | 11 +++++-
 .../net/wireless/mediatek/mt76/mt7603/mac.c   |  9 +++--
 .../net/wireless/mediatek/mt76/mt7615/pci.c   |  8 +++--
 .../wireless/mediatek/mt76/mt7615/pci_mac.c   |  8 +++--
 .../net/wireless/mediatek/mt76/mt76x0/pci.c   |  8 +++--
 .../net/wireless/mediatek/mt76/mt76x02_mmio.c |  8 +++--
 .../net/wireless/mediatek/mt76/mt76x2/pci.c   |  7 ++--
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 17 ++++++---
 .../net/wireless/mediatek/mt76/mt7921/pci.c   |  7 ++--
 .../wireless/mediatek/mt76/mt7921/pci_mac.c   |  7 ++--
 .../net/wireless/mediatek/mt76/mt7925/pci.c   |  7 ++--
 .../wireless/mediatek/mt76/mt7925/pci_mac.c   |  7 ++--
 .../net/wireless/mediatek/mt76/mt7996/mac.c   | 12 +++----
 17 files changed, 132 insertions(+), 65 deletions(-)
Signature · 1 line
2.48.1