Commit 1b550da
net: hns3: fix kernel crash when devlink reload during pf initialization
[ Upstream commit 93305b7 ]
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: b741269 ("net: hns3: add support for registering devlink for PF")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent b033da1 commit 1b550da
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11614 | 11614 | | |
11615 | 11615 | | |
11616 | 11616 | | |
| 11617 | + | |
| 11618 | + | |
11617 | 11619 | | |
11618 | 11620 | | |
11619 | 11621 | | |
| |||
11793 | 11795 | | |
11794 | 11796 | | |
11795 | 11797 | | |
| 11798 | + | |
11796 | 11799 | | |
11797 | 11800 | | |
11798 | 11801 | | |
| |||
11805 | 11808 | | |
11806 | 11809 | | |
11807 | 11810 | | |
| 11811 | + | |
11808 | 11812 | | |
11809 | 11813 | | |
11810 | 11814 | | |
| |||
0 commit comments