upas/fs: lock mbox in syncallmboxes() to avoid assert crash
This commit is contained in:
parent
b24ebff76a
commit
ffa430c570
1 changed files with 4 additions and 1 deletions
|
@ -273,9 +273,12 @@ syncallmboxes(void)
|
||||||
Mailbox *m;
|
Mailbox *m;
|
||||||
|
|
||||||
qlock(&mbllock);
|
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))
|
if(err = syncmbox(m, 1))
|
||||||
eprint("syncmbox: %s\n", err);
|
eprint("syncmbox: %s\n", err);
|
||||||
|
qunlock(m);
|
||||||
|
}
|
||||||
qunlock(&mbllock);
|
qunlock(&mbllock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue