diff options
author | David Miller <davem@davemloft.net> | 2011-12-02 11:52:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-05 15:20:19 -0500 |
commit | 2721745501a26d0dc3b88c0d2f3aa11471891388 (patch) | |
tree | e9c09622b11ad7d9317b4b01824374a852867c28 | |
parent | 761965eab38d2cbc59c36e355c59609e3a04705a (diff) |
net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}.
To reflect the fact that a refrence is not obtained to the
resulting neighbour entry.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Roland Dreier <roland@purestorage.com>
29 files changed, 58 insertions, 58 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index a20c3c8224e..70154f7e041 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -217,7 +217,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, | |||
217 | neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->dst.dev); | 217 | neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->dst.dev); |
218 | if (!neigh || !(neigh->nud_state & NUD_VALID)) { | 218 | if (!neigh || !(neigh->nud_state & NUD_VALID)) { |
219 | rcu_read_lock(); | 219 | rcu_read_lock(); |
220 | neigh_event_send(dst_get_neighbour(&rt->dst), NULL); | 220 | neigh_event_send(dst_get_neighbour_noref(&rt->dst), NULL); |
221 | rcu_read_unlock(); | 221 | rcu_read_unlock(); |
222 | ret = -ENODATA; | 222 | ret = -ENODATA; |
223 | if (neigh) | 223 | if (neigh) |
@@ -277,7 +277,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, | |||
277 | } | 277 | } |
278 | 278 | ||
279 | rcu_read_lock(); | 279 | rcu_read_lock(); |
280 | neigh = dst_get_neighbour(dst); | 280 | neigh = dst_get_neighbour_noref(dst); |
281 | if (!neigh || !(neigh->nud_state & NUD_VALID)) { | 281 | if (!neigh || !(neigh->nud_state & NUD_VALID)) { |
282 | if (neigh) | 282 | if (neigh) |
283 | neigh_event_send(neigh, NULL); | 283 | neigh_event_send(neigh, NULL); |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index c88b12beef2..23686df0517 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -1376,7 +1376,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1376 | } | 1376 | } |
1377 | dst = &rt->dst; | 1377 | dst = &rt->dst; |
1378 | rcu_read_lock(); | 1378 | rcu_read_lock(); |
1379 | neigh = dst_get_neighbour(dst); | 1379 | neigh = dst_get_neighbour_noref(dst); |
1380 | l2t = t3_l2t_get(tdev, neigh, neigh->dev); | 1380 | l2t = t3_l2t_get(tdev, neigh, neigh->dev); |
1381 | rcu_read_unlock(); | 1381 | rcu_read_unlock(); |
1382 | if (!l2t) { | 1382 | if (!l2t) { |
@@ -1949,7 +1949,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
1949 | ep->dst = &rt->dst; | 1949 | ep->dst = &rt->dst; |
1950 | 1950 | ||
1951 | rcu_read_lock(); | 1951 | rcu_read_lock(); |
1952 | neigh = dst_get_neighbour(ep->dst); | 1952 | neigh = dst_get_neighbour_noref(ep->dst); |
1953 | 1953 | ||
1954 | /* get a l2t entry */ | 1954 | /* get a l2t entry */ |
1955 | ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev); | 1955 | ep->l2t = t3_l2t_get(ep->com.tdev, neigh, neigh->dev); |
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 0747004313a..e61c80271f9 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1597,7 +1597,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1597 | } | 1597 | } |
1598 | dst = &rt->dst; | 1598 | dst = &rt->dst; |
1599 | rcu_read_lock(); | 1599 | rcu_read_lock(); |
1600 | neigh = dst_get_neighbour(dst); | 1600 | neigh = dst_get_neighbour_noref(dst); |
1601 | if (neigh->dev->flags & IFF_LOOPBACK) { | 1601 | if (neigh->dev->flags & IFF_LOOPBACK) { |
1602 | pdev = ip_dev_find(&init_net, peer_ip); | 1602 | pdev = ip_dev_find(&init_net, peer_ip); |
1603 | BUG_ON(!pdev); | 1603 | BUG_ON(!pdev); |
@@ -1825,7 +1825,7 @@ static int c4iw_reconnect(struct c4iw_ep *ep) | |||
1825 | ep->dst = &rt->dst; | 1825 | ep->dst = &rt->dst; |
1826 | 1826 | ||
1827 | rcu_read_lock(); | 1827 | rcu_read_lock(); |
1828 | neigh = dst_get_neighbour(ep->dst); | 1828 | neigh = dst_get_neighbour_noref(ep->dst); |
1829 | 1829 | ||
1830 | /* get a l2t entry */ | 1830 | /* get a l2t entry */ |
1831 | if (neigh->dev->flags & IFF_LOOPBACK) { | 1831 | if (neigh->dev->flags & IFF_LOOPBACK) { |
@@ -2308,7 +2308,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) | |||
2308 | ep->dst = &rt->dst; | 2308 | ep->dst = &rt->dst; |
2309 | 2309 | ||
2310 | rcu_read_lock(); | 2310 | rcu_read_lock(); |
2311 | neigh = dst_get_neighbour(ep->dst); | 2311 | neigh = dst_get_neighbour_noref(ep->dst); |
2312 | 2312 | ||
2313 | /* get a l2t entry */ | 2313 | /* get a l2t entry */ |
2314 | if (neigh->dev->flags & IFF_LOOPBACK) { | 2314 | if (neigh->dev->flags & IFF_LOOPBACK) { |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 0a52d72371e..686667a362c 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1379,7 +1379,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi | |||
1379 | 1379 | ||
1380 | if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) { | 1380 | if ((neigh == NULL) || (!(neigh->nud_state & NUD_VALID))) { |
1381 | rcu_read_lock(); | 1381 | rcu_read_lock(); |
1382 | neigh_event_send(dst_get_neighbour(&rt->dst), NULL); | 1382 | neigh_event_send(dst_get_neighbour_noref(&rt->dst), NULL); |
1383 | rcu_read_unlock(); | 1383 | rcu_read_unlock(); |
1384 | } | 1384 | } |
1385 | ip_rt_put(rt); | 1385 | ip_rt_put(rt); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index d3ed89ca485..eef6786c8de 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -564,7 +564,7 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev) | |||
564 | struct neighbour *n; | 564 | struct neighbour *n; |
565 | unsigned long flags; | 565 | unsigned long flags; |
566 | 566 | ||
567 | n = dst_get_neighbour(skb_dst(skb)); | 567 | n = dst_get_neighbour_noref(skb_dst(skb)); |
568 | neigh = ipoib_neigh_alloc(n, skb->dev); | 568 | neigh = ipoib_neigh_alloc(n, skb->dev); |
569 | if (!neigh) { | 569 | if (!neigh) { |
570 | ++dev->stats.tx_dropped; | 570 | ++dev->stats.tx_dropped; |
@@ -645,7 +645,7 @@ static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) | |||
645 | struct neighbour *n; | 645 | struct neighbour *n; |
646 | 646 | ||
647 | /* Look up path record for unicasts */ | 647 | /* Look up path record for unicasts */ |
648 | n = dst_get_neighbour(dst); | 648 | n = dst_get_neighbour_noref(dst); |
649 | if (n->ha[4] != 0xff) { | 649 | if (n->ha[4] != 0xff) { |
650 | neigh_add_path(skb, dev); | 650 | neigh_add_path(skb, dev); |
651 | return; | 651 | return; |
@@ -724,7 +724,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
724 | 724 | ||
725 | rcu_read_lock(); | 725 | rcu_read_lock(); |
726 | if (likely(skb_dst(skb))) | 726 | if (likely(skb_dst(skb))) |
727 | n = dst_get_neighbour(skb_dst(skb)); | 727 | n = dst_get_neighbour_noref(skb_dst(skb)); |
728 | 728 | ||
729 | if (likely(n)) { | 729 | if (likely(n)) { |
730 | if (unlikely(!*to_ipoib_neigh(n))) { | 730 | if (unlikely(!*to_ipoib_neigh(n))) { |
@@ -841,7 +841,7 @@ static int ipoib_hard_header(struct sk_buff *skb, | |||
841 | dst = skb_dst(skb); | 841 | dst = skb_dst(skb); |
842 | n = NULL; | 842 | n = NULL; |
843 | if (dst) | 843 | if (dst) |
844 | n = dst_get_neighbour_raw(dst); | 844 | n = dst_get_neighbour_noref_raw(dst); |
845 | if ((!dst || !n) && daddr) { | 845 | if ((!dst || !n) && daddr) { |
846 | struct ipoib_pseudoheader *phdr = | 846 | struct ipoib_pseudoheader *phdr = |
847 | (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); | 847 | (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 873bff97e69..f7ff9dd66cd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -269,7 +269,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
269 | 269 | ||
270 | skb->dev = dev; | 270 | skb->dev = dev; |
271 | if (dst) | 271 | if (dst) |
272 | n = dst_get_neighbour_raw(dst); | 272 | n = dst_get_neighbour_noref_raw(dst); |
273 | if (!dst || !n) { | 273 | if (!dst || !n) { |
274 | /* put pseudoheader back on for next time */ | 274 | /* put pseudoheader back on for next time */ |
275 | skb_push(skb, sizeof (struct ipoib_pseudoheader)); | 275 | skb_push(skb, sizeof (struct ipoib_pseudoheader)); |
@@ -728,7 +728,7 @@ out: | |||
728 | 728 | ||
729 | rcu_read_lock(); | 729 | rcu_read_lock(); |
730 | if (dst) | 730 | if (dst) |
731 | n = dst_get_neighbour(dst); | 731 | n = dst_get_neighbour_noref(dst); |
732 | if (n && !*to_ipoib_neigh(n)) { | 732 | if (n && !*to_ipoib_neigh(n)) { |
733 | struct ipoib_neigh *neigh = ipoib_neigh_alloc(n, | 733 | struct ipoib_neigh *neigh = ipoib_neigh_alloc(n, |
734 | skb->dev); | 734 | skb->dev); |
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c index 7f7882d24bc..6ed9f87db8e 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | |||
@@ -969,7 +969,7 @@ static int nb_callback(struct notifier_block *self, unsigned long event, | |||
969 | case (NETEVENT_REDIRECT):{ | 969 | case (NETEVENT_REDIRECT):{ |
970 | struct netevent_redirect *nr = ctx; | 970 | struct netevent_redirect *nr = ctx; |
971 | cxgb_redirect(nr->old, nr->new); | 971 | cxgb_redirect(nr->old, nr->new); |
972 | cxgb_neigh_update(dst_get_neighbour(nr->new)); | 972 | cxgb_neigh_update(dst_get_neighbour_noref(nr->new)); |
973 | break; | 973 | break; |
974 | } | 974 | } |
975 | default: | 975 | default: |
@@ -1114,8 +1114,8 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new) | |||
1114 | struct l2t_entry *e; | 1114 | struct l2t_entry *e; |
1115 | struct t3c_tid_entry *te; | 1115 | struct t3c_tid_entry *te; |
1116 | 1116 | ||
1117 | olddev = dst_get_neighbour(old)->dev; | 1117 | olddev = dst_get_neighbour_noref(old)->dev; |
1118 | newdev = dst_get_neighbour(new)->dev; | 1118 | newdev = dst_get_neighbour_noref(new)->dev; |
1119 | if (!is_offloading(olddev)) | 1119 | if (!is_offloading(olddev)) |
1120 | return; | 1120 | return; |
1121 | if (!is_offloading(newdev)) { | 1121 | if (!is_offloading(newdev)) { |
@@ -1132,7 +1132,7 @@ static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new) | |||
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | /* Add new L2T entry */ | 1134 | /* Add new L2T entry */ |
1135 | e = t3_l2t_get(tdev, dst_get_neighbour(new), newdev); | 1135 | e = t3_l2t_get(tdev, dst_get_neighbour_noref(new), newdev); |
1136 | if (!e) { | 1136 | if (!e) { |
1137 | printk(KERN_ERR "%s: couldn't allocate new l2t entry!\n", | 1137 | printk(KERN_ERR "%s: couldn't allocate new l2t entry!\n", |
1138 | __func__); | 1138 | __func__); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 63578925bc5..b2a55e3fde0 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2759,7 +2759,7 @@ int inline qeth_l3_get_cast_type(struct qeth_card *card, struct sk_buff *skb) | |||
2759 | rcu_read_lock(); | 2759 | rcu_read_lock(); |
2760 | dst = skb_dst(skb); | 2760 | dst = skb_dst(skb); |
2761 | if (dst) | 2761 | if (dst) |
2762 | n = dst_get_neighbour(dst); | 2762 | n = dst_get_neighbour_noref(dst); |
2763 | if (n) { | 2763 | if (n) { |
2764 | cast_type = n->type; | 2764 | cast_type = n->type; |
2765 | rcu_read_unlock(); | 2765 | rcu_read_unlock(); |
@@ -2855,7 +2855,7 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
2855 | rcu_read_lock(); | 2855 | rcu_read_lock(); |
2856 | dst = skb_dst(skb); | 2856 | dst = skb_dst(skb); |
2857 | if (dst) | 2857 | if (dst) |
2858 | n = dst_get_neighbour(dst); | 2858 | n = dst_get_neighbour_noref(dst); |
2859 | if (ipv == 4) { | 2859 | if (ipv == 4) { |
2860 | /* IPv4 */ | 2860 | /* IPv4 */ |
2861 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags4(cast_type); | 2861 | hdr->hdr.l3.flags = qeth_l3_get_qeth_hdr_flags4(cast_type); |
diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c index 000294a9df8..88902d380f8 100644 --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | |||
@@ -966,7 +966,7 @@ static int init_act_open(struct cxgbi_sock *csk) | |||
966 | csk->saddr.sin_addr.s_addr = chba->ipv4addr; | 966 | csk->saddr.sin_addr.s_addr = chba->ipv4addr; |
967 | 967 | ||
968 | csk->rss_qid = 0; | 968 | csk->rss_qid = 0; |
969 | csk->l2t = t3_l2t_get(t3dev, dst_get_neighbour(dst), ndev); | 969 | csk->l2t = t3_l2t_get(t3dev, dst_get_neighbour_noref(dst), ndev); |
970 | if (!csk->l2t) { | 970 | if (!csk->l2t) { |
971 | pr_err("NO l2t available.\n"); | 971 | pr_err("NO l2t available.\n"); |
972 | return -EINVAL; | 972 | return -EINVAL; |
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index ac7a9b1e3e2..c8fd13aadf9 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
@@ -1141,7 +1141,7 @@ static int init_act_open(struct cxgbi_sock *csk) | |||
1141 | cxgbi_sock_set_flag(csk, CTPF_HAS_ATID); | 1141 | cxgbi_sock_set_flag(csk, CTPF_HAS_ATID); |
1142 | cxgbi_sock_get(csk); | 1142 | cxgbi_sock_get(csk); |
1143 | 1143 | ||
1144 | csk->l2t = cxgb4_l2t_get(lldi->l2t, dst_get_neighbour(csk->dst), ndev, 0); | 1144 | csk->l2t = cxgb4_l2t_get(lldi->l2t, dst_get_neighbour_noref(csk->dst), ndev, 0); |
1145 | if (!csk->l2t) { | 1145 | if (!csk->l2t) { |
1146 | pr_err("%s, cannot alloc l2t.\n", ndev->name); | 1146 | pr_err("%s, cannot alloc l2t.\n", ndev->name); |
1147 | goto rel_resource; | 1147 | goto rel_resource; |
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index c10f74a566f..a026a2f1262 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c | |||
@@ -493,7 +493,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr) | |||
493 | goto err_out; | 493 | goto err_out; |
494 | } | 494 | } |
495 | dst = &rt->dst; | 495 | dst = &rt->dst; |
496 | ndev = dst_get_neighbour(dst)->dev; | 496 | ndev = dst_get_neighbour_noref(dst)->dev; |
497 | 497 | ||
498 | if (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST)) { | 498 | if (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST)) { |
499 | pr_info("multi-cast route %pI4, port %u, dev %s.\n", | 499 | pr_info("multi-cast route %pI4, port %u, dev %s.\n", |
@@ -507,7 +507,7 @@ static struct cxgbi_sock *cxgbi_check_route(struct sockaddr *dst_addr) | |||
507 | ndev = ip_dev_find(&init_net, daddr->sin_addr.s_addr); | 507 | ndev = ip_dev_find(&init_net, daddr->sin_addr.s_addr); |
508 | mtu = ndev->mtu; | 508 | mtu = ndev->mtu; |
509 | pr_info("rt dev %s, loopback -> %s, mtu %u.\n", | 509 | pr_info("rt dev %s, loopback -> %s, mtu %u.\n", |
510 | dst_get_neighbour(dst)->dev->name, ndev->name, mtu); | 510 | dst_get_neighbour_noref(dst)->dev->name, ndev->name, mtu); |
511 | } | 511 | } |
512 | 512 | ||
513 | cdev = cxgbi_device_find_by_netdev(ndev, &port); | 513 | cdev = cxgbi_device_find_by_netdev(ndev, &port); |
diff --git a/include/net/dst.h b/include/net/dst.h index 6faec1a6021..01343b04351 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -86,12 +86,12 @@ struct dst_entry { | |||
86 | }; | 86 | }; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst) | 89 | static inline struct neighbour *dst_get_neighbour_noref(struct dst_entry *dst) |
90 | { | 90 | { |
91 | return rcu_dereference(dst->_neighbour); | 91 | return rcu_dereference(dst->_neighbour); |
92 | } | 92 | } |
93 | 93 | ||
94 | static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst) | 94 | static inline struct neighbour *dst_get_neighbour_noref_raw(struct dst_entry *dst) |
95 | { | 95 | { |
96 | return rcu_dereference_raw(dst->_neighbour); | 96 | return rcu_dereference_raw(dst->_neighbour); |
97 | } | 97 | } |
@@ -392,7 +392,7 @@ static inline void dst_confirm(struct dst_entry *dst) | |||
392 | struct neighbour *n; | 392 | struct neighbour *n; |
393 | 393 | ||
394 | rcu_read_lock(); | 394 | rcu_read_lock(); |
395 | n = dst_get_neighbour(dst); | 395 | n = dst_get_neighbour_noref(dst); |
396 | neigh_confirm(n); | 396 | neigh_confirm(n); |
397 | rcu_read_unlock(); | 397 | rcu_read_unlock(); |
398 | } | 398 | } |
diff --git a/net/atm/clip.c b/net/atm/clip.c index c84ce7fe3f9..c12c2582457 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -338,7 +338,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb, | |||
338 | dev->stats.tx_dropped++; | 338 | dev->stats.tx_dropped++; |
339 | return NETDEV_TX_OK; | 339 | return NETDEV_TX_OK; |
340 | } | 340 | } |
341 | n = dst_get_neighbour(dst); | 341 | n = dst_get_neighbour_noref(dst); |
342 | if (!n) { | 342 | if (!n) { |
343 | pr_err("NO NEIGHBOUR !\n"); | 343 | pr_err("NO NEIGHBOUR !\n"); |
344 | dev_kfree_skb(skb); | 344 | dev_kfree_skb(skb); |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index d6ec3720c77..834dfabb30f 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -356,7 +356,7 @@ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) | |||
356 | if (!skb->dev) | 356 | if (!skb->dev) |
357 | goto free_skb; | 357 | goto free_skb; |
358 | dst = skb_dst(skb); | 358 | dst = skb_dst(skb); |
359 | neigh = dst_get_neighbour(dst); | 359 | neigh = dst_get_neighbour_noref(dst); |
360 | if (neigh->hh.hh_len) { | 360 | if (neigh->hh.hh_len) { |
361 | neigh_hh_bridge(&neigh->hh, skb); | 361 | neigh_hh_bridge(&neigh->hh, skb); |
362 | skb->dev = nf_bridge->physindev; | 362 | skb->dev = nf_bridge->physindev; |
diff --git a/net/core/dst.c b/net/core/dst.c index d5e2c4c0910..43d94cedbf7 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -366,7 +366,7 @@ static void dst_ifdown(struct dst_entry *dst, struct net_device *dev, | |||
366 | dev_hold(dst->dev); | 366 | dev_hold(dst->dev); |
367 | dev_put(dev); | 367 | dev_put(dev); |
368 | rcu_read_lock(); | 368 | rcu_read_lock(); |
369 | neigh = dst_get_neighbour(dst); | 369 | neigh = dst_get_neighbour_noref(dst); |
370 | if (neigh && neigh->dev == dev) { | 370 | if (neigh && neigh->dev == dev) { |
371 | neigh->dev = dst->dev; | 371 | neigh->dev = dst->dev; |
372 | dev_hold(dst->dev); | 372 | dev_hold(dst->dev); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index cdf8dc34f0b..4af151e1bf5 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1190,7 +1190,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1190 | 1190 | ||
1191 | rcu_read_lock(); | 1191 | rcu_read_lock(); |
1192 | /* On shaper/eql skb->dst->neighbour != neigh :( */ | 1192 | /* On shaper/eql skb->dst->neighbour != neigh :( */ |
1193 | if (dst && (n2 = dst_get_neighbour(dst)) != NULL) | 1193 | if (dst && (n2 = dst_get_neighbour_noref(dst)) != NULL) |
1194 | n1 = n2; | 1194 | n1 = n2; |
1195 | n1->output(n1, skb); | 1195 | n1->output(n1, skb); |
1196 | rcu_read_unlock(); | 1196 | rcu_read_unlock(); |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 3532ac64c82..7d2fff29380 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -202,7 +202,7 @@ static int dn_neigh_output_packet(struct sk_buff *skb) | |||
202 | { | 202 | { |
203 | struct dst_entry *dst = skb_dst(skb); | 203 | struct dst_entry *dst = skb_dst(skb); |
204 | struct dn_route *rt = (struct dn_route *)dst; | 204 | struct dn_route *rt = (struct dn_route *)dst; |
205 | struct neighbour *neigh = dst_get_neighbour(dst); | 205 | struct neighbour *neigh = dst_get_neighbour_noref(dst); |
206 | struct net_device *dev = neigh->dev; | 206 | struct net_device *dev = neigh->dev; |
207 | char mac_addr[ETH_ALEN]; | 207 | char mac_addr[ETH_ALEN]; |
208 | 208 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 94f4ec03666..f31ce72dca6 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -244,7 +244,7 @@ static int dn_dst_gc(struct dst_ops *ops) | |||
244 | */ | 244 | */ |
245 | static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu) | 245 | static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu) |
246 | { | 246 | { |
247 | struct neighbour *n = dst_get_neighbour(dst); | 247 | struct neighbour *n = dst_get_neighbour_noref(dst); |
248 | u32 min_mtu = 230; | 248 | u32 min_mtu = 230; |
249 | struct dn_dev *dn; | 249 | struct dn_dev *dn; |
250 | 250 | ||
@@ -713,7 +713,7 @@ out: | |||
713 | static int dn_to_neigh_output(struct sk_buff *skb) | 713 | static int dn_to_neigh_output(struct sk_buff *skb) |
714 | { | 714 | { |
715 | struct dst_entry *dst = skb_dst(skb); | 715 | struct dst_entry *dst = skb_dst(skb); |
716 | struct neighbour *n = dst_get_neighbour(dst); | 716 | struct neighbour *n = dst_get_neighbour_noref(dst); |
717 | 717 | ||
718 | return n->output(n, skb); | 718 | return n->output(n, skb); |
719 | } | 719 | } |
@@ -728,7 +728,7 @@ static int dn_output(struct sk_buff *skb) | |||
728 | 728 | ||
729 | int err = -EINVAL; | 729 | int err = -EINVAL; |
730 | 730 | ||
731 | if ((neigh = dst_get_neighbour(dst)) == NULL) | 731 | if ((neigh = dst_get_neighbour_noref(dst)) == NULL) |
732 | goto error; | 732 | goto error; |
733 | 733 | ||
734 | skb->dev = dev; | 734 | skb->dev = dev; |
@@ -852,7 +852,7 @@ static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res) | |||
852 | } | 852 | } |
853 | rt->rt_type = res->type; | 853 | rt->rt_type = res->type; |
854 | 854 | ||
855 | if (dev != NULL && dst_get_neighbour(&rt->dst) == NULL) { | 855 | if (dev != NULL && dst_get_neighbour_noref(&rt->dst) == NULL) { |
856 | n = __neigh_lookup_errno(&dn_neigh_table, &rt->rt_gateway, dev); | 856 | n = __neigh_lookup_errno(&dn_neigh_table, &rt->rt_gateway, dev); |
857 | if (IS_ERR(n)) | 857 | if (IS_ERR(n)) |
858 | return PTR_ERR(n); | 858 | return PTR_ERR(n); |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 2b32296b795..fe070c1593a 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -731,7 +731,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev | |||
731 | } | 731 | } |
732 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 732 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
733 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 733 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
734 | struct neighbour *neigh = dst_get_neighbour(skb_dst(skb)); | 734 | struct neighbour *neigh = dst_get_neighbour_noref(skb_dst(skb)); |
735 | const struct in6_addr *addr6; | 735 | const struct in6_addr *addr6; |
736 | int addr_type; | 736 | int addr_type; |
737 | 737 | ||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 0d5e5672f3d..ff302bde889 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -206,7 +206,7 @@ static inline int ip_finish_output2(struct sk_buff *skb) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | rcu_read_lock(); | 208 | rcu_read_lock(); |
209 | neigh = dst_get_neighbour(dst); | 209 | neigh = dst_get_neighbour_noref(dst); |
210 | if (neigh) { | 210 | if (neigh) { |
211 | int res = neigh_output(neigh, skb); | 211 | int res = neigh_output(neigh, skb); |
212 | 212 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 7047069cf96..90402a2a26a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -419,7 +419,7 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v) | |||
419 | int len, HHUptod; | 419 | int len, HHUptod; |
420 | 420 | ||
421 | rcu_read_lock(); | 421 | rcu_read_lock(); |
422 | n = dst_get_neighbour(&r->dst); | 422 | n = dst_get_neighbour_noref(&r->dst); |
423 | HHUptod = (n && (n->nud_state & NUD_CONNECTED)) ? 1 : 0; | 423 | HHUptod = (n && (n->nud_state & NUD_CONNECTED)) ? 1 : 0; |
424 | rcu_read_unlock(); | 424 | rcu_read_unlock(); |
425 | 425 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 58605172634..058cc222b3f 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -657,7 +657,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, | |||
657 | * layer address of our nexhop router | 657 | * layer address of our nexhop router |
658 | */ | 658 | */ |
659 | 659 | ||
660 | if (dst_get_neighbour_raw(&rt->dst) == NULL) | 660 | if (dst_get_neighbour_noref_raw(&rt->dst) == NULL) |
661 | ifa->flags &= ~IFA_F_OPTIMISTIC; | 661 | ifa->flags &= ~IFA_F_OPTIMISTIC; |
662 | 662 | ||
663 | ifa->idev = idev; | 663 | ifa->idev = idev; |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 7b4730315d0..27836312365 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1533,7 +1533,7 @@ static int fib6_age(struct rt6_info *rt, void *arg) | |||
1533 | RT6_TRACE("aging clone %p\n", rt); | 1533 | RT6_TRACE("aging clone %p\n", rt); |
1534 | return -1; | 1534 | return -1; |
1535 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && | 1535 | } else if ((rt->rt6i_flags & RTF_GATEWAY) && |
1536 | (!(dst_get_neighbour_raw(&rt->dst)->flags & NTF_ROUTER))) { | 1536 | (!(dst_get_neighbour_noref_raw(&rt->dst)->flags & NTF_ROUTER))) { |
1537 | RT6_TRACE("purging route %p via non-router but gateway\n", | 1537 | RT6_TRACE("purging route %p via non-router but gateway\n", |
1538 | rt); | 1538 | rt); |
1539 | return -1; | 1539 | return -1; |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 3221bc67565..71d26999c95 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -136,7 +136,7 @@ static int ip6_finish_output2(struct sk_buff *skb) | |||
136 | } | 136 | } |
137 | 137 | ||
138 | rcu_read_lock(); | 138 | rcu_read_lock(); |
139 | neigh = dst_get_neighbour(dst); | 139 | neigh = dst_get_neighbour_noref(dst); |
140 | if (neigh) { | 140 | if (neigh) { |
141 | int res = neigh_output(neigh, skb); | 141 | int res = neigh_output(neigh, skb); |
142 | 142 | ||
@@ -463,7 +463,7 @@ int ip6_forward(struct sk_buff *skb) | |||
463 | send redirects to source routed frames. | 463 | send redirects to source routed frames. |
464 | We don't send redirects to frames decapsulated from IPsec. | 464 | We don't send redirects to frames decapsulated from IPsec. |
465 | */ | 465 | */ |
466 | n = dst_get_neighbour(dst); | 466 | n = dst_get_neighbour_noref(dst); |
467 | if (skb->dev == dst->dev && n && opt->srcrt == 0 && !skb_sec_path(skb)) { | 467 | if (skb->dev == dst->dev && n && opt->srcrt == 0 && !skb_sec_path(skb)) { |
468 | struct in6_addr *target = NULL; | 468 | struct in6_addr *target = NULL; |
469 | struct rt6_info *rt; | 469 | struct rt6_info *rt; |
@@ -983,7 +983,7 @@ static int ip6_dst_lookup_tail(struct sock *sk, | |||
983 | * dst entry of the nexthop router | 983 | * dst entry of the nexthop router |
984 | */ | 984 | */ |
985 | rcu_read_lock(); | 985 | rcu_read_lock(); |
986 | n = dst_get_neighbour(*dst); | 986 | n = dst_get_neighbour_noref(*dst); |
987 | if (n && !(n->nud_state & NUD_VALID)) { | 987 | if (n && !(n->nud_state & NUD_VALID)) { |
988 | struct inet6_ifaddr *ifp; | 988 | struct inet6_ifaddr *ifp; |
989 | struct flowi6 fl_gw6; | 989 | struct flowi6 fl_gw6; |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index cfb9709ac7c..e72c8af8578 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1238,7 +1238,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1238 | rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev); | 1238 | rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev); |
1239 | 1239 | ||
1240 | if (rt) | 1240 | if (rt) |
1241 | neigh = dst_get_neighbour(&rt->dst); | 1241 | neigh = dst_get_neighbour_noref(&rt->dst); |
1242 | 1242 | ||
1243 | if (rt && lifetime == 0) { | 1243 | if (rt && lifetime == 0) { |
1244 | neigh_clone(neigh); | 1244 | neigh_clone(neigh); |
@@ -1258,7 +1258,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1258 | return; | 1258 | return; |
1259 | } | 1259 | } |
1260 | 1260 | ||
1261 | neigh = dst_get_neighbour(&rt->dst); | 1261 | neigh = dst_get_neighbour_noref(&rt->dst); |
1262 | if (neigh == NULL) { | 1262 | if (neigh == NULL) { |
1263 | ND_PRINTK0(KERN_ERR | 1263 | ND_PRINTK0(KERN_ERR |
1264 | "ICMPv6 RA: %s() got default router without neighbour.\n", | 1264 | "ICMPv6 RA: %s() got default router without neighbour.\n", |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 1138b0a5566..09412baf1ca 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -385,7 +385,7 @@ static void rt6_probe(struct rt6_info *rt) | |||
385 | * to no more than one per minute. | 385 | * to no more than one per minute. |
386 | */ | 386 | */ |
387 | rcu_read_lock(); | 387 | rcu_read_lock(); |
388 | neigh = rt ? dst_get_neighbour(&rt->dst) : NULL; | 388 | neigh = rt ? dst_get_neighbour_noref(&rt->dst) : NULL; |
389 | if (!neigh || (neigh->nud_state & NUD_VALID)) | 389 | if (!neigh || (neigh->nud_state & NUD_VALID)) |
390 | goto out; | 390 | goto out; |
391 | read_lock_bh(&neigh->lock); | 391 | read_lock_bh(&neigh->lock); |
@@ -432,7 +432,7 @@ static inline int rt6_check_neigh(struct rt6_info *rt) | |||
432 | int m; | 432 | int m; |
433 | 433 | ||
434 | rcu_read_lock(); | 434 | rcu_read_lock(); |
435 | neigh = dst_get_neighbour(&rt->dst); | 435 | neigh = dst_get_neighbour_noref(&rt->dst); |
436 | if (rt->rt6i_flags & RTF_NONEXTHOP || | 436 | if (rt->rt6i_flags & RTF_NONEXTHOP || |
437 | !(rt->rt6i_flags & RTF_GATEWAY)) | 437 | !(rt->rt6i_flags & RTF_GATEWAY)) |
438 | m = 1; | 438 | m = 1; |
@@ -786,7 +786,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, | |||
786 | 786 | ||
787 | if (rt) { | 787 | if (rt) { |
788 | rt->rt6i_flags |= RTF_CACHE; | 788 | rt->rt6i_flags |= RTF_CACHE; |
789 | dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_raw(&ort->dst))); | 789 | dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_noref_raw(&ort->dst))); |
790 | } | 790 | } |
791 | return rt; | 791 | return rt; |
792 | } | 792 | } |
@@ -820,7 +820,7 @@ restart: | |||
820 | dst_hold(&rt->dst); | 820 | dst_hold(&rt->dst); |
821 | read_unlock_bh(&table->tb6_lock); | 821 | read_unlock_bh(&table->tb6_lock); |
822 | 822 | ||
823 | if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) | 823 | if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) |
824 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); | 824 | nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); |
825 | else if (!(rt->dst.flags & DST_HOST)) | 825 | else if (!(rt->dst.flags & DST_HOST)) |
826 | nrt = rt6_alloc_clone(rt, &fl6->daddr); | 826 | nrt = rt6_alloc_clone(rt, &fl6->daddr); |
@@ -1629,7 +1629,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src, | |||
1629 | dst_confirm(&rt->dst); | 1629 | dst_confirm(&rt->dst); |
1630 | 1630 | ||
1631 | /* Duplicate redirect: silently ignore. */ | 1631 | /* Duplicate redirect: silently ignore. */ |
1632 | if (neigh == dst_get_neighbour_raw(&rt->dst)) | 1632 | if (neigh == dst_get_neighbour_noref_raw(&rt->dst)) |
1633 | goto out; | 1633 | goto out; |
1634 | 1634 | ||
1635 | nrt = ip6_rt_copy(rt, dest); | 1635 | nrt = ip6_rt_copy(rt, dest); |
@@ -1721,7 +1721,7 @@ again: | |||
1721 | 1. It is connected route. Action: COW | 1721 | 1. It is connected route. Action: COW |
1722 | 2. It is gatewayed route or NONEXTHOP route. Action: clone it. | 1722 | 2. It is gatewayed route or NONEXTHOP route. Action: clone it. |
1723 | */ | 1723 | */ |
1724 | if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) | 1724 | if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) |
1725 | nrt = rt6_alloc_cow(rt, daddr, saddr); | 1725 | nrt = rt6_alloc_cow(rt, daddr, saddr); |
1726 | else | 1726 | else |
1727 | nrt = rt6_alloc_clone(rt, daddr); | 1727 | nrt = rt6_alloc_clone(rt, daddr); |
@@ -2456,7 +2456,7 @@ static int rt6_fill_node(struct net *net, | |||
2456 | goto nla_put_failure; | 2456 | goto nla_put_failure; |
2457 | 2457 | ||
2458 | rcu_read_lock(); | 2458 | rcu_read_lock(); |
2459 | n = dst_get_neighbour(&rt->dst); | 2459 | n = dst_get_neighbour_noref(&rt->dst); |
2460 | if (n) | 2460 | if (n) |
2461 | NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); | 2461 | NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); |
2462 | rcu_read_unlock(); | 2462 | rcu_read_unlock(); |
@@ -2653,7 +2653,7 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg) | |||
2653 | seq_puts(m, "00000000000000000000000000000000 00 "); | 2653 | seq_puts(m, "00000000000000000000000000000000 00 "); |
2654 | #endif | 2654 | #endif |
2655 | rcu_read_lock(); | 2655 | rcu_read_lock(); |
2656 | n = dst_get_neighbour(&rt->dst); | 2656 | n = dst_get_neighbour_noref(&rt->dst); |
2657 | if (n) { | 2657 | if (n) { |
2658 | seq_printf(m, "%pi6", n->primary_key); | 2658 | seq_printf(m, "%pi6", n->primary_key); |
2659 | } else { | 2659 | } else { |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 50968f226e7..b7d14cc12ee 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -680,7 +680,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
680 | struct neighbour *neigh = NULL; | 680 | struct neighbour *neigh = NULL; |
681 | 681 | ||
682 | if (skb_dst(skb)) | 682 | if (skb_dst(skb)) |
683 | neigh = dst_get_neighbour(skb_dst(skb)); | 683 | neigh = dst_get_neighbour_noref(skb_dst(skb)); |
684 | 684 | ||
685 | if (neigh == NULL) { | 685 | if (neigh == NULL) { |
686 | if (net_ratelimit()) | 686 | if (net_ratelimit()) |
@@ -705,7 +705,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
705 | struct neighbour *neigh = NULL; | 705 | struct neighbour *neigh = NULL; |
706 | 706 | ||
707 | if (skb_dst(skb)) | 707 | if (skb_dst(skb)) |
708 | neigh = dst_get_neighbour(skb_dst(skb)); | 708 | neigh = dst_get_neighbour_noref(skb_dst(skb)); |
709 | 709 | ||
710 | if (neigh == NULL) { | 710 | if (neigh == NULL) { |
711 | if (net_ratelimit()) | 711 | if (net_ratelimit()) |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index ed1336e1592..45326599fda 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -277,7 +277,7 @@ static inline int teql_resolve(struct sk_buff *skb, | |||
277 | return 0; | 277 | return 0; |
278 | 278 | ||
279 | rcu_read_lock(); | 279 | rcu_read_lock(); |
280 | mn = dst_get_neighbour(dst); | 280 | mn = dst_get_neighbour_noref(dst); |
281 | res = mn ? __teql_resolve(skb, skb_res, dev, txq, mn) : 0; | 281 | res = mn ? __teql_resolve(skb, skb_res, dev, txq, mn) : 0; |
282 | rcu_read_unlock(); | 282 | rcu_read_unlock(); |
283 | 283 | ||
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 4fce1cec193..82e803b5695 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1499,7 +1499,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, | |||
1499 | goto free_dst; | 1499 | goto free_dst; |
1500 | 1500 | ||
1501 | /* Copy neighbour for reachability confirmation */ | 1501 | /* Copy neighbour for reachability confirmation */ |
1502 | dst_set_neighbour(dst0, neigh_clone(dst_get_neighbour(dst))); | 1502 | dst_set_neighbour(dst0, neigh_clone(dst_get_neighbour_noref(dst))); |
1503 | 1503 | ||
1504 | xfrm_init_path((struct xfrm_dst *)dst0, dst, nfheader_len); | 1504 | xfrm_init_path((struct xfrm_dst *)dst0, dst, nfheader_len); |
1505 | xfrm_init_pmtu(dst_prev); | 1505 | xfrm_init_pmtu(dst_prev); |