aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/ipoib
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.co.il>2006-01-10 07:42:14 -0800
committerRoland Dreier <rolandd@cisco.com>2006-01-10 07:42:14 -0800
commit70b4c8cdc168bb5d18e23fd205c4ede1b756a8b2 (patch)
tree029d149d2b25eae3b8ecf4dfa62e0b3c47c7db02 /drivers/infiniband/ulp/ipoib
parentcf311cd49a78f1e431787068cc31d29d06a415e6 (diff)
IPoIB: Fix error path in ipoib_mcast_dev_flush()
Don't leak memory on allocation failure for broadcast mcast group. Also, print a warning to match handling for other mcast groups. 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')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index ed0c2ead8bc..6c6db759e79 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -780,9 +780,11 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
&priv->multicast_tree);
list_add_tail(&priv->broadcast->list, &remove_list);
- }
-
- priv->broadcast = nmcast;
+ priv->broadcast = nmcast;
+ } else
+ ipoib_warn(priv, "could not reallocate broadcast group "
+ IPOIB_GID_FMT "\n",
+ IPOIB_GID_ARG(priv->broadcast->mcmember.mgid));
}
spin_unlock_irqrestore(&priv->lock, flags);