aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp.c5
-rw-r--r--net/ipv4/tcp_timer.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index bd4c295f5d79..766314505c09 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1674,9 +1674,8 @@ adjudge_to_death:
1674 } 1674 }
1675 if (sk->sk_state != TCP_CLOSE) { 1675 if (sk->sk_state != TCP_CLOSE) {
1676 sk_stream_mem_reclaim(sk); 1676 sk_stream_mem_reclaim(sk);
1677 if (atomic_read(sk->sk_prot->orphan_count) > sysctl_tcp_max_orphans || 1677 if (tcp_too_many_orphans(sk,
1678 (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && 1678 atomic_read(sk->sk_prot->orphan_count))) {
1679 atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])) {
1680 if (net_ratelimit()) 1679 if (net_ratelimit())
1681 printk(KERN_INFO "TCP: too many of orphaned " 1680 printk(KERN_INFO "TCP: too many of orphaned "
1682 "sockets\n"); 1681 "sockets\n");
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 2ca97b20929d..e61340150ba6 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -78,9 +78,7 @@ static int tcp_out_of_resources(struct sock *sk, int do_reset)
78 if (sk->sk_err_soft) 78 if (sk->sk_err_soft)
79 orphans <<= 1; 79 orphans <<= 1;
80 80
81 if (orphans >= sysctl_tcp_max_orphans || 81 if (tcp_too_many_orphans(sk, orphans)) {
82 (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
83 atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])) {
84 if (net_ratelimit()) 82 if (net_ratelimit())
85 printk(KERN_INFO "Out of socket memory\n"); 83 printk(KERN_INFO "Out of socket memory\n");
86 84