summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
diff options
context:
space:
mode:
authorAlex Vesker <valex@mellanox.com>2017-09-24 21:46:33 +0300
committerDoug Ledford <dledford@redhat.com>2017-09-25 18:47:24 +0300
commit7c9d9662103ae1c11acc7bfc47d988466cff23cf (patch)
tree1bf5b71801a8895c4fc14c8df5c395aab5e8dac3 /drivers/infiniband/ulp/ipoib/ipoib_vlan.c
parent9c6f42e9254150d2772242d9f8bd8d0b7b7431ff (diff)
downloadlinux-7c9d9662103ae1c11acc7bfc47d988466cff23cf.tar.xz
IB/ipoib: Fix inconsistency with free_netdev and free_rdma_netdev
Call free_rdma_netdev instead of free_netdev each time we want to release a netdevice. This call is also relevant for future freeing of offloaded child interfaces. This patch also adds a missing call for free netdevice when releasing a parent interface that has child interfaces using ipoib_remove_one. Fixes: cd565b4b51e5 ('IB/IPoIB: Support acceleration options callbacks') Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_vlan.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_vlan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
index e01c58edca15..55a9b71ed05a 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
@@ -179,7 +179,10 @@ out:
mutex_unlock(&ppriv->sysfs_mutex);
if (result && priv) {
- free_netdev(priv->dev);
+ struct rdma_netdev *rn;
+
+ rn = netdev_priv(priv->dev);
+ rn->free_rdma_netdev(priv->dev);
kfree(priv);
}
@@ -232,7 +235,10 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
mutex_unlock(&ppriv->sysfs_mutex);
if (dev) {
- free_netdev(dev);
+ struct rdma_netdev *rn;
+
+ rn = netdev_priv(dev);
+ rn->free_rdma_netdev(priv->dev);
kfree(priv);
return 0;
}