On 10/11/2015 07:49 PM, Christoph Lameter wrote: > On Sun, 11 Oct 2015, Sagi Grimberg wrote: > >> Is someone looking at this? It really should be fixed before 4.3 >> final... > > The following fixup patch is needed: Thanks Christoph. I figured the issue had to have come from the new code, but I hadn't had a chance to track it down yet. > > > Subject: ipoib: For sendonly join free the multicast group on leave > > When we leave the multicast group on expiration of a neighbor we > do not free the mcast structure. This results in a memory leak. > > Signed-off-by: Christoph Lameter <cl@xxxxxxxxx> > > Index: linux/drivers/infiniband/ulp/ipoib/ipoib.h > =================================================================== > --- linux.orig/drivers/infiniband/ulp/ipoib/ipoib.h > +++ linux/drivers/infiniband/ulp/ipoib/ipoib.h > @@ -495,6 +495,7 @@ void ipoib_dev_cleanup(struct net_device > void ipoib_mcast_join_task(struct work_struct *work); > void ipoib_mcast_carrier_on_task(struct work_struct *work); > void ipoib_mcast_send(struct net_device *dev, u8 *daddr, struct sk_buff *skb); > +void ipoib_mcast_free(struct ipoib_mcast *mc); > > void ipoib_mcast_restart_task(struct work_struct *work); > int ipoib_mcast_start_thread(struct net_device *dev); > Index: linux/drivers/infiniband/ulp/ipoib/ipoib_main.c > =================================================================== > --- linux.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c > +++ linux/drivers/infiniband/ulp/ipoib/ipoib_main.c > @@ -1207,8 +1207,10 @@ static void __ipoib_reap_neigh(struct ip > > out_unlock: > spin_unlock_irqrestore(&priv->lock, flags); > - list_for_each_entry_safe(mcast, tmcast, &remove_list, list) > + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { > ipoib_mcast_leave(dev, mcast); > + ipoib_mcast_free(mcast); > + } > } > > static void ipoib_reap_neigh(struct work_struct *work) > Index: linux/drivers/infiniband/ulp/ipoib/ipoib_multicast.c > =================================================================== > --- linux.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c > +++ linux/drivers/infiniband/ulp/ipoib/ipoib_multicast.c > @@ -106,7 +106,7 @@ static void __ipoib_mcast_schedule_join_ > queue_delayed_work(priv->wq, &priv->mcast_task, 0); > } > > -static void ipoib_mcast_free(struct ipoib_mcast *mcast) > +void ipoib_mcast_free(struct ipoib_mcast *mcast) > { > struct net_device *dev = mcast->dev; > int tx_dropped = 0; > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: 0E572FDD
Attachment:
signature.asc
Description: OpenPGP digital signature