Merge remote-tracking branch 'origin/develop-3.0-jb' into develop-3.0
[firefly-linux-kernel-4.4.55.git] / drivers / infiniband / hw / nes / nes_cm.c
index e74cdf9ef4716a4954f5608e2cc20121c05b67e7..a1f74f6381bae0d99126bdaba12fd6319e044b15 100644 (file)
@@ -1150,9 +1150,11 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
                neigh_release(neigh);
        }
 
-       if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID)))
-               neigh_event_send(rt->dst.neighbour, NULL);
-
+       if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) {
+               rcu_read_lock();
+               neigh_event_send(dst_get_neighbour(&rt->dst), NULL);
+               rcu_read_unlock();
+       }
        ip_rt_put(rt);
        return rc;
 }