Skip to content

Commit f324fa5

Browse files
Sven Schnellehdeller
authored andcommitted
parisc: also set iaoq_b in instruction_pointer_set()
When setting the instruction pointer on PA-RISC we also need to set the back of the instruction queue to the new offset, otherwise we will execute on instruction from the new location, and jumping back to the old location stored in iaoq_b. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de> Fixes: 75ebedf ("parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature") Cc: stable@vger.kernel.org # 4.19+
1 parent 45efd87 commit f324fa5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/parisc/include/asm/ptrace.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
2828
static inline void instruction_pointer_set(struct pt_regs *regs,
2929
unsigned long val)
3030
{
31-
regs->iaoq[0] = val;
31+
regs->iaoq[0] = val;
32+
regs->iaoq[1] = val + 4;
3233
}
3334

3435
/* Query offset/name of register from its name/offset */

0 commit comments

Comments
 (0)