IB/rxe: Add dst_clone() in prepare_ipv6_hdr()
authorAndrew Boyer <andrew.boyer@dell.com>
Mon, 28 Aug 2017 20:11:54 +0000 (16:11 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:34 +0000 (19:12 -0400)
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 <andrew.boyer@dell.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_net.c

index a93ae3a90ff0a10d8ceb7d438d7bc66e3e1aa097..3fbbadc5eb47631e7a503207f97405cb80208904 100644 (file)
@@ -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);