Skip to content

Commit

Permalink
tee: optee: interruptible RPC sleep
Browse files Browse the repository at this point in the history
Prior to this patch RPC sleep was uninterruptible since msleep() is
uninterruptible. Change to use msleep_interruptible() instead.

Signed-off-by: Tiger Yu <[email protected]>
Reviewed-by: Joakim Bech <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
[jf: minor commit message edits]
Signed-off-by: Jerome Forissier <[email protected]>
  • Loading branch information
tiger-yu99 authored and jforissier committed May 17, 2017
1 parent 5613392 commit 51848d1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/tee/optee/rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,8 @@ static void handle_rpc_func_cmd_wait(struct optee_msg_arg *arg)

msec_to_wait = arg->params[0].u.value.a;

/* set task's state to interruptible sleep */
set_current_state(TASK_INTERRUPTIBLE);

/* take a nap */
msleep(msec_to_wait);
/* Go to interruptible sleep */
msleep_interruptible(msec_to_wait);

arg->ret = TEEC_SUCCESS;
return;
Expand Down

0 comments on commit 51848d1

Please sign in to comment.