linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

tee: optee: Fix RPC call break system sleep operation. #84

Open hanshu830 opened 3 years ago

hanshu830 commented 3 years ago

Utilize freezer help functions to tell freezer to ignoring tasks which wait on RPC result, because tee-supplicant may already be frozen.

Signed-off-by: Shown Han Shown.Han@armchina.com

jenswi-linaro commented 3 years ago

Please add a bit more background. Why does it help to ignore a task? What will happen when a task is ignored? In at least on of the cases added are we not waiting on tee-supplicant directly, but perhaps indirectly. Is that why you're doing it in wq_sleep() around the wait_for_completion() call?

hanshu830 commented 3 years ago

Why does it help to ignore a task? What will happen when a task is ignored?

Sure, will add it.

In at least on of the cases added are we not waiting on tee-supplicant directly, but perhaps indirectly. Is that why you're doing it in wq_sleep() around the wait_for_completion() call?

Yes, the new case scenario that I can imaging is TA#1 put itself into wait queue and wait another TA#2 wake it up, but TA#2 somehow(may be block in other request) doesn't wake up TA#1 in time, TA#1 will break system sleep.