Patchwork sunvnet: vnet_port_remove must call unregister_netdev

login
register
mail settings
Submitter Dave Kleikamp
Date July 1, 2013, 9:49 p.m.
Message ID <51D1F962.1020409@oracle.com>
Download mbox | patch
Permalink /patch/256228/
State Accepted
Delegated to: David Miller
Headers show

Comments

Dave Kleikamp - July 1, 2013, 9:49 p.m.
The missing call to unregister_netdev() leaves the interface active
after the driver is unloaded by rmmod.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
---
 drivers/net/ethernet/sun/sunvnet.c | 2 ++
 1 file changed, 2 insertions(+)
David Miller - July 10, 2013, 8:42 p.m.
From: Dave Kleikamp <dave.kleikamp@oracle.com>
Date: Mon, 01 Jul 2013 16:49:22 -0500

> The missing call to unregister_netdev() leaves the interface active
> after the driver is unloaded by rmmod.
> 
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 1df0ff3..3df5684 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1239,6 +1239,8 @@  static int vnet_port_remove(struct vio_dev *vdev)
 		dev_set_drvdata(&vdev->dev, NULL);
 
 		kfree(port);
+
+		unregister_netdev(vp->dev);
 	}
 	return 0;
 }