[POWERPC] Fix incorrect enabling of VMX when building signal or user context
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 2 Jun 2008 06:22:59 +0000 (16:22 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jun 2008 01:32:36 +0000 (11:32 +1000)
commit0be234a46596cd19eb56d2cf46836de8221afb6b
tree5752259ba499e1e0e033df1fb59b8c57521a91ba
parentefa58fbf19fb778a8ad2fd000a6dfa9c75263a37
[POWERPC] Fix incorrect enabling of VMX when building signal or user context

When building a signal or a ucontext, we can incorrectly set the MSR_VEC
bit of the kernel pt_regs->msr before returning to userspace if the task
-ever- used VMX.

This can lead to funny result if that stack used it in the past, then
"lost" it (ie. it wasn't enabled after a context switch for example)
and then called get_context.  It can end up with VMX enabled and the
registers containing values from some other task.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/signal_64.c