From 08f003891b84f52e49a5bdbc8a589fb052ac9a4e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 8 May 2024 05:22:37 +0200 Subject: Merging debian version 4.19.260-1. Signed-off-by: Daniel Baumann --- ...-pinned-user-tasks-to-be-awakened-to-the-.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 debian/patches-rt/0228-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch (limited to 'debian/patches-rt/0228-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch') diff --git a/debian/patches-rt/0228-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch b/debian/patches-rt/0228-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch new file mode 100644 index 000000000..817e0736d --- /dev/null +++ b/debian/patches-rt/0228-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch @@ -0,0 +1,35 @@ +From: Mike Galbraith +Date: Sun, 19 Aug 2018 08:28:35 +0200 +Subject: [PATCH 228/342] sched: Allow pinned user tasks to be awakened to the + CPU they pinned +Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1a7a03ac5f6eb866ddd317630b747d6e8f81013b + +Since commit 7af443ee16976 ("sched/core: Require cpu_active() in +select_task_rq(), for user tasks") select_fallback_rq() will BUG() if +the CPU to which a task has pinned itself and pinned becomes +!cpu_active() while it slept. +The task will continue running on the to-be-removed CPU and will remove +itself from the CPU during takedown_cpu() (while cpuhp_pin_lock will be +acquired) and move to another CPU based on its mask after the +migrate_disable() section has been left. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Mike Galbraith +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 11afaa2c618a..dba425296275 100644 +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -904,7 +904,7 @@ static inline bool is_cpu_allowed(struct task_struct *p, int cpu) + if (!cpumask_test_cpu(cpu, p->cpus_ptr)) + return false; + +- if (is_per_cpu_kthread(p)) ++ if (is_per_cpu_kthread(p) || __migrate_disabled(p)) + return cpu_online(cpu); + + return cpu_active(cpu); -- cgit v1.2.3