summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ptrace_32.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-04 12:14:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-04 12:14:44 -0700
commitdb217dece3003df0841bacf9556b5c06aa097dae (patch)
tree08612e7696c04c4d8fc2207c3ccf2356f945d230 /arch/sparc/kernel/ptrace_32.c
parent8ce42c8b7fdf4fc008a6fc7349beb8f4dd5cb774 (diff)
parentbdd32ce95f79fb5cc964cd789d7ae4500bba7c6f (diff)
downloadblackbird-op-linux-db217dece3003df0841bacf9556b5c06aa097dae.tar.gz
blackbird-op-linux-db217dece3003df0841bacf9556b5c06aa097dae.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sunxvr500: Ignore secondary output PCI devices. sparc64: Implement perf_arch_fetch_caller_regs sparc64: Update defconfig. sparc64: Fix array size reported by vmemmap_populate() sparc: Fix regset register window handling. drivers/serial/sunsu.c: Correct use after free
Diffstat (limited to 'arch/sparc/kernel/ptrace_32.c')
-rw-r--r--arch/sparc/kernel/ptrace_32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c
index 7e3dfd9bb97e..e608f397e11f 100644
--- a/arch/sparc/kernel/ptrace_32.c
+++ b/arch/sparc/kernel/ptrace_32.c
@@ -65,6 +65,7 @@ static int genregs32_get(struct task_struct *target,
*k++ = regs->u_regs[pos++];
reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
+ reg_window -= 16;
for (; count > 0 && pos < 32; count--) {
if (get_user(*k++, &reg_window[pos++]))
return -EFAULT;
@@ -76,6 +77,7 @@ static int genregs32_get(struct task_struct *target,
}
reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
+ reg_window -= 16;
for (; count > 0 && pos < 32; count--) {
if (get_user(reg, &reg_window[pos++]) ||
put_user(reg, u++))
@@ -141,6 +143,7 @@ static int genregs32_set(struct task_struct *target,
regs->u_regs[pos++] = *k++;
reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
+ reg_window -= 16;
for (; count > 0 && pos < 32; count--) {
if (put_user(*k++, &reg_window[pos++]))
return -EFAULT;
@@ -153,6 +156,7 @@ static int genregs32_set(struct task_struct *target,
}
reg_window = (unsigned long __user *) regs->u_regs[UREG_I6];
+ reg_window -= 16;
for (; count > 0 && pos < 32; count--) {
if (get_user(reg, u++) ||
put_user(reg, &reg_window[pos++]))
OpenPOWER on IntegriCloud