mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 23:47:06 +00:00
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: [email protected] Cc: Arvid Brodin <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>