Merge tag 'tee-optee-for-5.4' of git://git.linaro.org/people/jens.wiklander/linux...
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Aug 2019 12:29:42 +0000 (14:29 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Aug 2019 12:29:43 +0000 (14:29 +0200)
Add might_sleep() in OP-TEE RPC requests

* tag 'tee-optee-for-5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: add might_sleep for RPC requests

Link: https://lore.kernel.org/r/20190815065659.GA13498@jax
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/tee/optee/call.c

index aa94270..13b0269 100644 (file)
@@ -148,6 +148,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
                         */
                        optee_cq_wait_for_completion(&optee->call_queue, &w);
                } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
+                       might_sleep();
                        param.a0 = res.a0;
                        param.a1 = res.a1;
                        param.a2 = res.a2;