]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Fix uninitialised variable in VSX alignment code
authorMichael Neuling <mikey@neuling.org>
Thu, 28 Aug 2008 04:57:39 +0000 (14:57 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Sep 2008 10:53:14 +0000 (20:53 +1000)
This fixes an uninitialised variable in the VSX alignment code.  It can
cause warnings from GCC (noticed with gcc-4.1.1).  Gcc is actually
correct in this instance, and this bug could cause the alignment
interrupt handler to send a SIGSEGV to the process on a legitimate
access.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/align.c

index 367129789cc0854a01fd96efc88824d7f9c995a8..5af4e9b2dbe2c6dcdde0213809f0d74673e19252 100644 (file)
@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
                       unsigned int flags, unsigned int length)
 {
        char *ptr = (char *) &current->thread.TS_FPR(reg);
-       int ret;
+       int ret = 0;
 
        flush_vsx_to_thread(current);