From: Olaf Hering Date: Tue, 29 Nov 2005 13:04:05 +0000 (+0100) Subject: [PATCH] powerpc: prevent stack corruption in call_prom_ret X-Git-Tag: v2.6.15-rc4~4^2^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed1189b7e8cd8144f0b232c220aed4ee26d89463;p=linux-2.6 [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 Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 4ce0105c30..bcdc209dca 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret, va_end(list); for (i = 0; i < nret; i++) - rets[nargs+i] = 0; + args.args[nargs+i] = 0; if (enter_prom(&args, RELOC(prom_entry)) < 0) return PROM_ERROR;