Subject: [PATCH] prevent stack corruption in call_prom_ret

From: Olaf Hering <[email-masked]>
Date: Tue, 29 Nov 2005 14:04:05 +0100

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-masked]>

 arch/powerpc/kernel/prom_init.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.15-rc3-olh/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-2.6.15-rc3-olh.orig/arch/powerpc/kernel/prom_init.c
+++ linux-2.6.15-rc3-olh/arch/powerpc/kernel/prom_init.c
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const ch
 	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;
-- 
short story of a lazy sysadmin:
 alias appserv=wotan