diff options
author | Mark Brown <broonie@kernel.org> | 2016-02-10 18:24:22 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-10 18:24:22 +0000 |
commit | 6b4fe72f6c1ab93a893a8bc2e1155d34d7689440 (patch) | |
tree | 68a7126da5b4fced21d1b803e0d5f391463b1cfd /net/ipv4/tcp_ipv4.c | |
parent | 8fa6d2e1fe937af9dbacb5aad8c43dbb67466fa0 (diff) | |
parent | 130faf3765d29c961be74f7245eb504a414a68e2 (diff) |
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-android
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 6cd9f696d9c6..5d5390299277 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1553,7 +1553,7 @@ bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) if (likely(sk->sk_rx_dst)) skb_dst_drop(skb); else - skb_dst_force(skb); + skb_dst_force_safe(skb); __skb_queue_tail(&tp->ucopy.prequeue, skb); tp->ucopy.memory += skb->truesize; @@ -1758,8 +1758,7 @@ void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); - if (dst) { - dst_hold(dst); + if (dst && dst_hold_safe(dst)) { sk->sk_rx_dst = dst; inet_sk(sk)->rx_dst_ifindex = skb->skb_iif; } |