Skip to content
Snippets Groups Projects
Commit cf1a7e03 authored by Vijay Pai's avatar Vijay Pai
Browse files

Remove the racy check added in commit i74c14e5ac752edc7e1dc0aaf31abfd1153df1d0a.

This is potentially unsafe since checking the deadline involves more than 1 word
read.
parent cc6017bb
No related branches found
No related tags found
No related merge requests found
...@@ -307,10 +307,6 @@ static int run_some_expired_alarms(gpr_mu *drop_mu, gpr_timespec now, ...@@ -307,10 +307,6 @@ static int run_some_expired_alarms(gpr_mu *drop_mu, gpr_timespec now,
/* TODO(ctiller): verify that there are any alarms (atomically) here */ /* TODO(ctiller): verify that there are any alarms (atomically) here */
if (gpr_time_cmp(g_shard_queue[0]->min_deadline, now) >= 0) {
return 0;
}
if (gpr_mu_trylock(&g_checker_mu)) { if (gpr_mu_trylock(&g_checker_mu)) {
gpr_mu_lock(&g_mu); gpr_mu_lock(&g_mu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment