Jakub Kicinski 47e4bb147a net: sit: unregister_netdevice on newlink's error path
We need to unregister the netdevice if config failed.
.ndo_uninit takes care of most of the heavy lifting.

This was uncovered by recent commit c269a24ce057 ("net: make
free_netdev() more lenient with unregistering devices").
Previously the partially-initialized device would be left
in the system.

Reported-and-tested-by: syzbot+2393580080a2da190f04@syzkaller.appspotmail.com
Fixes: e2f1f072db8d ("sit: allow to configure 6rd tunnels via netlink")
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20210114012947.2515313-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-14 10:26:46 -08:00
..
2020-12-16 11:01:04 -08:00
2021-01-11 18:20:09 -08:00
2019-07-27 14:23:48 -07:00
2020-12-16 11:01:04 -08:00
2020-03-30 13:45:04 -07:00
2020-11-09 17:50:28 -08:00
2020-03-29 22:30:57 -07:00
2020-12-16 11:01:04 -08:00
2020-12-16 11:01:04 -08:00
2020-12-16 11:01:04 -08:00