Commit 524c95c1 authored by Stephen Hemminger's avatar Stephen Hemminger

[TUN]: Driver not cleaning up on module remove.

parent 0ea123bf
......@@ -605,7 +605,18 @@ int __init tun_init(void)
void tun_cleanup(void)
{
struct net_device *dev, *nxt;
misc_deregister(&tun_miscdev);
rtnl_lock();
for (dev = dev_base; dev; dev = nxt) {
nxt = dev->next;
if (dev->init == tun_net_init)
unregister_netdevice(dev);
}
rtnl_unlock();
}
module_init(tun_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment