Commit 65c7edda authored by Roland Dreier's avatar Roland Dreier

IPoIB: reinitialize path struct's completion for every query

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: default avatarRoland Dreier <rolandd@cisco.com>
parent bf6d9e23
...@@ -428,7 +428,6 @@ static struct ipoib_path *path_rec_create(struct net_device *dev, ...@@ -428,7 +428,6 @@ static struct ipoib_path *path_rec_create(struct net_device *dev,
skb_queue_head_init(&path->queue); skb_queue_head_init(&path->queue);
INIT_LIST_HEAD(&path->neigh_list); INIT_LIST_HEAD(&path->neigh_list);
init_completion(&path->done);
memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid)); memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid));
path->pathrec.sgid = priv->local_gid; path->pathrec.sgid = priv->local_gid;
...@@ -446,6 +445,8 @@ static int path_rec_start(struct net_device *dev, ...@@ -446,6 +445,8 @@ static int path_rec_start(struct net_device *dev,
ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n", ipoib_dbg(priv, "Start path record lookup for " IPOIB_GID_FMT "\n",
IPOIB_GID_ARG(path->pathrec.dgid)); IPOIB_GID_ARG(path->pathrec.dgid));
init_completion(&path->done);
path->query_id = path->query_id =
ib_sa_path_rec_get(priv->ca, priv->port, ib_sa_path_rec_get(priv->ca, priv->port,
&path->pathrec, &path->pathrec,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment