diff options
| author | Dust Li <dust.li@linux.alibaba.com> | 2019-04-01 16:04:53 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:38:41 +0200 |
| commit | 7243e35209567783916eeb51669c886564a5a1be (patch) | |
| tree | f2135d6f327a0c4cb86ebe983338f36b29e2326d /include | |
| parent | 0e0afb06e11c7497893d3066d9474ad9761fe76b (diff) | |
tcp: fix a potential NULL pointer dereference in tcp_sk_exit
[ Upstream commit b506bc975f60f06e13e74adb35e708a23dc4e87c ]
When tcp_sk_init() failed in inet_ctl_sock_create(),
'net->ipv4.tcp_congestion_control' will be left
uninitialized, but tcp_sk_exit() hasn't check for
that.
This patch add checking on 'net->ipv4.tcp_congestion_control'
in tcp_sk_exit() to prevent NULL-ptr dereference.
Fixes: 6670e1524477 ("tcp: Namespace-ify sysctl_tcp_default_congestion_control")
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
