netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>, davem@davemloft.net
Cc: ast@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] bpf: no need to nullify ri->map in xdp_do_redirect
Date: Thu, 17 Aug 2017 08:59:52 -0700	[thread overview]
Message-ID: <5995BD78.1070808@gmail.com> (raw)
In-Reply-To: <782d0b6850cb1a63230c0fd634f1e61d67a01e60.1502975082.git.daniel@iogearbox.net>

On 08/17/2017 06:07 AM, Daniel Borkmann wrote:
> We are guaranteed to have a NULL ri->map in this branch since
> we test for it earlier, so we don't need to reset it here.
> 
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> ---
>  net/core/filter.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/core/filter.c b/net/core/filter.c
> index e9f8dce..ea3ca34 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -2568,7 +2568,6 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp,
>  
>  	fwd = dev_get_by_index_rcu(dev_net(dev), index);
>  	ri->ifindex = 0;
> -	ri->map = NULL;
>  	if (unlikely(!fwd)) {
>  		bpf_warn_invalid_xdp_redirect(index);
>  		return -EINVAL;
> 

Thanks this was on my todo list as well.

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2017-08-17 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17 13:07 [PATCH net-next] bpf: no need to nullify ri->map in xdp_do_redirect Daniel Borkmann
2017-08-17 15:59 ` John Fastabend [this message]
2017-08-17 17:16 ` 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=5995BD78.1070808@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).