aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorArun Sharma <[email protected]>2012-01-30 22:16:06 +0000
committerDavid S. Miller <[email protected]>2012-02-01 19:41:50 +0000
commitefcdbf24fd5daa88060869e51ed49f68b7ac8708 (patch)
tree8c771a1ef2c93f1ba959709d6ffb4fd56af53699 /net/ipv4/tcp_timer.c
parentnet/hyperv: rx_bytes should account the ether header size (diff)
downloadkernel-efcdbf24fd5daa88060869e51ed49f68b7ac8708.tar.gz
kernel-efcdbf24fd5daa88060869e51ed49f68b7ac8708.zip
net: Disambiguate kernel message
Some of our machines were reporting: TCP: too many of orphaned sockets even when the number of orphaned sockets was well below the limit. We print a different message depending on whether we're out of TCP memory or there are too many orphaned sockets. Also move the check out of line and cleanup the messages that were printed. Signed-off-by: Arun Sharma <[email protected]> Suggested-by: Mohan Srinivasan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: David Miller <[email protected]> Cc: Glauber Costa <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index a516d1e399df..cd2e0723266d 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -77,10 +77,7 @@ static int tcp_out_of_resources(struct sock *sk, int do_reset)
if (sk->sk_err_soft)
shift++;
- if (tcp_too_many_orphans(sk, shift)) {
- if (net_ratelimit())
- printk(KERN_INFO "Out of socket memory\n");
-
+ if (tcp_check_oom(sk, shift)) {
/* Catch exceptional cases, when connection requires reset.
* 1. Last segment was sent recently. */
if ((s32)(tcp_time_stamp - tp->lsndtime) <= TCP_TIMEWAIT_LEN ||