diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2006-01-17 12:22:05 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-17 12:22:05 -0500 |
commit | 47f7a0714b67b904a3a36e2f2d85904e8064219b (patch) | |
tree | 8ddea2cb121a8a5f5b0802d1fbb81a7d3d61cd08 /drivers/infiniband/ulp | |
parent | 2664b25051f7ab96b22b199aa2f5ef6a949a4296 (diff) |
IPoIB: Make sure path is fully initialized before using it
The SA path record query completion can initialize path->pathrec.dlid
before IPoIB's callback runs and initializes path->ah, so we must test
ah rather than dlid.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index fd3f5c862a5d..c3b5f79d1168 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -505,7 +505,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev) | |||
505 | 505 | ||
506 | list_add_tail(&neigh->list, &path->neigh_list); | 506 | list_add_tail(&neigh->list, &path->neigh_list); |
507 | 507 | ||
508 | if (path->pathrec.dlid) { | 508 | if (path->ah) { |
509 | kref_get(&path->ah->ref); | 509 | kref_get(&path->ah->ref); |
510 | neigh->ah = path->ah; | 510 | neigh->ah = path->ah; |
511 | 511 | ||
@@ -591,7 +591,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, | |||
591 | return; | 591 | return; |
592 | } | 592 | } |
593 | 593 | ||
594 | if (path->pathrec.dlid) { | 594 | if (path->ah) { |
595 | ipoib_dbg(priv, "Send unicast ARP to %04x\n", | 595 | ipoib_dbg(priv, "Send unicast ARP to %04x\n", |
596 | be16_to_cpu(path->pathrec.dlid)); | 596 | be16_to_cpu(path->pathrec.dlid)); |
597 | 597 | ||