android_kernel_xiaomi_sm8450/include
Pavel Begunkov 65dba3c9ce kernel: rerun task_work while freezing in get_signal()
commit 943ad0b62e3c21f324c4884caa6cb4a871bca05c 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: 12db8b690010c ("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:41:03 +02:00
..
acpi ACPI: APEI: explicit init of HEST and GHES in apci_init() 2023-09-19 12:20:28 +02:00
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:44:35 +01:00
clocksource clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG 2021-07-14 16:56:12 +02:00
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 14:37:42 -08:00
drm drm/mipi-dsi: use correct return type for the DSC functions 2024-06-16 13:32:12 +02:00
dt-bindings dt-bindings: clock: Update the videocc resets for sm8150 2024-01-25 14:37:48 -08:00
keys certs: Add EFI_CERT_X509_GUID support for dbx entries 2021-06-30 08:47:30 -04:00
kunit kunit: fix display of failed expectations for strings 2020-11-10 13:45:15 -07:00
kvm KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption 2024-07-05 09:12:56 +02:00
linux kernel: rerun task_work while freezing in get_signal() 2024-08-19 05:41:03 +02:00
math-emu
media media: cec: core: add adap_nb_transmit_canceled() callback 2024-06-16 13:32:30 +02:00
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:05:02 +02:00
misc
net netfilter: nf_tables: fully validate NFT_DATA_VALUE on store to data registers 2024-07-05 09:12:49 +02:00
pcmcia
ras
rdma RDMA/cma: Always set static rate to 0 for RoCE 2023-06-21 15:45:39 +02:00
scsi scsi: core: Fix a use-after-free 2024-07-27 10:40:22 +02:00
soc soc: fsl: qbman: Add CGR update function 2024-04-13 12:58:36 +02:00
sound ALSA: dmaengine: Synchronize dma channel after drop() 2024-07-27 10:40:19 +02:00
target scsi: target: Fix multiple LUN_RESET handling 2023-05-17 11:47:48 +02:00
trace SUNRPC: Fixup gss_status tracepoint error output 2024-08-19 05:40:51 +02:00
uapi m68k: amiga: Turn off Warp1260 interrupts during boot 2024-08-19 05:40:57 +02:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:32:19 +02:00
xen ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-17 11:47:42 +02:00