summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2018-10-13 11:16:52 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2018-10-13 11:16:52 +0200
commit285f6528dbbe15bf0d72777f891f8527d540f2a5 (patch)
tree8a347e29696fbe91122ce00b8a6baf3d7f50d4f7 /include/net
parent57f9e9ec88731570c6f4fe26d59694dccc880da5 (diff)
parentb001adea66f0e0a7803adfbf9128a2d7969daa4e (diff)
Merge 4.4.161 into android-4.4-p
Changes in 4.4.161 mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly fbdev/omapfb: fix omapfb_memory_read infoleak x86/vdso: Fix asm constraints on vDSO syscall fallbacks x86/vdso: Fix vDSO syscall fallback asm constraint regression PCI: Reprogram bridge prefetch registers on resume mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys PM / core: Clear the direct_complete flag on errors dm cache: fix resize crash if user doesn't reload cache table xhci: Add missing CAS workaround for Intel Sunrise Point xHCI USB: serial: simple: add Motorola Tetra MTP6550 id of: unittest: Disable interrupt node tests for old world MAC systems ext4: always verify the magic number in xattr blocks cgroup: Fix deadlock in cpu hotplug path ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait powerpc/fadump: Return error when fadump registration fails ARC: clone syscall to setp r25 as thread pointer ucma: fix a use-after-free in ucma_resolve_ip() ubifs: Check for name being NULL while mounting tcp: increment sk_drops for dropped rx packets tcp: use an RB tree for ooo receive queue tcp: fix a stale ooo_last_skb after a replace tcp: free batches of packets in tcp_prune_ofo_queue() tcp: call tcp_drop() from tcp_data_queue_ofo() tcp: add tcp_ooo_try_coalesce() helper ath10k: fix scan crash due to incorrect length calculation ebtables: arpreply: Add the standard target sanity check Linux 4.4.161 Change-Id: I03f9c0553ff7b197bfd896e257d5f3e1de228ed7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sock.h7
-rw-r--r--include/net/tcp.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 62c9e2268d63..5b1a71559325 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2147,6 +2147,13 @@ sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb)
SOCK_SKB_CB(skb)->dropcount = atomic_read(&sk->sk_drops);
}
+static inline void sk_drops_add(struct sock *sk, const struct sk_buff *skb)
+{
+ int segs = max_t(u16, 1, skb_shinfo(skb)->gso_segs);
+
+ atomic_add(segs, &sk->sk_drops);
+}
+
void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
struct sk_buff *skb);
void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk,
diff --git a/include/net/tcp.h b/include/net/tcp.h
index ef2f863275cf..c6a4c41674e7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -650,7 +650,7 @@ static inline void tcp_fast_path_check(struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
- if (skb_queue_empty(&tp->out_of_order_queue) &&
+ if (RB_EMPTY_ROOT(&tp->out_of_order_queue) &&
tp->rcv_wnd &&
atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf &&
!tp->urg_data)