netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: Tommi Rantala <tt.rantala@gmail.com>
Cc: Tommi Rantala <tommi.t.rantala@nokia.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	linux-sctp@vger.kernel.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Subject: Re: sctp netns "unregister_netdevice: waiting for lo to become free. Usage count = 1"
Date: Fri, 2 Feb 2018 15:17:00 +0300	[thread overview]
Message-ID: <3ec4782b-272a-0509-40fc-bc88b827e102@oracle.com> (raw)
In-Reply-To: <CA+ydwtrgw+kuOkZC=o33fNZqr6WtVoTKAiE46z=RFjNkc0kV5g@mail.gmail.com>

On 02.02.2018 11:27, Tommi Rantala wrote:
> 2018-02-02 1:57 GMT+02:00 Alexey Kodanev <alexey.kodanev@oracle.com>:
>> For ipv6 part, shouldn't we release 'bdst' there if the previous address
>> match is better and we continue to the next iteration?
> 
> Good catch!
> 

On the second thought, I think, we should also check 'bdst' ptr for
the error earlier, i.e. right after 'bdst = ip6_dst_lookup_flow(...)'.
I'll prepare the patch.

Thanks,
Alexey


> Didn't see that one.
> 
> Tommi
> 
>> diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
>> index 5d4c15b..a044096 100644
>> --- a/net/sctp/ipv6.c
>> +++ b/net/sctp/ipv6.c
>> @@ -336,8 +336,11 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
>>                 }
>>
>>                 bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
>> -               if (matchlen > bmatchlen)
>> +               if (matchlen > bmatchlen) {
>> +                       if (!IS_ERR(bdst))
>> +                               dst_release(bdst);
>>                         continue;
>> +               }
>>
>>                 if (!IS_ERR_OR_NULL(dst))
>>                         dst_release(dst);
>>
>> Thanks,
>> Alexey

  reply	other threads:[~2018-02-02 12:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 15:55 sctp netns "unregister_netdevice: waiting for lo to become free. Usage count = 1" Tommi Rantala
2018-01-30 15:59 ` Neil Horman
2018-01-30 19:24   ` Tommi Rantala
2018-01-30 21:03     ` Neil Horman
2018-01-31  9:42       ` Tommi Rantala
2018-01-31 12:13         ` Tommi Rantala
2018-01-31 12:31         ` Neil Horman
2018-01-31 17:51           ` Tommi Rantala
2018-02-01 18:02             ` Tommi Rantala
2018-02-01 19:23               ` Neil Horman
2018-02-01 20:41                 ` Tommi Rantala
2018-02-02 12:34                   ` Neil Horman
2018-02-04  9:05                     ` Tommi Rantala
2018-02-01 23:57               ` Alexey Kodanev
2018-02-02  8:27                 ` Tommi Rantala
2018-02-02 12:17                   ` Alexey Kodanev [this message]
2018-01-30 22:52 ` Marcelo Ricardo Leitner
2018-01-31  6:58   ` Tommi Rantala

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=3ec4782b-272a-0509-40fc-bc88b827e102@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=tommi.t.rantala@nokia.com \
    --cc=tt.rantala@gmail.com \
    --cc=vyasevich@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).