Skip to content

Commit

Permalink
modify_senders: re-introduce check for modification-in-progress
Browse files Browse the repository at this point in the history
Since I7b6e015fa5fc6dc4492c44d9c81e38f3ef531f51 the modify_senders
operation is protected against concurrent modifications of the sender
list from threads on a different CPU and against vanishing the target
thread. But we still need to detect if the modify_senders operation is
currently in progress by a thread running on the same CPU.

See ticket #CD-1131.
See ticket #CD-1159.

Change-Id: I10daaa00a198e652ac0b4bd7a1e773e6ceb5be52
  • Loading branch information
Frank Mehnert authored and kk-infra committed May 28, 2024
1 parent 96b5568 commit f03ceec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kern/thread_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ Thread_object::sys_modify_senders(L4_msg_tag tag, Utcb const *in, Utcb * /*out*/
if (current_cpu() != home_cpu())
return commit_result(-L4_err::EInval);

assert(!sender_list()->cursor());
if (sender_list()->cursor())
return commit_result(-L4_err::EBusy);

if (0)
printf("MODIFY ID (%08lx:%08lx->%08lx:%08lx\n",
Expand Down

0 comments on commit f03ceec

Please sign in to comment.