[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550C5A98.5040305@akamai.com>
Date: Fri, 20 Mar 2015 12:36:24 -0500
From: Josh Hunt <johunt@...mai.com>
To: David Miller <davem@...emloft.net>
CC: netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH] fix tcp fin memory accounting
On 03/20/2015 12:20 PM, David Miller wrote:
> From: Josh Hunt <johunt@...mai.com>
> Date: Thu, 19 Mar 2015 19:19:30 -0400
>
>> tcp_send_fin() does not account for the memory it allocates properly, so
>> sk_forward_alloc can be negative in cases where we've sent a FIN:
>>
>> ss example output (ss -amn | grep -B1 f4294):
>> tcp FIN-WAIT-1 0 1 192.168.0.1:45520 192.0.2.1:8080
>> skmem:(r0,rb87380,t0,tb87380,f4294966016,w1280,o0,bl0)
>> --
>> tcp FIN-WAIT-1 0 1 192.168.0.1:8080 192.0.2.1:59710
>> skmem:(r0,rb87380,t0,tb87380,f4294966016,w1280,o0,bl0)
>>
>> This can be resolved by using sk_stream_alloc_skb() instead of calling alloc_skb_fclone()
>> directly. The same fix was made in tcp_connect() in commit 355a901e6cf1 (tcp: make connect() mem charging friendly).
>>
>> With this fix applied I no longer see the negative sk_forward_alloc values (or
>> very large values repoted by ss) in my tests.
>>
>> Signed-off-by: Josh Hunt <johunt@...mai.com>
>
> Applied and queued up for -stable, thanks.
>
Thanks David. Would it be possible to queue up 355a901e6cf1 (tcp: make
connect() mem charging friendly) for stable as well? That is the commit
that fixes this problem in the tcp_connect()/tcp_send_syn_data() cases.
Thanks
Josh
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists