Merge branch 'hid-suspend' into picolcd
[pandora-kernel.git] / arch / sparc / kernel / ptrace_64.c
index 2f6524d..aa90da0 100644 (file)
@@ -492,6 +492,7 @@ static int genregs32_get(struct task_struct *target,
                        *k++ = regs->u_regs[pos++];
 
                reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+               reg_window -= 16;
                if (target == current) {
                        for (; count > 0 && pos < 32; count--) {
                                if (get_user(*k++, &reg_window[pos++]))
@@ -516,6 +517,7 @@ static int genregs32_get(struct task_struct *target,
                }
 
                reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+               reg_window -= 16;
                if (target == current) {
                        for (; count > 0 && pos < 32; count--) {
                                if (get_user(reg, &reg_window[pos++]) ||
@@ -599,6 +601,7 @@ static int genregs32_set(struct task_struct *target,
                        regs->u_regs[pos++] = *k++;
 
                reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+               reg_window -= 16;
                if (target == current) {
                        for (; count > 0 && pos < 32; count--) {
                                if (put_user(*k++, &reg_window[pos++]))
@@ -625,6 +628,7 @@ static int genregs32_set(struct task_struct *target,
                }
 
                reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6];
+               reg_window -= 16;
                if (target == current) {
                        for (; count > 0 && pos < 32; count--) {
                                if (get_user(reg, u++) ||