Message ID | 20240325183627.7641-1-davthompson@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f7442a634ac06b953fc1f7418f307b25acd4cfbc |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v3] mlxbf_gige: call request_irq() after NAPI initialized | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 25 Mar 2024 14:36:27 -0400 you wrote: > The mlxbf_gige driver encounters a NULL pointer exception in > mlxbf_gige_open() when kdump is enabled. The sequence to reproduce > the exception is as follows: > a) enable kdump > b) trigger kdump via "echo c > /proc/sysrq-trigger" > c) kdump kernel executes > d) kdump kernel loads mlxbf_gige module > e) the mlxbf_gige module runs its open() as the > the "oob_net0" interface is brought up > f) mlxbf_gige module will experience an exception > during its open(), something like: > > [...] Here is the summary with links: - [net,v3] mlxbf_gige: call request_irq() after NAPI initialized https://git.kernel.org/netdev/net/c/f7442a634ac0 You are awesome, thank you!
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c index cef0e2d3f1a7..77134ca92938 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -139,13 +139,10 @@ static int mlxbf_gige_open(struct net_device *netdev) control |= MLXBF_GIGE_CONTROL_PORT_EN; writeq(control, priv->base + MLXBF_GIGE_CONTROL); - err = mlxbf_gige_request_irqs(priv); - if (err) - return err; mlxbf_gige_cache_stats(priv); err = mlxbf_gige_clean_port(priv); if (err) - goto free_irqs; + return err; /* Clear driver's valid_polarity to match hardware, * since the above call to clean_port() resets the @@ -166,6 +163,10 @@ static int mlxbf_gige_open(struct net_device *netdev) napi_enable(&priv->napi); netif_start_queue(netdev); + err = mlxbf_gige_request_irqs(priv); + if (err) + goto napi_deinit; + /* Set bits in INT_EN that we care about */ int_en = MLXBF_GIGE_INT_EN_HW_ACCESS_ERROR | MLXBF_GIGE_INT_EN_TX_CHECKSUM_INPUTS | @@ -182,14 +183,17 @@ static int mlxbf_gige_open(struct net_device *netdev) return 0; +napi_deinit: + netif_stop_queue(netdev); + napi_disable(&priv->napi); + netif_napi_del(&priv->napi); + mlxbf_gige_rx_deinit(priv); + tx_deinit: mlxbf_gige_tx_deinit(priv); phy_deinit: phy_stop(phydev); - -free_irqs: - mlxbf_gige_free_irqs(priv); return err; }