diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 6b6dff1164b9..0170e914f1b0 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -65,7 +65,7 @@ static void tcp_write_err(struct sock *sk) | |||
65 | static int tcp_out_of_resources(struct sock *sk, int do_reset) | 65 | static int tcp_out_of_resources(struct sock *sk, int do_reset) |
66 | { | 66 | { |
67 | struct tcp_sock *tp = tcp_sk(sk); | 67 | struct tcp_sock *tp = tcp_sk(sk); |
68 | int orphans = atomic_read(&tcp_orphan_count); | 68 | int orphans = percpu_counter_read_positive(&tcp_orphan_count); |
69 | 69 | ||
70 | /* If peer does not open window for long time, or did not transmit | 70 | /* If peer does not open window for long time, or did not transmit |
71 | * anything for long time, penalize it. */ | 71 | * anything for long time, penalize it. */ |
@@ -171,7 +171,7 @@ static int tcp_write_timeout(struct sock *sk) | |||
171 | 171 | ||
172 | static void tcp_delack_timer(unsigned long data) | 172 | static void tcp_delack_timer(unsigned long data) |
173 | { | 173 | { |
174 | struct sock *sk = (struct sock*)data; | 174 | struct sock *sk = (struct sock *)data; |
175 | struct tcp_sock *tp = tcp_sk(sk); | 175 | struct tcp_sock *tp = tcp_sk(sk); |
176 | struct inet_connection_sock *icsk = inet_csk(sk); | 176 | struct inet_connection_sock *icsk = inet_csk(sk); |
177 | 177 | ||
@@ -299,15 +299,15 @@ static void tcp_retransmit_timer(struct sock *sk) | |||
299 | #ifdef TCP_DEBUG | 299 | #ifdef TCP_DEBUG |
300 | struct inet_sock *inet = inet_sk(sk); | 300 | struct inet_sock *inet = inet_sk(sk); |
301 | if (sk->sk_family == AF_INET) { | 301 | if (sk->sk_family == AF_INET) { |
302 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: Treason uncloaked! Peer " NIPQUAD_FMT ":%u/%u shrinks window %u:%u. Repaired.\n", | 302 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI4:%u/%u unexpectedly shrunk window %u:%u (repaired)\n", |
303 | NIPQUAD(inet->daddr), ntohs(inet->dport), | 303 | &inet->daddr, ntohs(inet->dport), |
304 | inet->num, tp->snd_una, tp->snd_nxt); | 304 | inet->num, tp->snd_una, tp->snd_nxt); |
305 | } | 305 | } |
306 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 306 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
307 | else if (sk->sk_family == AF_INET6) { | 307 | else if (sk->sk_family == AF_INET6) { |
308 | struct ipv6_pinfo *np = inet6_sk(sk); | 308 | struct ipv6_pinfo *np = inet6_sk(sk); |
309 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: Treason uncloaked! Peer " NIP6_FMT ":%u/%u shrinks window %u:%u. Repaired.\n", | 309 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n", |
310 | NIP6(np->daddr), ntohs(inet->dport), | 310 | &np->daddr, ntohs(inet->dport), |
311 | inet->num, tp->snd_una, tp->snd_nxt); | 311 | inet->num, tp->snd_una, tp->snd_nxt); |
312 | } | 312 | } |
313 | #endif | 313 | #endif |
@@ -396,7 +396,7 @@ out:; | |||
396 | 396 | ||
397 | static void tcp_write_timer(unsigned long data) | 397 | static void tcp_write_timer(unsigned long data) |
398 | { | 398 | { |
399 | struct sock *sk = (struct sock*)data; | 399 | struct sock *sk = (struct sock *)data; |
400 | struct inet_connection_sock *icsk = inet_csk(sk); | 400 | struct inet_connection_sock *icsk = inet_csk(sk); |
401 | int event; | 401 | int event; |
402 | 402 | ||