[CRIU] [PATCH] sockets: don't double buffer size for sockets

Pavel Emelyanov xemul at parallels.com
Tue Sep 17 14:47:06 EDT 2013


On 09/17/2013 07:21 PM, Cyrill Gorcunov wrote:
> On Tue, Sep 17, 2013 at 07:03:24PM +0400, Andrey Vagin wrote:
>> SO_SNDBUF and SO_RCVBUF sets a double input value, because
>> "Linux reserves half of te socket buffer for metadata."
>>
>> So if a process is suspended/restored many times, a socket buffer
>> size is doubled on each iteration and in a one moment it is overflowed.
>> Very likely the program hangs in such situation, because the socket with
>> negative buffer size is unusable.
>>
>> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> 
> Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
> 
> Good catch!
> .
> 


applied


More information about the CRIU mailing list