acrn-kernel/net/hsr
Cong Wang 311633b604 hsr: switch ->dellink() to ->ndo_uninit()
Switching from ->priv_destructor to dellink() has an unexpected
consequence: existing RCU readers, that is, hsr_port_get_hsr()
callers, may still be able to read the port list.

Instead of checking the return value of each hsr_port_get_hsr(),
we can just move it to ->ndo_uninit() which is called after
device unregister and synchronize_net(), and we still have RTNL
lock there.

Fixes: b9a1e62740 ("hsr: implement dellink to clean up resources")
Fixes: edf070a0fb ("hsr: fix a NULL pointer deref in hsr_dev_xmit()")
Reported-by: syzbot+097ef84cdc95843fbaa8@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>
2019-07-11 14:37:45 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
hsr_debugfs.c net: hsr: fix debugfs path to support multiple interfaces 2019-04-15 17:22:02 -07:00
hsr_device.c hsr: switch ->dellink() to ->ndo_uninit() 2019-07-11 14:37:45 -07:00
hsr_device.h hsr: switch ->dellink() to ->ndo_uninit() 2019-07-11 14:37:45 -07:00
hsr_forward.c net: hsr: add tx stats for master interface 2019-04-15 17:22:02 -07:00
hsr_forward.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
hsr_framereg.c hsr: implement dellink to clean up resources 2019-07-05 15:22:27 -07:00
hsr_framereg.h hsr: implement dellink to clean up resources 2019-07-05 15:22:27 -07:00
hsr_main.c net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
hsr_main.h net: hsr: fix debugfs path to support multiple interfaces 2019-04-15 17:22:02 -07:00
hsr_netlink.c hsr: switch ->dellink() to ->ndo_uninit() 2019-07-11 14:37:45 -07:00
hsr_netlink.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
hsr_slave.c hsr: fix a memory leak in hsr_del_port() 2019-07-05 15:22:27 -07:00
hsr_slave.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00