Skip to content

Commit

Permalink
ia64: don't call handle_signal() unless there's actually a signal queued
Browse files Browse the repository at this point in the history
Sergei and John both reported that ia64 failed to boot in 5.11, and it
was related to signals. Turns out the ia64 signal handling is a bit odd,
it doesn't check the return value of get_signal() for whether there's a
signal to deliver or not. With the introduction of TIF_NOTIFY_SIGNAL,
then task_work could trigger it.

Fix it by only calling handle_signal() if we actually have a real signal
to deliver. This brings it in line with all other archs, too.

Fixes: b269c22 ("ia64: add support for TIF_NOTIFY_SIGNAL")
Reported-by: Sergei Trofimovich <[email protected]>
Reported-by: John Paul Adrian Glaubitz <[email protected]>
Tested-by: Sergei Trofimovich <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Mar 3, 2021
1 parent 7a7fd0d commit f5f4fc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/ia64/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
* need to push through a forced SIGSEGV.
*/
while (1) {
get_signal(&ksig);
if (!get_signal(&ksig))
break;

/*
* get_signal() may have run a debugger (via notify_parent())
Expand Down

0 comments on commit f5f4fc4

Please sign in to comment.