Skip to content

Commit

Permalink
IPoIB: Free child interfaces properly
Browse files Browse the repository at this point in the history
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: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed May 10, 2006
1 parent a3285aa commit 5941d07
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/infiniband/ulp/ipoib/ipoib_vlan.c
Expand Up @@ -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;
Expand Down

0 comments on commit 5941d07

Please sign in to comment.