arch: fixed error in the calculation of nwords caused an out of bounds

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21
2023-03-09 21:03:20 +08:00
committed by Masayuki Ishikawa
parent a581b99266
commit 12bb4f04f1
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ void sparc_stack_color(void *stackbase, size_t nbytes)
}
stkend = STACK_ALIGN_DOWN(stkend);
nwords = (stkend - (uintptr_t)stackbase) >> 2;
nwords = (stkend - (uintptr_t)stkptr) >> 2;
/* Set the entire stack to the coloration value */