From: Andrew Boyer Date: Mon, 28 Aug 2017 20:11:54 +0000 (-0400) Subject: IB/rxe: Add dst_clone() in prepare_ipv6_hdr() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48c22be4abaf3925e8ff74fb3ce5214b082ca989;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git IB/rxe: Add dst_clone() in prepare_ipv6_hdr() Otherwise the reference count goes negative as IPv6 packets complete. Fixes: 4ed6ad1eb30e ("IB/rxe: Cache dst in QP instead of getting it...") Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index a93ae3a90ff0..3fbbadc5eb47 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c @@ -342,7 +342,7 @@ static void prepare_ipv6_hdr(struct dst_entry *dst, struct sk_buff *skb, memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | IPSKB_REROUTED); - skb_dst_set(skb, dst); + skb_dst_set(skb, dst_clone(dst)); __skb_push(skb, sizeof(*ip6h)); skb_reset_network_header(skb);