提交 7525c85b 编写于 作者: R Roland Dreier

RDMA/nes: Add missing rcu_read_unlock() in nes_addr_resolve_neigh()

Make sure all exit paths from this function unlock everything.
Reported-by: NBart Van Assche <bvanassche@acm.org>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 81f99dcc
...@@ -1363,8 +1363,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi ...@@ -1363,8 +1363,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
if (!memcmp(nesadapter->arp_table[arpindex].mac_addr, if (!memcmp(nesadapter->arp_table[arpindex].mac_addr,
neigh->ha, ETH_ALEN)) { neigh->ha, ETH_ALEN)) {
/* Mac address same as in nes_arp_table */ /* Mac address same as in nes_arp_table */
ip_rt_put(rt); goto out;
return rc;
} }
nes_manage_arp_cache(nesvnic->netdev, 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,6 +1379,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
neigh_event_send(neigh, NULL); neigh_event_send(neigh, NULL);
} }
} }
out:
rcu_read_unlock(); rcu_read_unlock();
ip_rt_put(rt); ip_rt_put(rt);
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册