Skip to content

Commit

Permalink
powerpc: Fix uninitialised variable in VSX alignment code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Neuling authored and Paul Mackerras committed Sep 3, 2008
1 parent d26acd9 commit 78fbc82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/align.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 78fbc82

Please sign in to comment.