diff options
author | Eli Cohen <eli@mellanox.co.il> | 2006-01-13 01:32:20 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-13 01:32:20 +0300 |
commit | 988bd50300ef2e2d5cb8563e2ac99453dd9acd86 (patch) | |
tree | 2ffc52fb4b88a8c9299306880d07062947ce3b32 /drivers/infiniband/ulp/ipoib/ipoib_ib.c | |
parent | 78bfe0b5b67fe126ed98608e42e42fb6ed9aabd4 (diff) | |
download | linux-988bd50300ef2e2d5cb8563e2ac99453dd9acd86.tar.xz |
IPoIB: Fix memory leak of multicast group structures
The current handling of multicast groups in IPoIB ends up never
freeing send-only multicast groups. It turns out the logic was much
more complicated than it needed to be; we can fix this bug and
completely kill ipoib_mcast_dev_down() at the same time.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 23885801b6d2..f7e848970794 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -453,17 +453,8 @@ int ipoib_ib_dev_down(struct net_device *dev) } ipoib_mcast_stop_thread(dev, 1); - - /* - * Flush the multicast groups first so we stop any multicast joins. The - * completion thread may have already died and we may deadlock waiting - * for the completion thread to finish some multicast joins. - */ ipoib_mcast_dev_flush(dev); - /* Delete broadcast and local addresses since they will be recreated */ - ipoib_mcast_dev_down(dev); - ipoib_flush_paths(dev); return 0; @@ -624,9 +615,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev) ipoib_dbg(priv, "cleaning up ib_dev\n"); ipoib_mcast_stop_thread(dev, 1); - - /* Delete the broadcast address and the local address */ - ipoib_mcast_dev_down(dev); + ipoib_mcast_dev_flush(dev); ipoib_transport_dev_cleanup(dev); } |