Re: [PATCH V4 net 2/3] net: hns3: fix kernel crash when devlink reload during pf initialization
From: Simon Horman <horms@kernel.org>
Date: 2024-03-26 11:22:43
Also in:
lkml
From: Simon Horman <horms@kernel.org>
Date: 2024-03-26 11:22:43
Also in:
lkml
On Mon, Mar 25, 2024 at 08:43:10PM +0800, Jijie Shao wrote:
From: Yonglong Liu <redacted>
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 taking devl_lock during initialization.
Fixes: b741269b2759 ("net: hns3: add support for registering devlink for PF")
Signed-off-by: Yonglong Liu <redacted>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>Reviewed-by: Simon Horman <horms@kernel.org>