msm: ipa: fix mutex_lock with task->state != RUNNING
mutex_lock should be only called when task->state == RUNNING, fix this warning msg from kernel Change-Id: Idf045ba868e3fa47837575b268917838ff71f1a6 Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
parent
1fac7f53bd
commit
21fab3e703
2 changed files with 3 additions and 4 deletions
|
@ -523,10 +523,9 @@ ssize_t ipa_read(struct file *filp, char __user *buf, size_t count,
|
|||
start = buf;
|
||||
|
||||
while (1) {
|
||||
prepare_to_wait(&ipa_ctx->msg_waitq, &wait, TASK_INTERRUPTIBLE);
|
||||
|
||||
mutex_lock(&ipa_ctx->msg_lock);
|
||||
locked = 1;
|
||||
prepare_to_wait(&ipa_ctx->msg_waitq, &wait, TASK_INTERRUPTIBLE);
|
||||
if (!list_empty(&ipa_ctx->msg_list)) {
|
||||
msg = list_first_entry(&ipa_ctx->msg_list,
|
||||
struct ipa_push_msg, link);
|
||||
|
|
|
@ -528,12 +528,12 @@ ssize_t ipa3_read(struct file *filp, char __user *buf, size_t count,
|
|||
start = buf;
|
||||
|
||||
while (1) {
|
||||
mutex_lock(&ipa3_ctx->msg_lock);
|
||||
locked = 1;
|
||||
prepare_to_wait(&ipa3_ctx->msg_waitq,
|
||||
&wait,
|
||||
TASK_INTERRUPTIBLE);
|
||||
|
||||
mutex_lock(&ipa3_ctx->msg_lock);
|
||||
locked = 1;
|
||||
if (!list_empty(&ipa3_ctx->msg_list)) {
|
||||
msg = list_first_entry(&ipa3_ctx->msg_list,
|
||||
struct ipa3_push_msg, link);
|
||||
|
|
Loading…
Add table
Reference in a new issue