linux/net/dccp/ccids
Alexey Kodanev e67eb7101a dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
commit dd5684ecae 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 120e9dabaf ("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>
History 2018-03-03 15:52:28 +00:00
..
lib dccp: re-enable debug macro 2014-02-16 23:45:00 -05:00
ccid2.c dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state 2018-03-03 15:52:28 +00:00
ccid2.h dccp ccid-2: prevent cwnd > Sequence Window 2011-08-01 07:52:35 -06:00
ccid3.c dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO) 2012-08-15 21:36:31 -07:00
ccid3.h dccp ccid-3: Remove redundant 'options_received' struct 2010-09-21 12:14:26 +02:00
Kconfig net/dccp/ccids: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:33 -08:00