Skip to contentSkip to conversation

io-wq: ensure we exit if thread group is exiting

PATCH New Jens Axboe 1 participant 1 message Sep 22, 2021

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io-wq: ensure we exit if thread group is exiting

Dave reports that a coredumping workload gets stuck in 5.15-rc2, and identified the culprit in the Fixes line below. The problem is that relying solely on fatal_signal_pending() to gate whether to exit or not fails miserably if a process gets eg SIGILL sent. Don't exclusively rely on fatal signals, also check if the thread group is exiting.

Fixes 15e20db2e0ce ("io-wq: only exit on fatal signals")

---

fs/io-wq.c +2 -1
index c2e0e8e80949..c2360cdc403d 100644
@@ -584,7 +584,8 @@ static int io_wqe_worker(void *data)
 
 			if (!get_signal(&ksig))
 				continue;
-			if (fatal_signal_pending(current))
+			if (fatal_signal_pending(current) ||
+			    signal_group_exit(current->signal))
 				break;
 			continue;
 		}
Signature · 1 line
Jens Axboe