linux/drivers/tee/optee
Sumit Garg d61cc1a435 tee: optee: Fix supplicant wait loop
commit 70b0d6b0a1 upstream.

OP-TEE supplicant is a user-space daemon and it's possible for it
be hung or crashed or killed in the middle of processing an OP-TEE
RPC call. It becomes more complicated when there is incorrect shutdown
ordering of the supplicant process vs the OP-TEE client application which
can eventually lead to system hang-up waiting for the closure of the
client application.

Allow the client process waiting in kernel for supplicant response to
be killed rather than indefinitely waiting in an unkillable state. Also,
a normal uninterruptible wait should not have resulted in the hung-task
watchdog getting triggered, but the endless loop would.

This fixes issues observed during system reboot/shutdown when supplicant
got hung for some reason or gets crashed/killed which lead to client
getting hung in an unkillable state. It in turn lead to system being in
hung up state requiring hard power off/on to recover.

Fixes: 4fb0a5eb36 ("tee: add OP-TEE driver")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-02-27 04:10:51 -08:00
..
call.c tee: optee: Fix typo Unuspported -> Unsupported 2023-03-14 11:57:03 +01:00
core.c optee: Add __init/__exit annotations to module init/exit funcs 2022-10-11 11:20:16 +02:00
device.c tee: optee: Fix kernel panic caused by incorrect error handling 2024-04-03 15:28:44 +02:00
ffa_abi.c tee: optee: ffa: Fix missing-field-initializers warning 2024-07-25 09:50:53 +02:00
Kconfig tee: optee: Add SMC for loading OP-TEE image 2023-04-03 08:57:49 +02:00
Makefile optee: separate notification functions 2021-11-17 14:08:56 +01:00
notif.c optee: Use bitmap_free() to free bitmap 2022-01-24 12:53:34 +01:00
optee_ffa.h optee: add FF-A capability OPTEE_FFA_SEC_CAP_ARG_OFFSET 2022-04-13 07:37:48 +02:00
optee_msg.h tee: optee: Add SMC for loading OP-TEE image 2023-04-03 08:57:49 +02:00
optee_private.h tee: Remove unused declarations 2023-09-13 08:16:24 +02:00
optee_rpc_cmd.h optee: separate notification functions 2021-11-17 14:08:56 +01:00
optee_smc.h tee: optee: Add SMC for loading OP-TEE image 2023-04-03 08:57:49 +02:00
optee_trace.h tee: optee: add invoke_fn tracepoints 2021-03-15 12:04:01 +01:00
rpc.c optee: separate notification functions 2021-11-17 14:08:56 +01:00
smc_abi.c ARM: SoC drivers for 6.5 2023-06-29 15:22:19 -07:00
supp.c tee: optee: Fix supplicant wait loop 2025-02-27 04:10:51 -08:00