Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, dsa@cumulusnetworks.com
Subject: Re: [PATCH net] ipv6: fix a dst leak when removing its exception
Date: Fri, 16 Nov 2018 19:45:28 -0800 (PST)	[thread overview]
Message-ID: <20181116.194528.2115277018889229926.davem@davemloft.net> (raw)
In-Reply-To: <b031b44110fcb06d780ed60ecadfa4e8bc39acfb.1542127708.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Wed, 14 Nov 2018 00:48:28 +0800

> These is no need to hold dst before calling rt6_remove_exception_rt().
> The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(),
> which has been removed in Commit 93531c674315 ("net/ipv6: separate
> handling of FIB entries from dst based routes"). Otherwise, it will
> cause a dst leak.
> 
> This patch is to simply remove the dst_hold_safe() call before calling
> rt6_remove_exception_rt() and also do the same in ip6_del_cached_rt().
> It's safe, because the removal of the exception that holds its dst's
> refcnt is protected by rt6_exception_lock.
> 
> Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
> Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
> Reported-by: Li Shuang <shuali@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied and queued up for -stable.

      parent reply	other threads:[~2018-11-17 14:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 16:48 [PATCH net] ipv6: fix a dst leak when removing its exception Xin Long
2018-11-14 19:03 ` David Ahern
2018-11-15  6:33   ` David Ahern
2018-11-15  7:23     ` Xin Long
2018-11-15 18:17       ` David Ahern
2018-11-15 19:13         ` Mika Penttilä
2018-11-20  2:16       ` David Miller
2018-11-20  2:19         ` David Ahern
2018-11-15 19:49 ` David Ahern
2018-11-17  3:45 ` David Miller [this message]

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=20181116.194528.2115277018889229926.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox