Skip to content

Conversation

@Calvin-LL
Copy link

@Calvin-LL Calvin-LL commented Dec 9, 2022

Hi, I found this bug while working on the class project in @achreto's class at UBC.

Consider this code snippet:

struct dcb *dcb = ...;
wakeup_set(dcb, 3);
wakeup_remove(dcb);
wakeup_set(dcb, 4);

The second call to wakeup_set would cause this assertion to fail

assert(kcb_current->wakeup_queue_head == dcb);

The function uses dcb->wakeup_time to tell if a dcb is on the wakeup queue but doesn't set it back to 0 when removing a dcb. This PR fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant