netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/6] hsr: fix several bugs in hsr module
@ 2019-12-22 11:24 Taehee Yoo
  2019-12-26  0:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2019-12-22 11:24 UTC (permalink / raw)
  To: davem, arvid.brodin, jakub.kicinski, netdev; +Cc: ap420073

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.

Taehee Yoo (6):
  hsr: avoid debugfs warning message when module is remove
  hsr: fix error handling routine in hsr_dev_finalize()
  hsr: add hsr root debugfs directory
  hsr: rename debugfs file when interface name is changed
  hsr: fix a race condition in node list insertion and deletion
  hsr: reset network header when supervision frame is created

 net/hsr/hsr_debugfs.c  | 52 +++++++++++++++++++++++-------
 net/hsr/hsr_device.c   | 28 +++++++++-------
 net/hsr/hsr_framereg.c | 73 ++++++++++++++++++++++++++----------------
 net/hsr/hsr_framereg.h |  6 ++--
 net/hsr/hsr_main.c     |  6 +++-
 net/hsr/hsr_main.h     | 22 +++++++++----
 net/hsr/hsr_netlink.c  |  1 +
 7 files changed, 125 insertions(+), 63 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net 0/6] hsr: fix several bugs in hsr module
  2019-12-22 11:24 [PATCH net 0/6] hsr: fix several bugs in hsr module Taehee Yoo
@ 2019-12-26  0:35 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-26  0:35 UTC (permalink / raw)
  To: ap420073; +Cc: arvid.brodin, jakub.kicinski, netdev


Series applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-26  0:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-22 11:24 [PATCH net 0/6] hsr: fix several bugs in hsr module Taehee Yoo
2019-12-26  0:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).