diff options
author | Taehee Yoo <ap420073@gmail.com> | 2019-12-22 11:26:27 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-25 16:35:35 -0800 |
commit | c6c4ccd7f96993e106dfea7ef18127f972f2db5e (patch) | |
tree | c3f81377fab61c6a1af64f830ea7f2bc15b68357 /net/hsr/hsr_netlink.c | |
parent | 1d19e2d53e8ed9e4c98fc95e0067492cda7288b0 (diff) | |
download | linux-stable-c6c4ccd7f96993e106dfea7ef18127f972f2db5e.tar.gz linux-stable-c6c4ccd7f96993e106dfea7ef18127f972f2db5e.tar.bz2 linux-stable-c6c4ccd7f96993e106dfea7ef18127f972f2db5e.zip |
hsr: add hsr root debugfs directory
In current hsr code, when hsr interface is created, it creates debugfs
directory /sys/kernel/debug/<interface name>.
If there is same directory or file name in there, it fails.
In order to reduce possibility of failure of creation of debugfs,
this patch adds root directory.
Test commands:
ip link add dummy0 type dummy
ip link add dummy1 type dummy
ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1
Before this patch:
/sys/kernel/debug/hsr0/node_table
After this patch:
/sys/kernel/debug/hsr/hsr0/node_table
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_netlink.c')
-rw-r--r-- | net/hsr/hsr_netlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c index 8f8337f893ba..8dc0547f01d0 100644 --- a/net/hsr/hsr_netlink.c +++ b/net/hsr/hsr_netlink.c @@ -476,6 +476,7 @@ int __init hsr_netlink_init(void) if (rc) goto fail_genl_register_family; + hsr_debugfs_create_root(); return 0; fail_genl_register_family: |