]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 12:59:05 +0000 (13:59 +0100)
[ Upstream commit f111606b63ff2282428ffbac0447c871eb957b6c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7de10342fe14932deaac290663f1d1a771426694)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/net/ethernet/marvell/mv643xx_eth.c

index 90fd5588e20ddc529e3cc71ceaa15400cab361e7..fc67e9d31f6da76f10a44f96d8b8452440cf4ab6 100644 (file)
@@ -2477,6 +2477,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;