* [PATCH] IB/ipoib: Initialize ipoib_neigh list properly
@ 2010-08-25 3:51 Ira Weiny
[not found] ` <20100824205123.2742e194.weiny2-i2BcT+NCU+M@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ira Weiny @ 2010-08-25 3:51 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ralph Campbell, Tom Elken, John A. Gregor
I applied Ralph's "fix dangling pointer references to ipoib_neigh and
ipoib_path" patch to our local RHEL based kernel and experienced crashes in
ipoib_neigh_cleanup. It turns out ipoib_neigh->list was not initialized
properly. So the following code from Ralph's patch caused issues.
if (ipoib_cm_get(neigh))
ipoib_cm_destroy_tx(ipoib_cm_get(neigh));
Looking at Rolands upstream kernel it appears the same is true upstream.
The patch below initializes ipoib_neigh->list correctly.
Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index b4b2257..fa38ede 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -882,6 +882,7 @@ struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour *neighbour,
if (!neigh)
return NULL;
+ INIT_LIST_HEAD(&neigh->list);
neigh->neighbour = neighbour;
neigh->dev = dev;
memset(&neigh->dgid.raw, 0, sizeof (union ib_gid));
--
1.5.4.5
--
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
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20100824205123.2742e194.weiny2-i2BcT+NCU+M@public.gmane.org>]
* Re: [PATCH] IB/ipoib: Initialize ipoib_neigh list properly [not found] ` <20100824205123.2742e194.weiny2-i2BcT+NCU+M@public.gmane.org> @ 2010-08-30 21:56 ` Ralph Campbell [not found] ` <1283205404.16829.55.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Ralph Campbell @ 2010-08-30 21:56 UTC (permalink / raw) To: Ira Weiny Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tom Elken, John Gregor You are correct that it needs to be initialized but I think you must have made an error in applying the patch. If you look again at the latest version of the patch this line is present. https://patchwork.kernel.org/patch/120013/ On Tue, 2010-08-24 at 20:51 -0700, Ira Weiny wrote: > I applied Ralph's "fix dangling pointer references to ipoib_neigh and > ipoib_path" patch to our local RHEL based kernel and experienced crashes in > ipoib_neigh_cleanup. It turns out ipoib_neigh->list was not initialized > properly. So the following code from Ralph's patch caused issues. > > if (ipoib_cm_get(neigh)) > ipoib_cm_destroy_tx(ipoib_cm_get(neigh)); > > Looking at Rolands upstream kernel it appears the same is true upstream. > > The patch below initializes ipoib_neigh->list correctly. > > > Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c > index b4b2257..fa38ede 100644 > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c > @@ -882,6 +882,7 @@ struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour *neighbour, > if (!neigh) > return NULL; > > + INIT_LIST_HEAD(&neigh->list); > neigh->neighbour = neighbour; > neigh->dev = dev; > memset(&neigh->dgid.raw, 0, sizeof (union ib_gid)); -- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1283205404.16829.55.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>]
* Re: [PATCH] IB/ipoib: Initialize ipoib_neigh list properly [not found] ` <1283205404.16829.55.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org> @ 2010-08-30 23:20 ` Ira Weiny 0 siblings, 0 replies; 3+ messages in thread From: Ira Weiny @ 2010-08-30 23:20 UTC (permalink / raw) To: Ralph Campbell Cc: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tom Elken, John Gregor On Mon, 30 Aug 2010 14:56:43 -0700 Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote: > You are correct that it needs to be initialized but I > think you must have made an error in applying the patch. > > If you look again at the latest version of the patch > this line is present. > https://*patchwork.kernel.org/patch/120013/ Yep, :-( I must have made a mistake in applying the patch. It did not apply to our old kernel so I had to do some stuff by hand... :-( Sorry for the noise, Ira > > On Tue, 2010-08-24 at 20:51 -0700, Ira Weiny wrote: > > I applied Ralph's "fix dangling pointer references to ipoib_neigh and > > ipoib_path" patch to our local RHEL based kernel and experienced crashes in > > ipoib_neigh_cleanup. It turns out ipoib_neigh->list was not initialized > > properly. So the following code from Ralph's patch caused issues. > > > > if (ipoib_cm_get(neigh)) > > ipoib_cm_destroy_tx(ipoib_cm_get(neigh)); > > > > Looking at Rolands upstream kernel it appears the same is true upstream. > > > > The patch below initializes ipoib_neigh->list correctly. > > > > > > Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org> > > --- > > drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c > > index b4b2257..fa38ede 100644 > > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c > > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c > > @@ -882,6 +882,7 @@ struct ipoib_neigh *ipoib_neigh_alloc(struct neighbour *neighbour, > > if (!neigh) > > return NULL; > > > > + INIT_LIST_HEAD(&neigh->list); > > neigh->neighbour = neighbour; > > neigh->dev = dev; > > memset(&neigh->dgid.raw, 0, sizeof (union ib_gid)); > > > -- Ira Weiny Math Programmer/Computer Scientist Lawrence Livermore National Lab 925-423-8008 weiny2-i2BcT+NCU+M@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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-30 23:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 3:51 [PATCH] IB/ipoib: Initialize ipoib_neigh list properly Ira Weiny
[not found] ` <20100824205123.2742e194.weiny2-i2BcT+NCU+M@public.gmane.org>
2010-08-30 21:56 ` Ralph Campbell
[not found] ` <1283205404.16829.55.camel-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
2010-08-30 23:20 ` Ira Weiny
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox