]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
inet: shrink struct flowi_common
authorEric Dumazet <edumazet@google.com>
Wed, 25 Oct 2023 14:10:37 +0000 (14:10 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 2 Nov 2023 08:31:02 +0000 (09:31 +0100)
I am looking at syzbot reports triggering kernel stack overflows
involving a cascade of ipvlan devices.

We can save 8 bytes in struct flowi_common.

This patch alone will not fix the issue, but is a start.

Fixes: 24ba14406c5c ("route: Add multipath_hash in flowi_common to make user-define hash")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: wenxu <wenxu@ucloud.cn>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20231025141037.3448203-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/flow.h

index 7f0adda3bf2fed28c53352d9021574b5eade2738..335bbc52171c10eb4b4b7e03a18eb8147902c6ac 100644 (file)
@@ -40,8 +40,8 @@ struct flowi_common {
 #define FLOWI_FLAG_KNOWN_NH            0x02
        __u32   flowic_secid;
        kuid_t  flowic_uid;
-       struct flowi_tunnel flowic_tun_key;
        __u32           flowic_multipath_hash;
+       struct flowi_tunnel flowic_tun_key;
 };
 
 union flowi_uli {