]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix the concurrency between functions reading debugfs
authorYufeng Mo <moyufeng@huawei.com>
Wed, 30 Mar 2022 13:45:05 +0000 (21:45 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 31 Mar 2022 09:39:59 +0000 (11:39 +0200)
commit9c6ef7d37811d33fdcab47c4f38602593e6049fd
tree1562ce7225991d42966a865ff80d5bcc0dd84b20
parentb9f2b7dad74a599e367c5269d19839dcd620a997
net: hns3: fix the concurrency between functions reading debugfs

Currently, the debugfs mechanism is that all functions share a
global variable to save the pointer for obtaining data. When
different functions concurrently access the same file node,
repeated release exceptions occur. Therefore, the granularity
of the pointer for storing the obtained data is adjusted to be
private for each function.

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: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h