Skip to content

Commit ed1189b

Browse files
olafheringpaulusmack
authored andcommitted
[PATCH] powerpc: prevent stack corruption in call_prom_ret
Use the correct pointer to clear the memory of the return values, to prevent stack corruption in the callers stackframe. Signed-off-by: Olaf Hering <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 48abec0 commit ed1189b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/prom_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret,
265265
va_end(list);
266266

267267
for (i = 0; i < nret; i++)
268-
rets[nargs+i] = 0;
268+
args.args[nargs+i] = 0;
269269

270270
if (enter_prom(&args, RELOC(prom_entry)) < 0)
271271
return PROM_ERROR;

0 commit comments

Comments
 (0)