Skip to content

Commit

Permalink
e1000e: panic caused by Rx traffic arriving while interface going down
Browse files Browse the repository at this point in the history
An "unable to handle kernel paging request" panic can occur when receiving
traffic while the interface is going down.  Wait for NAPI to be done with
current context after disabling interrupts and then disable NAPI.

See https://bugzilla.vyatta.com/show_bug.cgi?id=8837.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Apr 26, 2013
1 parent 73e3dd6 commit a3b87a4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4016,6 +4016,8 @@ void e1000e_down(struct e1000_adapter *adapter)

e1000_irq_disable(adapter);

napi_synchronize(&adapter->napi);

del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer);

Expand Down Expand Up @@ -4372,12 +4374,13 @@ static int e1000_close(struct net_device *netdev)

pm_runtime_get_sync(&pdev->dev);

napi_disable(&adapter->napi);

if (!test_bit(__E1000_DOWN, &adapter->state)) {
e1000e_down(adapter);
e1000_free_irq(adapter);
}

napi_disable(&adapter->napi);

e1000_power_down_phy(adapter);

e1000e_free_tx_resources(adapter->tx_ring);
Expand Down

0 comments on commit a3b87a4

Please sign in to comment.