]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging/octeon: fix up merge error
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 29 Mar 2020 16:12:31 +0000 (09:12 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:24:51 +0000 (14:24 +0100)
BugLink: https://bugs.launchpad.net/bugs/1908564
commit 673b41e04a035d760bc0aff83fa9ee24fd9c2779 upstream.

There's a semantic conflict in the Octeon staging network driver, which
used the skb_reset_tc() function to reset skb state when re-using an
skb.  But that inline helper function was removed in mainline by commit
2c64605b590e ("net: Fix CONFIG_NET_CLS_ACT=n and
CONFIG_NFT_FWD_NETDEV={y, m} build").

Fix it by using skb_reset_redirect() instead.  Also move it out of the

This code path only ends up triggering if REUSE_SKBUFFS_WITHOUT_FREE is
enabled, which in turn only happens if you don't have CONFIG_NETFILTER
configured.  Which was how this wasn't caught by the usual allmodconfig
builds.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/staging/octeon/ethernet-tx.c

index 83469061a542648aafc5b150969c55ab222261de..fe6e1ae73460a913f37d4e5a192fb5198941a807 100644 (file)
@@ -352,10 +352,10 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
        skb_dst_set(skb, NULL);
        skb_ext_reset(skb);
        nf_reset_ct(skb);
+       skb_reset_redirect(skb);
 
 #ifdef CONFIG_NET_SCHED
        skb->tc_index = 0;
-       skb_reset_tc(skb);
 #endif /* CONFIG_NET_SCHED */
 #endif /* REUSE_SKBUFFS_WITHOUT_FREE */