From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
Neil Horman <nhorman@tuxdriver.com>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: Re: [PATCH net] sctp: change to hold/put transport for proto_unreach_timer
Date: Fri, 13 Nov 2020 09:35:29 -0300 [thread overview]
Message-ID: <20201113123529.GI3913@localhost.localdomain> (raw)
In-Reply-To: <7cb07ff74acd144f14a4467c7dddd12a940fbf52.1605259104.git.lucien.xin@gmail.com>
Hi,
On Fri, Nov 13, 2020 at 05:18:24PM +0800, Xin Long wrote:
...
> diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> index 813d307..0a51150 100644
> --- a/net/sctp/sm_sideeffect.c
> +++ b/net/sctp/sm_sideeffect.c
> @@ -419,7 +419,7 @@ void sctp_generate_proto_unreach_event(struct timer_list *t)
> /* Try again later. */
> if (!mod_timer(&transport->proto_unreach_timer,
> jiffies + (HZ/20)))
> - sctp_association_hold(asoc);
> + sctp_transport_hold(transport);
> goto out_unlock;
> }
>
The chunk above covers the socket busy case, but for the normal cases
it also needs:
@@ -435,7 +435,7 @@ void sctp_generate_proto_unreach_event(struct timer_list *t)
out_unlock:
bh_unlock_sock(sk);
- sctp_association_put(asoc);
+ sctp_transport_put(asoc);
}
/* Handle the timeout of the RE-CONFIG timer. */
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index 806af58..60fcf31 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -133,7 +133,7 @@ void sctp_transport_free(struct sctp_transport *transport)
>
> /* Delete the ICMP proto unreachable timer if it's active. */
> if (del_timer(&transport->proto_unreach_timer))
> - sctp_association_put(transport->asoc);
> + sctp_transport_put(transport);
>
> sctp_transport_put(transport);
Btw, quite noticeable on the above list of timers that only this timer
was using a reference on the asoc. Seems we're good now, then. :-)
Marcelo
next prev parent reply other threads:[~2020-11-13 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 9:18 [PATCH net] sctp: change to hold/put transport for proto_unreach_timer Xin Long
2020-11-13 12:35 ` Marcelo Ricardo Leitner [this message]
2020-11-14 5:26 ` Xin Long
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=20201113123529.GI3913@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
/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.