]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 9 Nov 2022 02:54:32 +0000 (10:54 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 10 Nov 2022 12:30:01 +0000 (13:30 +0100)
When failed to init rxq or txq in mv643xx_eth_open() for opening device,
napi isn't disabled. When open mv643xx_eth device next time, it will
trigger a BUG_ON() in napi_enable(). Compile tested only.

Fixes: 2257e05c1705 ("mv643xx_eth: get rid of receive-side locking")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221109025432.80900-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/mv643xx_eth.c

index 707993b445d1e2ff0baea4d7943949364a56fbc0..8941f69d93e9c3454dfb055a08b560aa318223c4 100644 (file)
@@ -2481,6 +2481,7 @@ out_free:
        for (i = 0; i < mp->rxq_count; i++)
                rxq_deinit(mp->rxq + i);
 out:
+       napi_disable(&mp->napi);
        free_irq(dev->irq, dev);
 
        return err;