commit 7d4fa875ae604b7fcb1505e1dcf795fa3f7f2d7d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Aug 22 22:44:30 2025 +0200

    proc: cope with psets dying during host_processor_sets call

diff --git a/proc/mgt.c b/proc/mgt.c
index 76cebaa9..3f04e2ba 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -1179,6 +1179,11 @@ add_tasks (task_t task)
       mach_msg_type_number_t ntasks;
       int j;
 
+      /* The kernel can deliver us an array with null slots in the
+	 middle, e.g. if a pset was dropped during the call.  */
+      if (! MACH_PORT_VALID (psets[i]))
+	continue;
+
       if (!foundp)
 	{
 	  host_processor_set_priv (_hurd_host_priv, psets[i], &psetpriv);
