Skip to content

Commit a748102

Browse files
Al Virotorvalds
authored andcommitted
make m32r handle multiple pending signals
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a7f8388 commit a748102

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎arch/m32r/kernel/entry.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ work_resched:
235235
work_notifysig: ; deal with pending signals and
236236
; notify-resume requests
237237
mv r0, sp ; arg1 : struct pt_regs *regs
238-
ldi r1, r9 ; arg2 : __u32 thread_info_flags
238+
mv r1, r9 ; arg2 : __u32 thread_info_flags
239239
bl do_notify_resume
240-
bra restore_all
240+
bra resume_userspace
241241

242242
; perform syscall exit tracing
243243
ALIGN

‎arch/m32r/kernel/signal.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
282282
regs->bpc -= 2;
283283
else
284284
regs->bpc -= 4;
285+
regs->syscall_nr = -1;
285286
}
286287
}
287288

@@ -353,15 +354,16 @@ static int do_signal(struct pt_regs *regs)
353354
regs->bpc -= 2;
354355
else
355356
regs->bpc -= 4;
356-
}
357-
if (regs->r0 == -ERESTART_RESTARTBLOCK){
357+
regs->syscall_nr = -1;
358+
} else if (regs->r0 == -ERESTART_RESTARTBLOCK){
358359
regs->r0 = regs->orig_r0;
359360
regs->r7 = __NR_restart_syscall;
360361
inst = *(unsigned short *)(regs->bpc - 2);
361362
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
362363
regs->bpc -= 2;
363364
else
364365
regs->bpc -= 4;
366+
regs->syscall_nr = -1;
365367
}
366368
}
367369
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {

0 commit comments

Comments
 (0)