mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [git patch review 1/8] IPoIB: reinitialize path struct's completion for every query
@ 2005-11-30  0:57 Roland Dreier
  2005-11-30  0:57 ` [git patch review 2/8] IPoIB: always set path->query to NULL when query finishes Roland Dreier
  0 siblings, 1 reply; 8+ messages in thread
From: Roland Dreier @ 2005-11-30  0:57 UTC (permalink / raw)
  To: linux-kernel, openib-general

It's possible that IPoIB will issue multiple SA queries for the same
path struct.  Therefore the struct's completion needs to be
initialized for each query rather than only once when the struct is
allocated, or else we might not wait long enough for later queries to
finish and free the path struct too soon.

Signed-off-by: Roland Dreier <rolandd@cisco.com>

---

 drivers/infiniband/ulp/ipoib/ipoib_main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

applies-to: 9fd732ebc6b85090b64862c4ee3af7078ba1f822
65c7eddaba33995e013ef3c04718f6dc8fdf2335
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 2fa3075..cd58b3d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -428,7 +428,6 @@ static struct ipoib_path *path_rec_creat
 	skb_queue_head_init(&path->queue);
 
 	INIT_LIST_HEAD(&path->neigh_list);
-	init_completion(&path->done);
 
 	memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid));
 	path->pathrec.sgid      = priv->local_gid;
@@ -446,6 +445,8 @@ static int path_rec_start(struct net_dev
 	ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n",
 		  IPOIB_GID_ARG(path->pathrec.dgid));
 
+	init_completion(&path->done);
+
 	path->query_id =
 		ib_sa_path_rec_get(priv->ca, priv->port,
 				   &path->pathrec,
---
0.99.9k

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-30  0:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30  0:57 [git patch review 1/8] IPoIB: reinitialize path struct's completion for every query Roland Dreier
2005-11-30  0:57 ` [git patch review 2/8] IPoIB: always set path->query to NULL when query finishes Roland Dreier
2005-11-30  0:57   ` [git patch review 3/8] IPoIB: reinitialize mcast structs' completions for every query Roland Dreier
2005-11-30  0:57     ` [git patch review 4/8] IPoIB: don't zero members after we allocate with kzalloc Roland Dreier
2005-11-30  0:57       ` [git patch review 5/8] IPoIB: protect child list in ipoib_ib_dev_flush Roland Dreier
2005-11-30  0:57         ` [git patch review 6/8] IPoIB: fix error handling in ipoib_open Roland Dreier
2005-11-30  0:57           ` [git patch review 7/8] IB/mthca: fix posting of send lists of length >= 255 on mem-free HCAs Roland Dreier
2005-11-30  0:57             ` [git patch review 8/8] IB/uverbs: track multicast group membership for userspace QPs Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®