2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/tee/optee
Sumit Garg 70b0d6b0a1 tee: optee: Fix supplicant wait loop
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>
2025-02-14 15:17:34 +01:00
..
call.c tee: Refactor TEE subsystem header files 2024-04-03 09:19:31 +02:00
core.c optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
device.c optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
ffa_abi.c optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
Kconfig optee: add RPMB dependency 2024-09-03 14:34:45 +02:00
Makefile optee: separate notification functions 2021-11-17 14:08:56 +01:00
notif.c optee: add timeout parameter for notification wait 2024-06-27 16:44:37 +02:00
optee_ffa.h optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +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 optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
optee_rpc_cmd.h optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
optee_smc.h optee: probe RPMB device using RPMB subsystem 2024-08-26 13:16:20 +02:00
optee_trace.h tee: optee: add invoke_fn tracepoints 2021-03-15 12:04:01 +01:00
rpc.c optee: Fix a NULL vs IS_ERR() check 2024-09-09 12:22:06 +02:00
smc_abi.c optee: fix format string for printing optee build_id 2024-12-17 11:22:46 +01:00
supp.c tee: optee: Fix supplicant wait loop 2025-02-14 15:17:34 +01:00