plan9fox/sys
cinap_lenrek 25bc4e84e9 devmnt: fix mount device leak and allocation error handling in mntversion()
the fist problem is that qopen() might return nil and that kstrdup() will
sleep, so we should try to avoid holding the mntalloc lock. so we move
the kstrdup() and qopen() calls before the Mnt allocation, and properly
recover the memory if we fail later.

the second problem was that we error(Eshort) after we already created the Mnt
when returnlen < sizeof(f.version). this check has to happen *before* we
even attempt to allocate the Mnt structures. note that we only copy the
version string once everything is in the clear, so the semantics of the
user buffer not being modified in case of error is not changed.

a little cleanup in muxclose(), getting rid of mntptfree()...
2013-05-11 20:54:50 +02:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: all the world's a social vax cloud 2013-05-08 21:07:02 -04:00
include ape: change types from unsigned long to void* for rendezvous() and segattach()/segbrk() (erik), use uniqueue rendezvous tags for _buf and listen 2013-05-11 18:34:40 +02:00
lib /sys/lib/rootstub: fix missing /alpha/lib/ape directory 2013-04-29 11:12:47 -04:00
man mkpaqfs(8): correct maximum block size (from erik quanstros mkpaqfsman patch) 2013-05-03 13:57:00 +02:00
src devmnt: fix mount device leak and allocation error handling in mntversion() 2013-05-11 20:54:50 +02:00