android_kernel_samsung_msm8976/net/dccp
Alexey Kodanev 6686f8be53 dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
commit dd5684ecae3bd8e44b644f50e2c12c7e57fdfef5 upstream.

ccid2_hc_tx_rto_expire() timer callback always restarts the timer
again and can run indefinitely (unless it is stopped outside), and after
commit 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time"),
which moved ccid_hc_tx_delete() (also includes sk_stop_timer()) from
dccp_destroy_sock() to sk_destruct(), this started to happen quite often.
The timer prevents releasing the socket, as a result, sk_destruct() won't
be called.

Found with LTP/dccp_ipsec tests running on the bonding device,
which later couldn't be unloaded after the tests were completed:

  unregister_netdevice: waiting for bond0 to become free. Usage count = 148

Fixes: 2a91aa3967 ("[DCCP] CCID2: Initial CCID2 (TCP-Like) implementation")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:32 +02:00
..
ccids dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state 2019-07-27 21:46:32 +02:00
Kconfig net/dccp: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:34 -08:00
Makefile
ackvec.c
ackvec.h net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
ccid.c net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
ccid.h dccp: check ccid before dereferencing 2012-08-15 21:36:31 -07:00
dccp.h net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
diag.c
feat.c net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
feat.h
input.c dccp: fix freeing skb too early for IPV6_RECVPKTINFO 2017-08-01 03:09:10 -07:00
ipv4.c dccp/tcp: fix routing redirect race 2019-07-27 21:43:13 +02:00
ipv6.c dccp/tcp: fix routing redirect race 2019-07-27 21:43:13 +02:00
ipv6.h
minisocks.c dccp: Unlock sock before calling sk_free() 2019-07-27 21:44:00 +02:00
options.c net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
output.c net: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:45 -07:00
probe.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
proto.c dccp: CVE-2017-8824: use-after-free in DCCP code 2019-07-27 21:45:45 +02:00
qpolicy.c
sysctl.c net: Convert all sysctl registrations to register_net_sysctl 2012-04-20 21:22:30 -04:00
timer.c