linux-yocto/include/linux/sched
Pavel Begunkov 840c6def24 kernel: rerun task_work while freezing in get_signal()
commit 943ad0b62e upstream.

io_uring can asynchronously add a task_work while the task is getting
freezed. TIF_NOTIFY_SIGNAL will prevent the task from sleeping in
do_freezer_trap(), and since the get_signal()'s relock loop doesn't
retry task_work, the task will spin there not being able to sleep
until the freezing is cancelled / the task is killed / etc.

Run task_works in the freezer path. Keep the patch small and simple
so it can be easily back ported, but we might need to do some cleaning
after and look if there are other places with similar problems.

Cc: stable@vger.kernel.org
Link: https://github.com/systemd/systemd/issues/33626
Fixes: 12db8b6900 ("entry: Add support for TIF_NOTIFY_SIGNAL")
Reported-by: Julian Orth <ju.orth@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/89ed3a52933370deaaf61a0a620a6ac91f1e754d.1720634146.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:45:22 +02:00
..
autogroup.h
clock.h
coredump.h
cpufreq.h
cputime.h
deadline.h
debug.h
hotplug.h
idle.h
init.h
isolation.h
jobctl.h
loadavg.h
mm.h
nohz.h
numa_balancing.h
prio.h
rt.h sched/core: Always flush pending blk_plug 2022-08-17 14:23:01 +02:00
sd_flags.h
signal.h kernel: rerun task_work while freezing in get_signal() 2024-08-19 05:45:22 +02:00
smt.h
stat.h
sysctl.h
task_stack.h sched: Fix KCSAN noinstr violation 2023-05-24 17:36:47 +01:00
task.h kernel/fork: beware of __put_task_struct() calling context 2023-09-23 11:09:55 +02:00
topology.h sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg 2022-08-17 14:23:00 +02:00
types.h
user.h
wake_q.h
xacct.h