summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2020-05-27 16:51:13 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-27 21:34:48 +0300
commitb3b6a84c6a920c60fd1393c43818b3955441424b (patch)
tree1432d966e59de847d6fbdf59222e983e8684be2d /net/bridge
parent7e0afbdfd13d1e708fe96e31c46c4897101a6a43 (diff)
downloadlinux-b3b6a84c6a920c60fd1393c43818b3955441424b.tar.xz
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 <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_multicast.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index ad12fe3fca8c..83490bf73a13 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -2413,7 +2413,8 @@ void br_multicast_uninit_stats(struct net_bridge *br)
free_percpu(br->mcast_stats);
}
-static void mcast_stats_add_dir(u64 *dst, u64 *src)
+/* noinline for https://bugs.llvm.org/show_bug.cgi?id=45802#c9 */
+static noinline_for_stack void mcast_stats_add_dir(u64 *dst, u64 *src)
{
dst[BR_MCAST_DIR_RX] += src[BR_MCAST_DIR_RX];
dst[BR_MCAST_DIR_TX] += src[BR_MCAST_DIR_TX];