Patch "hrtimer: Select housekeeping CPU during migration" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    hrtimer: Select housekeeping CPU during migration

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hrtimer-select-housekeeping-cpu-during-migration.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ccba8d41540721ca7b69aeacec59ac5cc32c36a7
Author: Costa Shulyupin <costa.shul@xxxxxxxxxx>
Date:   Thu Feb 22 22:08:56 2024 +0200

    hrtimer: Select housekeeping CPU during migration
    
    [ Upstream commit 56c2cb10120894be40c40a9bf0ce798da14c50f6 ]
    
    During CPU-down hotplug, hrtimers may migrate to isolated CPUs,
    compromising CPU isolation.
    
    Address this issue by masking valid CPUs for hrtimers using
    housekeeping_cpumask(HK_TYPE_TIMER).
    
    Suggested-by: Waiman Long <longman@xxxxxxxxxx>
    Signed-off-by: Costa Shulyupin <costa.shul@xxxxxxxxxx>
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Reviewed-by: Waiman Long <longman@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240222200856.569036-1-costa.shul@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index edb0f821dceaa..6057fe2e179b0 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -38,6 +38,7 @@
 #include <linux/sched/deadline.h>
 #include <linux/sched/nohz.h>
 #include <linux/sched/debug.h>
+#include <linux/sched/isolation.h>
 #include <linux/timer.h>
 #include <linux/freezer.h>
 #include <linux/compat.h>
@@ -2223,8 +2224,8 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
 
 int hrtimers_cpu_dying(unsigned int dying_cpu)
 {
+	int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER));
 	struct hrtimer_cpu_base *old_base, *new_base;
-	int i, ncpu = cpumask_first(cpu_active_mask);
 
 	tick_cancel_sched_timer(dying_cpu);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux