Skip to contentSkip to conversation

zap_pid_ns_processes-clear-tif_notify_signal-along-with-tif_sigpending.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Jun 15, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING
has been removed from the -mm tree. Its filename was
zap_pid_ns_processes-clear-tif_notify_signal-along-with-tif_sigpending.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Oleg Nesterov <[email protected]>
Subject: zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING
Date: Sat, 8 Jun 2024 14:06:16 +0200

kernel_wait4() doesn't sleep and returns -EINTR if there is no eligible child and signal_pending() is true.

That is why zap_pid_ns_processes() clears TIF_SIGPENDING but this is not enough, it should also clear TIF_NOTIFY_SIGNAL to make signal_pending() return false and avoid a busy-wait loop.

Fixes 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL")
Cc Allen Pais <[email protected]>
Cc Christian Brauner <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Joel Fernandes (Google) <[email protected]>
Cc Joel Granados <[email protected]>
Cc Josh Triplett <[email protected]>
Cc Lai Jiangshan <[email protected]>
Cc Mateusz Guzik <[email protected]>
Cc Mathieu Desnoyers <[email protected]>
Cc Mike Christie <[email protected]>
Cc Neeraj Upadhyay <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Steven Rostedt (Google) <[email protected]>
Cc Zqiang <[email protected]>
Cc Thomas Gleixner <[email protected]>

---

 kernel/pid_namespace.c |    1 +
 1 file changed, 1 insertion(+)
kernel/pid_namespace.c renamed from kernel/pid_namespace.c~zap_pid_ns_processes-clear-tif_notify_signal-along-with-tif_sigpending +1 -0
@@ -218,6 +218,7 @@ void zap_pid_ns_processes(struct pid_nam
 	 */
 	do {
 		clear_thread_flag(TIF_SIGPENDING);
+		clear_thread_flag(TIF_NOTIFY_SIGNAL);
 		rc = kernel_wait4(-1, NULL, __WALL, NULL);
 	} while (rc != -ECHILD);
 

_

Patches currently in -mm which might be from [email protected] are

zap_pid_ns_processes-dont-send-sigkill-to-sub-threads.patch