freebsd-skq/sys
rwatson 8555f72de8 Correct a resource leak introduced in recent accept locking changes:
when I reordered events in accept1() to allocate a file descriptor
earlier, I didn't properly update use of goto on exit to unwind for
cases where the file descriptor is now held, but wasn't previously.
The result was that, in the event of accept() on a non-blocking socket,
or in the event of a socket error, a file descriptor would be leaked.

This ended up being non-fatal in many cases, as the file descriptor
would be properly GC'd on process exit, so only showed up for processes
that do a lot of non-blocking accept() calls, and also live for a long
time (such as qmail).

This change updates the use of goto targets to do additional unwinding.

Eyes provided by:	Brian Feldman <green@freebsd.org>
Feet, hands provided by:	Stefan Ehmann <shoesoft@gmx.net>,
				Dimitry Andric <dimitry@andric.com>
				Arjan van Leeuwen <avleeuwen@piwebs.com>
2004-06-07 21:45:44 +00:00
..
alpha Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
amd64 Back out revision 1.150, since dwmalone reports that it causes a panic 2004-06-06 09:16:02 +00:00
arm Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
boot Some embedded platforms have no keyboard controller. Give up waiting 2004-06-02 09:38:32 +00:00
cam Reformat the comments for cam_hdr so that they can be read. 2004-06-07 19:12:44 +00:00
coda add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
compat Add another 5.2.1 source compatibility tweak: acquire Giant before calling 2004-06-07 01:22:48 +00:00
conf Remove references to L1 in the comments, according to Alan they are 2004-06-07 19:33:05 +00:00
contrib "Get rid of the nested include of <sys/module.h> from <sys/kernel.h>" or 2004-05-31 22:48:19 +00:00
crypto Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00
ddb Fixed DDB_NOKLDSYM on amd64's: 2004-05-18 05:30:06 +00:00
dev Remove accidental change. 2004-06-07 21:44:01 +00:00
fs Add MSG_NBIO flag option to soreceive() and sosend() that causes 2004-06-01 01:18:51 +00:00
geom Fix format string. 2004-06-07 13:40:40 +00:00
gnu Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
i4b add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
i386 Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
ia64 Machine generated patch which changes linedisc calls from accessing 2004-06-04 16:02:56 +00:00
isa add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
isofs/cd9660 Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
kern Correct a resource leak introduced in recent accept locking changes: 2004-06-07 21:45:44 +00:00
libkern Import libkern arm specific bits. 2004-05-14 12:28:31 +00:00
modules add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
net Use ldisc_[de]register() instead of frobbing linesw[] directly. 2004-06-07 20:43:37 +00:00
net80211 Add some missing <sys/module.h> includes which are masked by the 2004-05-30 17:57:46 +00:00
netatalk Remove redundant call to soisdisconnected() from ddp_abort(), as it 2004-05-05 03:34:37 +00:00
netatm These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
netgraph Integrate accept locking from rwatson_netperf, introducing a new 2004-06-02 04:15:39 +00:00
netinet do not send icmp response if the original packet is encrypted. 2004-06-07 09:56:59 +00:00
netinet6 do not check super user privilege in ip6_savecontrol. It is 2004-06-02 15:41:18 +00:00
netipsec use correct address for SADB_EXT_ADDRESS_DST in key_do_allocsa_policy 2004-05-03 05:15:53 +00:00
netipx Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netkey avoid duplicate free. 2004-01-25 17:18:12 +00:00
netnatm Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netncp add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
netsmb add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
nfs Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
nfs4client Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
nfsclient Make vm_page's PG_ZERO flag immutable between the time of the page's 2004-05-06 05:03:23 +00:00
nfsserver Giant wasn't dropped here if we have to return EBUSY. This is bad. 2004-05-31 20:21:06 +00:00
opencrypto add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
pc98 Add missing <sys/module.h> includes. 2004-06-07 06:04:27 +00:00
pccard Convert callers to the new bus_alloc_resource_any(9) API. 2004-03-17 17:50:55 +00:00
pci Add missing <sys/module.h> includes 2004-05-30 20:00:41 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc Remove checks for curthread == NULL - it can't happen. 2004-06-03 10:22:47 +00:00
rpc Remove advertising clause from University of California Regent's 2004-04-07 05:00:01 +00:00
security add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
sparc64 Remove filename+line number from panic messages. 2004-06-06 21:26:49 +00:00
sys Make linesw[] an array of pointers to linedesc instead of an array of 2004-06-07 20:45:45 +00:00
tools devlist2h.awk is too generic a name for what it does. It really 2004-05-26 00:19:39 +00:00
ufs Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid 2004-06-03 01:47:37 +00:00
vm Remove references to L1 in the comments, according to Alan they are 2004-06-07 19:33:05 +00:00
Makefile Try harder not to compile anything in sys/boot for arm. 2004-05-16 00:19:12 +00:00