All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: dccp@vger.kernel.org
Subject: Re: [PATCH net] dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
Date: Thu, 25 Jan 2018 18:03:47 +0000	[thread overview]
Message-ID: <1516903427.3715.52.camel@gmail.com> (raw)
In-Reply-To: <1516902237-17339-1-git-send-email-alexey.kodanev@oracle.com>

On Thu, 2018-01-25 at 20:43 +0300, Alexey Kodanev wrote:
> 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 sk_stop_timer() 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: 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---

I understand your fix, but not why commit 120e9dabaf55 is bug origin.

Looks like this always had been buggy : Timer logic should have checked
socket state from day 0.

I did not move sk_stop_timer() to sk_destruct()



WARNING: multiple messages have this Message-ID (diff)
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexey Kodanev <alexey.kodanev@oracle.com>, netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>,
	David Miller <davem@davemloft.net>,
	dccp@vger.kernel.org
Subject: Re: [PATCH net] dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
Date: Thu, 25 Jan 2018 10:03:47 -0800	[thread overview]
Message-ID: <1516903427.3715.52.camel@gmail.com> (raw)
In-Reply-To: <1516902237-17339-1-git-send-email-alexey.kodanev@oracle.com>

On Thu, 2018-01-25 at 20:43 +0300, Alexey Kodanev wrote:
> 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 sk_stop_timer() 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: 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---

I understand your fix, but not why commit 120e9dabaf55 is bug origin.

Looks like this always had been buggy : Timer logic should have checked
socket state from day 0.

I did not move sk_stop_timer() to sk_destruct()

  reply	other threads:[~2018-01-25 18:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 17:43 [PATCH net] dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state Alexey Kodanev
2018-01-25 17:43 ` Alexey Kodanev
2018-01-25 18:03 ` Eric Dumazet [this message]
2018-01-25 18:03   ` Eric Dumazet
2018-01-26 11:53 ` Alexey Kodanev
2018-01-26 12:02   ` Alexey Kodanev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516903427.3715.52.camel@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=dccp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.