aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-01-27 12:54:30 -0500
committerRoland Dreier <roland@purestorage.com>2012-01-27 12:54:30 -0500
commit7525c85be0e6d18596390e7e2b17a206cd9777f6 (patch)
treea0d0d08527421709c65f779ca583b08ac5efdc24 /drivers
parent81f99dcc93226c7accfe5c4edad1749b8aebf7db (diff)
RDMA/nes: Add missing rcu_read_unlock() in nes_addr_resolve_neigh()
Make sure all exit paths from this function unlock everything. Reported-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 183f7ab120db..271279cccad8 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1363,8 +1363,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
1363 if (!memcmp(nesadapter->arp_table[arpindex].mac_addr, 1363 if (!memcmp(nesadapter->arp_table[arpindex].mac_addr,
1364 neigh->ha, ETH_ALEN)) { 1364 neigh->ha, ETH_ALEN)) {
1365 /* Mac address same as in nes_arp_table */ 1365 /* Mac address same as in nes_arp_table */
1366 ip_rt_put(rt); 1366 goto out;
1367 return rc;
1368 } 1367 }
1369 1368
1370 nes_manage_arp_cache(nesvnic->netdev, 1369 nes_manage_arp_cache(nesvnic->netdev,
@@ -1380,6 +1379,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
1380 neigh_event_send(neigh, NULL); 1379 neigh_event_send(neigh, NULL);
1381 } 1380 }
1382 } 1381 }
1382
1383out:
1383 rcu_read_unlock(); 1384 rcu_read_unlock();
1384 ip_rt_put(rt); 1385 ip_rt_put(rt);
1385 return rc; 1386 return rc;