Netdev List
 help / color / mirror / Atom feed
From: Martin KaFai Lau <kafai@fb.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net/ip6_tunnel: fix dst leak
Date: Wed, 18 Nov 2015 09:37:52 -0800	[thread overview]
Message-ID: <20151118173730.GA22676@kafai-mba.local> (raw)
In-Reply-To: <9dd416a82166a27f5cf5eda71a63222a0eb96c04.1447859978.git.pabeni@redhat.com>

On Wed, Nov 18, 2015 at 04:40:19PM +0100, Paolo Abeni wrote:
> the commit cdf3464e6c6b ("ipv6: Fix dst_entry refcnt bugs in ip6_tunnel")
> introduced percpu storage for ip6_tunnel dst cache, but while clearing
> such cache it used raw_cpu_ptr to walk the per cpu entries, so cached
> dst on non current cpu are not actually reset.
>
> This patch replaces raw_cpu_ptr with per_cpu_ptr, properly cleaning
> such storage.
Thanks for fixing it.

Acked-by: Martin KaFai Lau <kafai@fb.com>

>
> Fixes: cdf3464e6c6b ("ipv6: Fix dst_entry refcnt bugs in ip6_tunnel")
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>  net/ipv6/ip6_tunnel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index eabffbb..137fca4 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -177,7 +177,7 @@ void ip6_tnl_dst_reset(struct ip6_tnl *t)
>  	int i;
>
>  	for_each_possible_cpu(i)
> -		ip6_tnl_per_cpu_dst_set(raw_cpu_ptr(t->dst_cache), NULL);
> +		ip6_tnl_per_cpu_dst_set(per_cpu_ptr(t->dst_cache, i), NULL);
>  }
>  EXPORT_SYMBOL_GPL(ip6_tnl_dst_reset);
>
> --
> 1.8.3.1
>

  reply	other threads:[~2015-11-18 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 15:40 [PATCH net] net/ip6_tunnel: fix dst leak Paolo Abeni
2015-11-18 17:37 ` Martin KaFai Lau [this message]
2015-11-18 21:26 ` 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=20151118173730.GA22676@kafai-mba.local \
    --to=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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