Blob Blame History Raw
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu, 17 Aug 2017 15:07:22 +0200
Subject: bpf: no need to nullify ri->map in xdp_do_redirect
Patch-mainline: v4.14-rc1
Git-commit: 4d6a75b65dbfa910e84b2cbd7cd54468cf33ff9b
References: bsc#1109837

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>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/core/filter.c |    1 -
 1 file changed, 1 deletion(-)

--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2568,7 +2568,6 @@ int xdp_do_redirect(struct net_device *d
 
 	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;