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 <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
1 parent 46f1619 commit efcb529

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)