OpenCloudOS-Kernel/drivers/tee/optee
Sumit Garg 520f79c110 tee: optee: Fix kernel panic caused by incorrect error handling
commit 95915ba4b987cf2b222b0f251280228a1ff977ac upstream.

The error path while failing to register devices on the TEE bus has a
bug leading to kernel panic as follows:

[   15.398930] Unable to handle kernel paging request at virtual address ffff07ed00626d7c
[   15.406913] Mem abort info:
[   15.409722]   ESR = 0x0000000096000005
[   15.413490]   EC = 0x25: DABT (current EL), IL = 32 bits
[   15.418814]   SET = 0, FnV = 0
[   15.421878]   EA = 0, S1PTW = 0
[   15.425031]   FSC = 0x05: level 1 translation fault
[   15.429922] Data abort info:
[   15.432813]   ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[   15.438310]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[   15.443372]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[   15.448697] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9e3e000
[   15.455413] [ffff07ed00626d7c] pgd=1800000bffdf9003, p4d=1800000bffdf9003, pud=0000000000000000
[   15.464146] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP

Commit 7269cba53d90 ("tee: optee: Fix supplicant based device enumeration")
lead to the introduction of this bug. So fix it appropriately.

Reported-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218542
Fixes: 7269cba53d90 ("tee: optee: Fix supplicant based device enumeration")
Cc: stable@vger.kernel.org
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-03 15:28:44 +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
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 firmware: arm_ffa: Split up ffa_ops into info, message and memory operations 2022-09-08 11:34:04 +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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00