summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_connection_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-05-04 15:27:29 -0700
committerDavid S. Miller <davem@davemloft.net>2016-05-04 23:47:54 -0400
commit777c6ae57ebd432b59950b3e28bf01676018d1b2 (patch)
treedaa9fc5647e16767136233e80544b785727f1271 /net/ipv4/inet_connection_sock.c
parentaa8a8b05adfc72e562abe7ae5c6933906e0ed2e9 (diff)
downloadlinux-777c6ae57ebd432b59950b3e28bf01676018d1b2.tar.gz
linux-777c6ae57ebd432b59950b3e28bf01676018d1b2.tar.bz2
linux-777c6ae57ebd432b59950b3e28bf01676018d1b2.zip
tcp: two more missing bh disable
percpu_counter only have protection against preemption. TCP stack uses them possibly from BH, so we need BH protection in contexts that could be run in process context Fixes: c10d9310edf5 ("tcp: do not assume TCP code is non preemptible") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r--net/ipv4/inet_connection_sock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 7ce112aa3a7b..fa8c39804bdb 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -706,7 +706,9 @@ void inet_csk_destroy_sock(struct sock *sk)
sk_refcnt_debug_release(sk);
+ local_bh_disable();
percpu_counter_dec(sk->sk_prot->orphan_count);
+ local_bh_enable();
sock_put(sk);
}
EXPORT_SYMBOL(inet_csk_destroy_sock);