upas/fs: lock mbox in syncallmboxes() to avoid assert crash

This commit is contained in:
cinap_lenrek 2017-03-12 21:29:28 +01:00
parent b24ebff76a
commit ffa430c570

View file

@ -273,9 +273,12 @@ syncallmboxes(void)
Mailbox *m;
qlock(&mbllock);
for(m = mbl; m != nil; m = m->next)
for(m = mbl; m != nil; m = m->next){
qlock(m);
if(err = syncmbox(m, 1))
eprint("syncmbox: %s\n", err);
qunlock(m);
}
qunlock(&mbllock);
}