]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix race condition in debugfs
authorYufeng Mo <moyufeng@huawei.com>
Fri, 10 Dec 2021 13:09:34 +0000 (21:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Dec 2021 16:20:50 +0000 (16:20 +0000)
commitd7b3aa8c823d8359bcb96ee91eefc84b9dde1a80
tree16215f2ff55af1577640dc72fbc103b3bc1829b3
parent541fdce060ba9ad7bb04d90d3db79356b2cb2e39
net: hns3: fix race condition in debugfs

When multiple threads concurrently access the debugfs content, data
and pointer exceptions may occur. Therefore, mutex lock protection is
added for debugfs.

Fixes: 9ac2271d66e1 ("net: hns3: refactor the debugfs process")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c