[PATCH] powerpc: prevent stack corruption in call_prom_ret
authorOlaf Hering <olh@suse.de>
Tue, 29 Nov 2005 13:04:05 +0000 (14:04 +0100)
committerPaul Mackerras <paulus@samba.org>
Wed, 30 Nov 2005 02:55:59 +0000 (13:55 +1100)
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 <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom_init.c

index 4ce0105c308ea04b7be7fd88524b4c8b25fdef73..bcdc209dca8525b5337678a1fdb80ac09f58871f 100644 (file)
@@ -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;