|
@@ -843,11 +843,12 @@ static void do_signal(struct pt_regs *regs)
|
|
|
unsigned long continue_addr = 0, restart_addr = 0;
|
|
|
int retval = 0;
|
|
|
struct ksignal ksig;
|
|
|
+ bool syscall = in_syscall(regs);
|
|
|
|
|
|
/*
|
|
|
* If we were from a system call, check for system call restarting...
|
|
|
*/
|
|
|
- if (in_syscall(regs)) {
|
|
|
+ if (syscall) {
|
|
|
continue_addr = regs->pc;
|
|
|
restart_addr = continue_addr - (compat_thumb_mode(regs) ? 2 : 4);
|
|
|
retval = regs->regs[0];
|
|
@@ -899,7 +900,7 @@ static void do_signal(struct pt_regs *regs)
|
|
|
* Handle restarting a different system call. As above, if a debugger
|
|
|
* has chosen to restart at a different PC, ignore the restart.
|
|
|
*/
|
|
|
- if (in_syscall(regs) && regs->pc == restart_addr) {
|
|
|
+ if (syscall && regs->pc == restart_addr) {
|
|
|
if (retval == -ERESTART_RESTARTBLOCK)
|
|
|
setup_restart_syscall(regs);
|
|
|
user_rewind_single_step(current);
|