Skip to content
Commit 1fd180ca authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

sockets: don't double buffer size for sockets



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: default avatarAndrey Vagin <avagin@openvz.org>
Acked-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 14f98abf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment