diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-17 16:28:51 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-17 16:28:51 -0400 |
commit | 18802148e9a83c9d2163d4669b62418cac6b66ec (patch) | |
tree | 6fa733d84efc2beaf5fd30b75b9749568a89c598 | |
parent | d5d0c600da1e195d5a94a30f8e98e3952215d0de (diff) | |
download | 4.8-rt-patches-18802148e9a83c9d2163d4669b62418cac6b66ec.tar.gz |
net: update/refresh locking addition patchrt-v4.8-rc6
-rw-r--r-- | patches/net-add-back-the-missing-serialization-in-ip_send_un.patch | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/patches/net-add-back-the-missing-serialization-in-ip_send_un.patch b/patches/net-add-back-the-missing-serialization-in-ip_send_un.patch index 2c83f004fc3b28..e3885f784e64b2 100644 --- a/patches/net-add-back-the-missing-serialization-in-ip_send_un.patch +++ b/patches/net-add-back-the-missing-serialization-in-ip_send_un.patch @@ -1,3 +1,4 @@ +From 6272db658a24daa5811bc06c3bf73a237bb62d32 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 31 Aug 2016 17:21:56 +0200 Subject: [PATCH] net: add back the missing serialization in @@ -36,10 +37,11 @@ This is brings back the old locks. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - net/ipv4/tcp_ipv4.c | 7 +++++++ - 1 file changed, 7 insertions(+) +[PG: update context for local_bh_disable added in 47dcc20a39d06] +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> +diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c +index 7158d4f8dae4..9ed4133f9d78 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -62,6 +62,7 @@ @@ -50,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include <net/net_namespace.h> #include <net/icmp.h> -@@ -565,6 +566,7 @@ void tcp_v4_send_check(struct sock *sk, +@@ -565,6 +566,7 @@ void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb) } EXPORT_SYMBOL(tcp_v4_send_check); @@ -58,10 +60,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * This routine will send an RST to the other tcp. * -@@ -689,10 +691,13 @@ static void tcp_v4_send_reset(const stru - offsetof(struct inet_timewait_sock, tw_bound_dev_if)); +@@ -693,10 +695,13 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb) arg.tos = ip_hdr(skb)->tos; + local_bh_disable(); + + local_lock(tcp_sk_lock); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), @@ -70,12 +72,12 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> &arg, arg.iov[0].iov_len); + local_unlock(tcp_sk_lock); - TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); - TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS); -@@ -774,10 +779,12 @@ static void tcp_v4_send_ack(struct net * - if (oif) + __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); + __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); +@@ -777,10 +782,12 @@ static void tcp_v4_send_ack(struct net *net, arg.bound_dev_if = oif; arg.tos = tos; + local_bh_disable(); + local_lock(tcp_sk_lock); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), skb, &TCP_SKB_CB(skb)->header.h4.opt, @@ -83,5 +85,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> &arg, arg.iov[0].iov_len); + local_unlock(tcp_sk_lock); - TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); - } + __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); + local_bh_enable(); +-- +2.5.0 + |