From: Sagi Grimberg <sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"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 10:53:40 +0300 [thread overview]
Message-ID: <561B6704.5020000@dev.mellanox.co.il> (raw)
In-Reply-To: <alpine.DEB.2.20.1510111848560.10812-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
> The following fixup patch is needed:
>
>
>
> 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;
>
Hey Christoph,
Thanks for the quick patch. When you re-spin this as
a proper patch you can add my:
Tested-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
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
next prev parent reply other threads:[~2015-10-12 7:53 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 [this message]
2015-10-12 12:35 ` Doug Ledford
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=561B6704.5020000@dev.mellanox.co.il \
--to=sagig-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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.