Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118690
b: refs/heads/master
c: 77eb50a
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Schwab authored and Paul Mackerras committed Nov 11, 2008
1 parent d6ad401 commit 21507c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec5d7657f746c46b5fbb3dbec6d0f7d8b6b82961
refs/heads/master: 77eb50aefa5dd2337246dce8b66e18e837c1a8bc
18 changes: 15 additions & 3 deletions trunk/arch/powerpc/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21507c1

Please sign in to comment.