aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hnae3.h
diff options
context:
space:
mode:
authorYufeng Mo <moyufeng@huawei.com>2022-03-30 21:45:05 +0800
committerPaolo Abeni <pabeni@redhat.com>2022-03-31 11:39:59 +0200
commit9c9a04212fa380d2e7d1412bb281309955c0a781 (patch)
tree1562ce7225991d42966a865ff80d5bcc0dd84b20 /drivers/net/ethernet/hisilicon/hns3/hnae3.h
parentMerge branch 'docs-update-and-move-the-netdev-faq' (diff)
downloadlinux-dev-9c9a04212fa380d2e7d1412bb281309955c0a781.tar.xz
linux-dev-9c9a04212fa380d2e7d1412bb281309955c0a781.zip
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: 5e69ea7ee2a6 ("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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hnae3.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hnae3.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index d44dd7091fa1..79c64f4e67d2 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -845,6 +845,7 @@ struct hnae3_handle {
struct dentry *hnae3_dbgfs;
/* protects concurrent contention between debugfs commands */
struct mutex dbgfs_lock;
+ char **dbgfs_buf;
/* Network interface message level enabled bits */
u32 msg_enable;