Skip to content

Commit

Permalink
MIPS: fw: sni: Fix out of bounds init of o32 stack
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
Thomas Bogendoerfer authored and paulburton committed Oct 9, 2019
1 parent 46f1619 commit efcb529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/fw/sni/sniprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

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

#define __PROM_O32(fun, arg) fun arg __asm__(#fun); \
__asm__(#fun " = call_o32")
Expand Down

0 comments on commit efcb529

Please sign in to comment.