All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
	Sagi Grimberg
	<sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: Seeing WARN_ON in ib_dealloc_pd from ipoib in kernel 4.3-rc1-debug
Date: Mon, 12 Oct 2015 08:35:04 -0400	[thread overview]
Message-ID: <561BA8F8.9030002@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1510111848560.10812-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2913 bytes --]

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-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
> 
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

  parent reply	other threads:[~2015-10-12 12:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 15:51 Seeing WARN_ON in ib_dealloc_pd from ipoib in kernel 4.3-rc1-debug Sagi Grimberg
     [not found] ` <56153F71.2010801-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-10-07 16:11   ` Doug Ledford
     [not found]     ` <5615442D.2020007-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-11 15:51       ` Sagi Grimberg
     [not found]         ` <561A8591.4020608-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-10-11 23:49           ` Christoph Lameter
     [not found]             ` <alpine.DEB.2.20.1510111848560.10812-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-10-12  7:53               ` Sagi Grimberg
2015-10-12 12:35               ` Doug Ledford [this message]
2015-10-07 16:22   ` santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA
2015-10-07 19:12   ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561BA8F8.9030002@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.