fork of 9front i guess
Go to file
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
386 remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
68000 remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
68020 remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
acme acme: fix more error messages 2013-04-28 00:19:35 +02:00
adm/timezone add Uruguay timezone (from sources) 2013-01-25 14:13:01 +01:00
alpha remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
amd64 6c: extern register fix (import from patch/6c-extreg) 2012-09-18 18:18:43 +02:00
arm remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
lib added blogcom 2013-04-30 16:57:27 +02:00
mips remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
power remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
power64 remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
rc blogcom +x 2013-04-30 17:02:14 +02:00
sparc remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
sparc64 remove .dummy files and replace it by sys/lib/rootstub script 2011-05-03 04:42:16 +00:00
sys devmnt: fix mount device leak and allocation error handling in mntversion() 2013-05-11 20:54:50 +02:00
.hgignore hgignore: ignore /proc 2013-01-29 02:54:38 +01:00