diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-06-06 23:44:24 -0400 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2020-06-30 15:36:47 -0400 |
commit | 335add4ac891c3c5094e5b30cce004322f284ca4 (patch) | |
tree | b11d64a855f3261f0e37852efd7aec407376dd72 | |
parent | 32e5a15f10847905eb7932f2a837a9e664dba665 (diff) |
fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
[ Upstream commit 9d964e1b82d8182184153b70174f445ea616f053 ]
lost npc in PTRACE_SETREGSET, breaking PTRACE_SETREGS as well
Fixes: cf51e129b968 "sparc32: fix register window handling in genregs32_[gs]et()"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | arch/sparc/kernel/ptrace_32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index 60f7205ebe40..646dd58169ec 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c @@ -168,12 +168,17 @@ static int genregs32_set(struct task_struct *target, if (ret || !count) return ret; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, - ®s->y, + ®s->npc, 34 * sizeof(u32), 35 * sizeof(u32)); if (ret || !count) return ret; + ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, + ®s->y, + 35 * sizeof(u32), 36 * sizeof(u32)); + if (ret || !count) + return ret; return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - 35 * sizeof(u32), 38 * sizeof(u32)); + 36 * sizeof(u32), 38 * sizeof(u32)); } static int fpregs32_get(struct task_struct *target, |