net: hns3: fix race conditions between reset and module loading & unloading
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 20 Jun 2019 08:52:43 +0000 (16:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jun 2019 15:59:02 +0000 (11:59 -0400)
commit7cf9c069430fce7142da7039cc453902df11259b
treeab1d1375355997dac7794ae5cdaaad265de13671
parent987b4ae78e4268d22b279f65d80cc541f9f0eb53
net: hns3: fix race conditions between reset and module loading & unloading

When loading or unloading module, it should wait for the reset task
done before it un-initializes the client, otherwise the reset task
may cause a NULL pointer reference.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h