diff mbox series

[net] net/sched: fix incorrect vlan_push_eth dest field

Message ID 20220323092506.21639-1-louis.peens@corigine.com (mailing list archive)
State Accepted
Commit 054d5575cd6ed2792611a7cbb8c88663cc873780
Delegated to: Netdev Maintainers
Headers show
Series [net] net/sched: fix incorrect vlan_push_eth dest field | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/apply fail Patch does not apply to net

Commit Message

Louis Peens March 23, 2022, 9:25 a.m. UTC
From: Louis Peens <louis.peens@corigine.com>

Seems like a potential copy-paste bug slipped in here,
the second memcpy should of course be populating src
and not dest.

Fixes: ab95465cde23 ("net/sched: add vlan push_eth and pop_eth action to the hardware IR")
Signed-off-by: Louis Peens <louis.peens@corigine.com>
---
 include/net/tc_act/tc_vlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 23, 2022, 5:50 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 23 Mar 2022 11:25:06 +0200 you wrote:
> From: Louis Peens <louis.peens@corigine.com>
> 
> Seems like a potential copy-paste bug slipped in here,
> the second memcpy should of course be populating src
> and not dest.
> 
> Fixes: ab95465cde23 ("net/sched: add vlan push_eth and pop_eth action to the hardware IR")
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> 
> [...]

Here is the summary with links:
  - [net] net/sched: fix incorrect vlan_push_eth dest field
    https://git.kernel.org/netdev/net-next/c/054d5575cd6e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/net/tc_act/tc_vlan.h b/include/net/tc_act/tc_vlan.h
index a97600f742de..904eddfc1826 100644
--- a/include/net/tc_act/tc_vlan.h
+++ b/include/net/tc_act/tc_vlan.h
@@ -84,7 +84,7 @@  static inline void tcf_vlan_push_eth(unsigned char *src, unsigned char *dest,
 {
 	rcu_read_lock();
 	memcpy(dest, rcu_dereference(to_vlan(a)->vlan_p)->tcfv_push_dst, ETH_ALEN);
-	memcpy(dest, rcu_dereference(to_vlan(a)->vlan_p)->tcfv_push_src, ETH_ALEN);
+	memcpy(src, rcu_dereference(to_vlan(a)->vlan_p)->tcfv_push_src, ETH_ALEN);
 	rcu_read_unlock();
 }