diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-10-09 18:10:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-06 14:09:15 +0300 |
commit | 7a5c21af789d6871de3f05185e221fb7eea6804b (patch) | |
tree | 1bdf98afbc1e11c4427f8cf6760bfa452ad22eac /arch/mips/fw | |
parent | 23d94f1fec0aec5e547ae0c96c5da28d12fa652c (diff) | |
download | linux-7a5c21af789d6871de3f05185e221fb7eea6804b.tar.xz |
MIPS: fw: sni: Fix out of bounds init of o32 stack
[ Upstream commit efcb529694c3b707dc0471b312944337ba16e4dd ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips/fw')
-rw-r--r-- | arch/mips/fw/sni/sniprom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/fw/sni/sniprom.c b/arch/mips/fw/sni/sniprom.c index 6aa264b9856a..7c6151d412bd 100644 --- a/arch/mips/fw/sni/sniprom.c +++ b/arch/mips/fw/sni/sniprom.c @@ -42,7 +42,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") |