From: Greg Kroah-Hartman Date: Tue, 17 Jun 2025 14:48:00 +0000 (+0200) Subject: drop queue-5.4/posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cp... X-Git-Tag: v6.6.94~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6ae7bb8e28506610f76d081cfeef70354925c85;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.4/posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cpu_timer_del.patch Broke the build --- diff --git a/queue-5.4/posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cpu_timer_del.patch b/queue-5.4/posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cpu_timer_del.patch deleted file mode 100644 index baaaeedad8..0000000000 --- a/queue-5.4/posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cpu_timer_del.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f90fff1e152dedf52b932240ebbd670d83330eca Mon Sep 17 00:00:00 2001 -From: Oleg Nesterov -Date: Fri, 13 Jun 2025 19:26:50 +0200 -Subject: posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Oleg Nesterov - -commit f90fff1e152dedf52b932240ebbd670d83330eca upstream. - -If an exiting non-autoreaping task has already passed exit_notify() and -calls handle_posix_cpu_timers() from IRQ, it can be reaped by its parent -or debugger right after unlock_task_sighand(). - -If a concurrent posix_cpu_timer_del() runs at that moment, it won't be -able to detect timer->it.cpu.firing != 0: cpu_timer_task_rcu() and/or -lock_task_sighand() will fail. - -Add the tsk->exit_state check into run_posix_cpu_timers() to fix this. - -This fix is not needed if CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y, because -exit_task_work() is called before exit_notify(). But the check still -makes sense, task_work_add(&tsk->posix_cputimers_work.work) will fail -anyway in this case. - -Cc: stable@vger.kernel.org -Reported-by: Benoît Sevens -Fixes: 0bdd2ed4138e ("sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()") -Signed-off-by: Oleg Nesterov -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman ---- - kernel/time/posix-cpu-timers.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/kernel/time/posix-cpu-timers.c -+++ b/kernel/time/posix-cpu-timers.c -@@ -1321,6 +1321,15 @@ static int posix_cpu_nsleep(const clocki - int error; - - /* -+ * Ensure that release_task(tsk) can't happen while -+ * handle_posix_cpu_timers() is running. Otherwise, a concurrent -+ * posix_cpu_timer_del() may fail to lock_task_sighand(tsk) and -+ * miss timer->it.cpu.firing != 0. -+ */ -+ if (tsk->exit_state) -+ return; -+ -+ /* - * Diagnose required errors first. - */ - if (CPUCLOCK_PERTHREAD(which_clock) && diff --git a/queue-5.4/series b/queue-5.4/series index dbf75ba442..ea7fac27f0 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -84,7 +84,6 @@ net_sched-prio-fix-a-race-in-prio_tune.patch net_sched-red-fix-a-race-in-__red_change.patch net_sched-tbf-fix-a-race-in-tbf_change.patch net-mdio-c22-is-now-optional-eopnotsupp-if-not-provi.patch -posix-cpu-timers-fix-race-between-handle_posix_cpu_timers-and-posix_cpu_timer_del.patch x86-boot-compressed-prefer-cc-option-for-cflags-additions.patch mips-move-wa-msoft-float-check-from-as-option-to-cc-option.patch kbuild-update-assembler-calls-to-use-proper-flags-and-language-target.patch