]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: hns3: fix kernel crash when devlink reload during initialization
authorYonglong Liu <liuyonglong@huawei.com>
Tue, 7 May 2024 13:42:24 +0000 (21:42 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 9 May 2024 08:47:32 +0000 (10:47 +0200)
commit35d92abfbad88cf947c010baf34b075e40566095
tree12df9eccf87e84f01b62ea2b68c53959c7bbea2f
parentf5db7a3b65c84d723ca5e2bb6e83115180ab6336
net: hns3: fix kernel crash when devlink reload during initialization

The devlink reload process will access the hardware resources,
but the register operation is done before the hardware is initialized.
So, processing the devlink reload during initialization may lead to kernel
crash.

This patch fixes this by registering the devlink after
hardware initialization.

Fixes: cd6242991d2e ("net: hns3: add support for registering devlink for VF")
Fixes: 93305b77ffcb ("net: hns3: fix kernel crash when devlink reload during pf initialization")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c