diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cm.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index b36cdac9c558..75b57bee6622 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1594,6 +1594,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1594 | goto reject; | 1594 | goto reject; |
1595 | } | 1595 | } |
1596 | dst = &rt->dst; | 1596 | dst = &rt->dst; |
1597 | rcu_read_lock(); | ||
1597 | neigh = dst_get_neighbour(dst); | 1598 | neigh = dst_get_neighbour(dst); |
1598 | if (neigh->dev->flags & IFF_LOOPBACK) { | 1599 | if (neigh->dev->flags & IFF_LOOPBACK) { |
1599 | pdev = ip_dev_find(&init_net, peer_ip); | 1600 | pdev = ip_dev_find(&init_net, peer_ip); |
@@ -1620,6 +1621,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1620 | rss_qid = dev->rdev.lldi.rxq_ids[ | 1621 | rss_qid = dev->rdev.lldi.rxq_ids[ |
1621 | cxgb4_port_idx(neigh->dev) * step]; | 1622 | cxgb4_port_idx(neigh->dev) * step]; |
1622 | } | 1623 | } |
1624 | rcu_read_unlock(); | ||
1623 | if (!l2t) { | 1625 | if (!l2t) { |
1624 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", | 1626 | printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", |
1625 | __func__); | 1627 | __func__); |
@@ -1820,6 +1822,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1820 | } | 1822 | } |
1821 | ep->dst = &rt->dst; | 1823 | ep->dst = &rt->dst; |
1822 | 1824 | ||
1825 | rcu_read_lock(); | ||
1823 | neigh = dst_get_neighbour(ep->dst); | 1826 | neigh = dst_get_neighbour(ep->dst); |
1824 | 1827 | ||
1825 | /* get a l2t entry */ | 1828 | /* get a l2t entry */ |
@@ -1856,6 +1859,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1856 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ | 1859 | ep->rss_qid = ep->com.dev->rdev.lldi.rxq_ids[ |
1857 | cxgb4_port_idx(neigh->dev) * step]; | 1860 | cxgb4_port_idx(neigh->dev) * step]; |
1858 | } | 1861 | } |
1862 | rcu_read_unlock(); | ||
1859 | if (!ep->l2t) { | 1863 | if (!ep->l2t) { |
1860 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 1864 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
1861 | err = -ENOMEM; | 1865 | err = -ENOMEM; |
@@ -2301,6 +2305,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
2301 | } | 2305 | } |
2302 | ep->dst = &rt->dst; | 2306 | ep->dst = &rt->dst; |
2303 | 2307 | ||
2308 | rcu_read_lock(); | ||
2304 | neigh = dst_get_neighbour(ep->dst); | 2309 | neigh = dst_get_neighbour(ep->dst); |
2305 | 2310 | ||
2306 | /* get a l2t entry */ | 2311 | /* get a l2t entry */ |
@@ -2339,6 +2344,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
2339 | ep->retry_with_mpa_v1 = 0; | 2344 | ep->retry_with_mpa_v1 = 0; |
2340 | ep->tried_with_mpa_v1 = 0; | 2345 | ep->tried_with_mpa_v1 = 0; |
2341 | } | 2346 | } |
2347 | rcu_read_unlock(); | ||
2342 | if (!ep->l2t) { | 2348 | if (!ep->l2t) { |
2343 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); | 2349 | printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); |
2344 | err = -ENOMEM; | 2350 | err = -ENOMEM; |