]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: zero ca_priv area when switching cc algorithms
authorFlorian Westphal <fw@strlen.de>
Mon, 21 Nov 2016 09:08:37 +0000 (10:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Nov 2016 18:13:56 +0000 (13:13 -0500)
commit54b8d020f998ce174c174b4f1211c11857c8f511
tree11b22cf7efa89d4ee5f657f451616340bd290a31
parent0b37bce3bbae76fd5804d6bb94ca6e637e734c4c
tcp: zero ca_priv area when switching cc algorithms

We need to zero out the private data area when application switches
connection to different algorithm (TCP_CONGESTION setsockopt).

When congestion ops get assigned at connect time everything is already
zeroed because sk_alloc uses GFP_ZERO flag.  But in the setsockopt case
this contains whatever previous cc placed there.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_cong.c