Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5941d079 authored by Roland Dreier's avatar Roland Dreier
Browse files

IPoIB: Free child interfaces properly



When deleting a child interface with a non-default P_Key via
/sys/class/net/ibX/delete_child, the interface must be freed with
free_netdev() (rather than kfree() on the private data).

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent a3285aa4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -158,10 +158,8 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
		if (priv->pkey == pkey) {
			unregister_netdev(priv->dev);
			ipoib_dev_cleanup(priv->dev);

			list_del(&priv->list);

			kfree(priv);
			free_netdev(priv->dev);

			ret = 0;
			break;