Skip to content

Commit b3b6a84

Browse files
arndbdavem330
authored andcommitted
bridge: multicast: work around clang bug
Clang-10 and clang-11 run into a corner case of the register allocator on 32-bit ARM, leading to excessive stack usage from register spilling: net/bridge/br_multicast.c:2422:6: error: stack frame size of 1472 bytes in function 'br_multicast_get_stats' [-Werror,-Wframe-larger-than=] Work around this by marking one of the internal functions as noinline_for_stack. Link: https://bugs.llvm.org/show_bug.cgi?id=45802#c9 Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7e0afbd commit b3b6a84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bridge/br_multicast.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,8 @@ void br_multicast_uninit_stats(struct net_bridge *br)
24132413
free_percpu(br->mcast_stats);
24142414
}
24152415

2416-
static void mcast_stats_add_dir(u64 *dst, u64 *src)
2416+
/* noinline for https://bugs.llvm.org/show_bug.cgi?id=45802#c9 */
2417+
static noinline_for_stack void mcast_stats_add_dir(u64 *dst, u64 *src)
24172418
{
24182419
dst[BR_MCAST_DIR_RX] += src[BR_MCAST_DIR_RX];
24192420
dst[BR_MCAST_DIR_TX] += src[BR_MCAST_DIR_TX];

0 commit comments

Comments
 (0)