aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-11-12 08:43:22 +1100
committerPaul Mackerras <paulus@samba.org>2008-11-12 08:43:22 +1100
commit486936cd93e99c802153b3f2f629c5ce62b8c0d4 (patch)
tree51e261a96e1fb6b51d4a6afb92bfc2480e150b6c /arch/powerpc/kernel
parent1c1b777a5673b57a6c0377ba60a790d05e4a0676 (diff)
parentf21f237cf55494c3a4209de323281a3b0528da10 (diff)
Merge branch 'linux-2.6' into next
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/misc_32.S4
-rw-r--r--arch/powerpc/kernel/signal_32.c18
2 files changed, 19 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 6a9b4bf0d17..bdc8b0e860e 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -470,6 +470,8 @@ _GLOBAL(_tlbil_pid)
mfspr r3,SPRN_MMUCSR0
andi. r3,r3,MMUCSR0_TLBFI@l
bne 1b
+ msync
+ isync
blr
/*
@@ -486,6 +488,8 @@ _GLOBAL(_tlbil_va)
rlwinm r4,r4,0,1,31
mtspr SPRN_MAS1,r4
tlbwe
+ msync
+ isync
blr
#endif /* CONFIG_FSL_BOOKE */
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index a6a43103655..b13abf30599 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -941,9 +941,21 @@ long sys_swapcontext(struct ucontext __user *old_ctx,
#ifdef CONFIG_PPC64
unsigned long new_msr = 0;
- if (new_ctx &&
- get_user(new_msr, &new_ctx->uc_mcontext.mc_gregs[PT_MSR]))
- return -EFAULT;
+ if (new_ctx) {
+ struct mcontext __user *mcp;
+ u32 cmcp;
+
+ /*
+ * Get pointer to the real mcontext. No need for
+ * access_ok since we are dealing with compat
+ * pointers.
+ */
+ if (__get_user(cmcp, &new_ctx->uc_regs))
+ return -EFAULT;
+ mcp = (struct mcontext __user *)(u64)cmcp;
+ if (__get_user(new_msr, &mcp->mc_gregs[PT_MSR]))
+ return -EFAULT;
+ }
/*
* Check that the context is not smaller than the original
* size (with VMX but without VSX)