Skip to content

Commit efcb529

Browse files
Thomas Bogendoerferpaulburton
authored andcommitted
MIPS: fw: sni: Fix out of bounds init of o32 stack
Use ARRAY_SIZE to caluculate the top of the o32 stack. Signed-off-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: [email protected]
1 parent 46f1619 commit efcb529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/fw/sni/sniprom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
/* O32 stack has to be 8-byte aligned. */
4545
static u64 o32_stk[4096];
46-
#define O32_STK &o32_stk[sizeof(o32_stk)]
46+
#define O32_STK (&o32_stk[ARRAY_SIZE(o32_stk)])
4747

4848
#define __PROM_O32(fun, arg) fun arg __asm__(#fun); \
4949
__asm__(#fun " = call_o32")

0 commit comments

Comments
 (0)