Skip to content

Commit

Permalink
Merge pull request #139 from grapherd/hotfix/ipc_deliver_check_sender…
Browse files Browse the repository at this point in the history
…_intend

Fix: ipc_deliver must check from_thr intend
  • Loading branch information
jserv authored Nov 22, 2016
2 parents 8e7ae4c + c88077a commit 604035e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ uint32_t ipc_deliver(void *data)
thr->ipc_from != L4_ANYTHREAD &&
thr->ipc_from != TID_TO_GLOBALID(THREAD_INTERRUPT)) {
from_thr = thread_by_globalid(thr->ipc_from);
if (from_thr->state == T_SEND_BLOCKED)
/* NOTE: Must check from_thr intend to send*/
if (from_thr->state == T_SEND_BLOCKED &&
from_thr->utcb->intended_receiver == thr->t_globalid)
do_ipc(from_thr, thr);
}
break;
Expand Down

0 comments on commit 604035e

Please sign in to comment.