]> www.infradead.org Git - users/dwmw2/linux.git/commit
hsr: implement dellink to clean up resources
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 4 Jul 2019 00:21:13 +0000 (17:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:51 +0000 (10:23 +0200)
commit08523d5a2f4a9e4202e00d282c164d453cabe2d2
tree5d4de8a0e98c9bcaa781334b6d003db59ba3a662
parenta282179be74711a8fceab4f8dcf592959a15bb7f
hsr: implement dellink to clean up resources

commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/hsr/hsr_device.c
net/hsr/hsr_device.h
net/hsr/hsr_framereg.c
net/hsr/hsr_framereg.h
net/hsr/hsr_netlink.c