diff mbox series

selftests/net: fix gro.c compilation failure due to non-existent opt_ipproto_off

Message ID 20240712235150.99175-1-jhubbard@nvidia.com (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series selftests/net: fix gro.c compilation failure due to non-existent opt_ipproto_off | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 4 maintainers not CCed: ndesaulniers@google.com justinstitt@google.com nathan@kernel.org morbo@google.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes fail Problems with Fixes tag: 1
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch warning WARNING: Unknown commit id 'c80d53c484e8', maybe rebased or not pulled?
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

John Hubbard July 12, 2024, 11:51 p.m. UTC
Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
was added in later kernel versions), so attempting to initialize one
breaks the build.

Fixes: c80d53c484e8 ("selftests/net: fix uninitialized variables")
Cc: <stable@vger.kernel.org> # 6.6
Reported-by: Ignat Korchagin <ignat@cloudflare.com>
Closes: https://lore.kernel.org/all/8B1717DB-8C4A-47EE-B28C-170B630C4639@cloudflare.com/#t
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 tools/testing/selftests/net/gro.c | 3 ---
 1 file changed, 3 deletions(-)


base-commit: 2ced7518a03d002284999ed8336ffac462a358ec

Comments

John Hubbard July 13, 2024, 12:01 a.m. UTC | #1
On 7/12/24 4:51 PM, John Hubbard wrote:
> Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
> was added in later kernel versions), so attempting to initialize one
> breaks the build.

This is the first time I've tried to fix something in linux-stable, and
I'm not sure that I've made it completely clear. This is only for
linux-6.6.y in linux-stable.

thanks,
Greg Kroah-Hartman July 15, 2024, 12:11 p.m. UTC | #2
On Fri, Jul 12, 2024 at 05:01:38PM -0700, John Hubbard wrote:
> On 7/12/24 4:51 PM, John Hubbard wrote:
> > Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
> > was added in later kernel versions), so attempting to initialize one
> > breaks the build.
> 
> This is the first time I've tried to fix something in linux-stable, and
> I'm not sure that I've made it completely clear. This is only for
> linux-6.6.y in linux-stable.

This worked just fine, now queued up, thanks.

greg k-h
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/gro.c b/tools/testing/selftests/net/gro.c
index b204df4f3332..30024d0ed373 100644
--- a/tools/testing/selftests/net/gro.c
+++ b/tools/testing/selftests/net/gro.c
@@ -113,9 +113,6 @@  static void setup_sock_filter(int fd)
 		next_off = offsetof(struct ipv6hdr, nexthdr);
 	ipproto_off = ETH_HLEN + next_off;
 
-	/* Overridden later if exthdrs are used: */
-	opt_ipproto_off = ipproto_off;
-
 	if (strcmp(testname, "ip") == 0) {
 		if (proto == PF_INET)
 			optlen = sizeof(struct ip_timestamp);