Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec9358fc authored by Eric Dumazet's avatar Eric Dumazet Committed by Lorenzo Colitti
Browse files

tcp: ipv4: initialize unicast_sock sk_pacing_rate



[ Upstream commit 811230cd853d62f09ed0addd0ce9a1b9b0e13fb5 ]

When I added sk_pacing_rate field, I forgot to initialize its value
in the per cpu unicast_sock used in ip_send_unicast_reply()

This means that for sch_fq users, RST packets, or ACK packets sent
on behalf of TIME_WAIT sockets might be sent to slowly or even dropped
once we reach the per flow limit.

[Cherry-pick of stable/linux-3.18.y 617417f9]

Bug: 16355602
Change-Id: Ib8d6e9865f25f768b2f1693d82801b472f1e1db3
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Fixes: 95bd09eb ("tcp: TSO packets automatic sizing")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eae8f6c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1517,6 +1517,7 @@ static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
		.sk_wmem_alloc	= ATOMIC_INIT(1),
		.sk_allocation	= GFP_ATOMIC,
		.sk_flags	= (1UL << SOCK_USE_WRITE_QUEUE),
		.sk_pacing_rate = ~0U,
	},
	.pmtudisc	= IP_PMTUDISC_WANT,
	.uc_ttl		= -1,