signal: fix possible context corruption

This commit is contained in:
Matheus
2026-06-30 17:37:23 -03:00
parent 99701d2fb9
commit 7c19244208
2 changed files with 13 additions and 7 deletions
+2
View File
@@ -112,6 +112,8 @@ int poll_dowait(polldesc_t *desc, size_t ustimeout) {
__assert(ret || spinlock_try(&desc->lock) == false);
if (ret == SCHED_WAKEUP_REASON_INTERRUPTED) {
// future note: if this deadlocks, check the caller to see if
// desc is not being reset
spinlock_acquire(&desc->wakeuplock);
ret = EINTR;
}