summaryrefslogtreecommitdiff
path: root/net/hsr/hsr_framereg.h
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2019-07-04 03:21:13 +0300
committerDavid S. Miller <davem@davemloft.net>2019-07-06 01:22:27 +0300
commitb9a1e627405d68d475a3c1f35e685ccfb5bbe668 (patch)
tree4130c796a3b6477e01126514e08f9cb2fc91f4b6 /net/hsr/hsr_framereg.h
parent619afef01f74f3572b5e9a266c1230dc83761eec (diff)
downloadlinux-b9a1e627405d68d475a3c1f35e685ccfb5bbe668.tar.xz
hsr: implement dellink to clean up resources
hsr_link_ops implements ->newlink() but not ->dellink(), which leads that resources not released after removing the device, particularly the entries in self_node_db and node_db. So add ->dellink() implementation to replace the priv_destructor. This also makes the code slightly easier to understand. Reported-by: syzbot+c6167ec3de7def23d1e8@syzkaller.appspotmail.com Cc: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_framereg.h')
-rw-r--r--net/hsr/hsr_framereg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/hsr/hsr_framereg.h b/net/hsr/hsr_framereg.h
index a3bdcdab469d..89a3ce38151d 100644
--- a/net/hsr/hsr_framereg.h
+++ b/net/hsr/hsr_framereg.h
@@ -12,7 +12,8 @@
struct hsr_node;
-void hsr_del_node(struct list_head *self_node_db);
+void hsr_del_self_node(struct list_head *self_node_db);
+void hsr_del_nodes(struct list_head *node_db);
struct hsr_node *hsr_add_node(struct list_head *node_db, unsigned char addr[],
u16 seq_out);
struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,