From: Ruiqiang Hao <ruiqiang....@windriver.com>

For SMQVF function, reset_task work queue is uninitialized, if we cancel
this work queue, following calltrace will be caused because work->func is
NULL. There is no need to cancel reset_task work queue for SMQVF function.

WARNING: CPU: 2 PID: 1 at kernel/workqueue.c:3038 __flush_work+0x10c/0x120
CPU: 2 PID: 1 Comm: systemd-shutdow Not tainted 5.10.76-yocto-standard #1
Hardware name: Marvell OcteonTX CN96XX board (DT)
pstate: 60400009 (nZCv daif +PAN UAO -TCO BTYPE=-)
pc : __flush_work+0x10c/0x120
lr : __cancel_work_timer+0x154/0x1c4
sp : ffff8000140efa90
x29: ffff8000140efa90 x28: ffff0001024c0040
x27: 0000000000000000 x26: ffff80001143e290
x25: 0000000000000001 x24: ffff0001024c0040
x23: 0000000000000000 x22: 0000000000000000
x21: 0000000000000000 x20: ffff00014c627958
x19: 0000000000000001 x18: ffffffffffffffff
x17: 0000000000000000 x16: 0000000000000006
x15: ffff800013196a20 x14: 2820303030303030
x13: 3030303030303030 x12: 303020746e657261
x11: 00000000000000f1 x10: 000000007b31403b
x9 : ffff8000100696f4 x8 : ffff8000126b68f0
x7 : 0000000000000000 x6 : ffff800011d4c000
x5 : ffff800011d4c730 x4 : 0000000000000003
x3 : 0000000000000000 x2 : ffff0001024c0040
x1 : 0000000000000001 x0 : 0000000000000000
Call trace:
__flush_work+0x10c/0x120
__cancel_work_timer+0x154/0x1c4
cancel_work_sync+0x20/0x2c
otx2vf_remove+0x3c/0x140
pci_device_shutdown+0x40/0x50
device_shutdown+0x140/0x30c
kernel_power_off+0x44/0x80
__do_sys_reboot+0x170/0x270
__arm64_sys_reboot+0x30/0x40
el0_svc_common.constprop.0+0x88/0x1a0
do_el0_svc+0x34/0xc0
el0_svc+0x20/0x30
el0_sync_handler+0xa4/0x150
el0_sync+0x180/0x1c0
irq event stamp: 14562824

Signed-off-by: Ruiqiang Hao <ruiqiang....@windriver.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c 
b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
index 59162267969d..067f222f2502 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
@@ -774,10 +774,9 @@ static void otx2vf_remove(struct pci_dev *pdev)
 
        vf = netdev_priv(netdev);
 
-       cancel_work_sync(&vf->reset_task);
-
        if (otx2smqvf_remove(vf)) {
                otx2_unregister_dl(vf);
+               cancel_work_sync(&vf->reset_task);
                unregister_netdev(netdev);
        }
 
-- 
2.32.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#10730): 
https://lists.yoctoproject.org/g/linux-yocto/message/10730
Mute This Topic: https://lists.yoctoproject.org/mt/87608516/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to