diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-12 21:29:28 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-12 21:29:28 +0100 |
commit | ffa430c57068e65f5247f22a862a78ed11f9da18 (patch) | |
tree | 5600dfb58803b014a544e15874be467ea5590aea /sys/src/cmd/upas | |
parent | b24ebff76a1d0ef99ecef551a78288642e6ea35b (diff) |
upas/fs: lock mbox in syncallmboxes() to avoid assert crash
Diffstat (limited to 'sys/src/cmd/upas')
-rw-r--r-- | sys/src/cmd/upas/fs/mbox.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/cmd/upas/fs/mbox.c b/sys/src/cmd/upas/fs/mbox.c index 1858da6c4..903f4650f 100644 --- a/sys/src/cmd/upas/fs/mbox.c +++ b/sys/src/cmd/upas/fs/mbox.c @@ -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); } |