From: David Ahern <dsa@cumulusnetworks.com>
To: Xin Long <lucien.xin@gmail.com>, network dev <netdev@vger.kernel.org>
Cc: davem@davemloft.net
Subject: Re: [PATCH net] ipv6: fix a dst leak when removing its exception
Date: Wed, 14 Nov 2018 11:03:12 -0800 [thread overview]
Message-ID: <8e49ab9d-e65f-510e-a330-2ba364a4d2c5@cumulusnetworks.com> (raw)
In-Reply-To: <b031b44110fcb06d780ed60ecadfa4e8bc39acfb.1542127708.git.lucien.xin@gmail.com>
On 11/13/18 8:48 AM, Xin Long wrote:
> 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>
> ---
> net/ipv6/route.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
was this problem actually hit or is this patch based on a code analysis?
next prev parent reply other threads:[~2018-11-15 5:07 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 [this message]
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
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=8e49ab9d-e65f-510e-a330-2ba364a4d2c5@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=davem@davemloft.net \
--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