Re: [PATCH net 1/2] net: hns3: fix kernel crash problem in concurrent scenario

From: Simon Horman
Date: Thu Jun 06 2024 - 12:27:11 EST


On Wed, Jun 05, 2024 at 03:20:57PM +0800, Jijie Shao wrote:
> From: Yonglong Liu <liuyonglong@xxxxxxxxxx>
>
> When link status change, the nic driver need to notify the roce
> driver to handle this event, but at this time, the roce driver
> may uninit, then cause kernel crash.
>
> To fix the problem, when link status change, need to check
> whether the roce registered, and when uninit, need to wait link
> update finish.
>
> Fixes: 45e92b7e4e27 ("net: hns3: add calling roce callback function when link status change")
> Signed-off-by: Yonglong Liu <liuyonglong@xxxxxxxxxx>
> Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>