summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-04-04 11:31:12 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-04-04 11:31:12 +0200
commit38bffdac071b720db627bfd2b125a2802a04d419 (patch)
treec2e9cf66fa6ff1cc3092079e3eedeb4e6c402227 /net/ipv4/tcp_timer.c
parentlocking/ww-mutex: Limit stress test to 2 seconds (diff)
parentsched/fair: Optimize ___update_sched_avg() (diff)
downloadlinux-38bffdac071b720db627bfd2b125a2802a04d419.tar.xz
linux-38bffdac071b720db627bfd2b125a2802a04d419.zip
Merge branch 'sched/core' into locking/core
Required for the rtmutex/sched_deadline patches which depend on both branches
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 40d893556e67..b2ab411c6d37 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -249,7 +249,8 @@ void tcp_delack_timer_handler(struct sock *sk)
sk_mem_reclaim_partial(sk);
- if (sk->sk_state == TCP_CLOSE || !(icsk->icsk_ack.pending & ICSK_ACK_TIMER))
+ if (((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)) ||
+ !(icsk->icsk_ack.pending & ICSK_ACK_TIMER))
goto out;
if (time_after(icsk->icsk_ack.timeout, jiffies)) {
@@ -552,7 +553,8 @@ void tcp_write_timer_handler(struct sock *sk)
struct inet_connection_sock *icsk = inet_csk(sk);
int event;
- if (sk->sk_state == TCP_CLOSE || !icsk->icsk_pending)
+ if (((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)) ||
+ !icsk->icsk_pending)
goto out;
if (time_after(icsk->icsk_timeout, jiffies)) {