Skip to content

Commit 0e7face

Browse files
arndbjmberg-intel
authored andcommitted
wifi: iwlegacy: work around excessive stack usage on clang/kasan
In some rare randconfig builds, I seem to trigger a bug in clang where it unrolls a loop but then runs out of registers, which then get spilled to the stack: net/wireless/intel/iwlegacy/4965-rs.c:2262:1: error: stack frame size (1696) exceeds limit (1280) in 'il4965_rs_rate_init' [-Werror,-Wframe-larger-than] This seems to be the same one I saw in the omapdrm driver, and there is an easy workaround by not inlining the il4965_rs_rate_scale_clear_win function. Link: llvm/llvm-project#143908 Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 5c8013a commit 0e7face

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/wireless/intel/iwlegacy/4965-rs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ il4965_rs_extract_rate(u32 rate_n_flags)
203203
return (u8) (rate_n_flags & 0xFF);
204204
}
205205

206-
static void
206+
/* noinline works around https://github.com/llvm/llvm-project/issues/143908 */
207+
static noinline_for_stack void
207208
il4965_rs_rate_scale_clear_win(struct il_rate_scale_data *win)
208209
{
209210
win->data = 0;

0 commit comments

Comments
 (0)