diff options
author | David S. Miller <davem@davemloft.net> | 2019-12-25 16:35:35 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-25 16:35:35 -0800 |
commit | 095e90e080a502e8737b8694c15f03f16d4df6ab (patch) | |
tree | 095f3a09eea4ceea5149f47bbccfb95ebbe4c9ad /drivers/scsi | |
parent | 57b948e2c9ce58e4fcb687bc285b5b5a2cc66640 (diff) | |
parent | 3ed0a1d563903bdb4b4c36c58c4d9c1bcb23a6e6 (diff) | |
download | linux-095e90e080a502e8737b8694c15f03f16d4df6ab.tar.bz2 |
Merge branch 'hsr-fix-several-bugs-in-hsr-module'
Taehee Yoo says:
====================
hsr: fix several bugs in hsr module
1. The first patch fixes debugfs warning when it's opened when hsr module
is being removed. debugfs file is opened, it tries to hold .owner module,
but it would print warning messages if it couldn't hold .owner module.
In order to avoid the warning message, this patch makes hsr module does
not set .owner. Unsetting .owner is safe because these are protected by
inode_lock().
2. The second patch fixes wrong error handling of hsr_dev_finalize()
a) hsr_dev_finalize() calls debugfs_create_{dir/file} to create debugfs.
it checks NULL pointer but debugfs don't return NULL so it's wrong code.
b) hsr_dev_finalize() calls register_netdevice(). so if it fails after
register_netdevice(), it should call unregister_netdevice().
But it doesn't.
c) debugfs doesn't affect any actual logic of hsr module.
So, the failure of creating of debugfs could be ignored.
3. The third patch adds hsr root debugfs directory.
When hsr interface is created, it creates debugfs directory in
/sys/kernel/debug/<interface name>.
It's a little bit faulty path because if an interface is the same with
another directory name in the same path, it will fail. If hsr root
directory is existing, the possibility of failure of creating debugfs
file will be reduced.
4. The fourth patch adds debugfs rename routine.
debugfs directory name is the same with hsr interface name.
So hsr interface name is changed, debugfs directory name should be
changed too.
5. The fifth patch fixes a race condition in node list add and del.
hsr nodes are protected by RCU and there is no write side lock.
But node insertions and deletions could be being operated concurrently.
So write side locking is needed.
6. The Sixth patch resets network header
Tap routine is enabled, below message will be printed.
[ 175.852292][ C3] protocol 88fb is buggy, dev veth0
hsr module doesn't set network header for supervision frame.
But tap routine validates network header.
If network header wasn't set, it resets and warns about it.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions