diff options
author | Brett Creeley <brett@pensando.io> | 2022-01-24 21:53:09 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-25 14:15:09 +0300 |
commit | 43cfed71bd528cdd07ae2e54e294d1a1972c210f (patch) | |
tree | adffb3c200eb021f7286548221927c40724fc6d8 /drivers/net/ethernet/pensando/ionic/ionic_lif.c | |
parent | 238a0f7c2c2135ef70b5e354d4fe937ec1b6c2b7 (diff) | |
download | linux-43cfed71bd528cdd07ae2e54e294d1a1972c210f.tar.xz |
ionic: disable napi when ionic_lif_init() fails
When the driver is going through reset, it will eventually call
ionic_lif_init(), which does a lot of re-initialization. One
of the re-initialization steps is to setup the adminq and
enable napi for it. If something breaks after this point
we can end up with a kernel NULL pointer dereference through
ionic_adminq_napi.
Fix this by making sure to call napi_disable() in the cleanup
path of ionic_lif_init(). This forces any pending napi contexts
to finish and prevents them from being recalled before deleting
the napi context.
Fixes: 77ceb68e29cc ("ionic: Add notifyq support")
Signed-off-by: Brett Creeley <brett@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_lif.c')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index adee1b129e92..c9535f4863ba 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -3266,6 +3266,7 @@ int ionic_lif_init(struct ionic_lif *lif) return 0; err_out_notifyq_deinit: + napi_disable(&lif->adminqcq->napi); ionic_lif_qcq_deinit(lif, lif->notifyqcq); err_out_adminq_deinit: ionic_lif_qcq_deinit(lif, lif->adminqcq); |