freebsd-dev/sys
Lawrence Stewart a66ac850d7 An sbuf configured with SBUF_AUTOEXTEND will call malloc with M_WAITOK when a
write to the buffer causes it to overflow. We therefore can't hold the CC list
rwlock over a call to sbuf_printf() for an sbuf configured with SBUF_AUTOEXTEND.

Switch to a fixed length sbuf which should be of sufficient size except in the
very unlikely event that the sysctl is being processed as one or more new
algorithms are loaded. If that happens, we accept the race and may fail the
sysctl gracefully if there is insufficient room to print the names of all the
algorithms.

This should address a WITNESS warning and the potential panic that would occur
if the sbuf call to malloc did sleep whilst holding the CC list rwlock.

Sponsored by:	FreeBSD Foundation
Reported by:	Nick Hibma
Reviewed by:	bz
MFC after:	3 weeks
X-MFC with:	r215166
2011-01-23 13:00:25 +00:00
..
amd64 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
arm Fix r217688. We need to call init_param1() before we use msgbufsize, 2011-01-22 01:31:59 +00:00
boot Add kern.msgbufsize default setting to /boot/defaults/loader.conf. 2011-01-21 12:15:21 +00:00
bsm
cam sysctl(8) should use the CTLTYPE to determine the type of data when 2011-01-19 17:04:07 +00:00
cddl Introduce signed and unsigned version of CTLTYPE_QUAD, renaming 2011-01-19 23:00:25 +00:00
compat Style(9) fix. 2011-01-23 09:50:39 +00:00
conf Option USB_HOST_ALIGN declared twice. 2011-01-22 20:53:27 +00:00
contrib Correct bogus initialization. It should be noted that this change 2011-01-14 04:24:53 +00:00
crypto Remove DEBUG sections. 2010-11-27 15:41:44 +00:00
ddb sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:54:19 +00:00
dev Revert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSION 2011-01-22 21:33:18 +00:00
fs - Move special inode constants to ext2_dinode.h and rename them to match 2011-01-21 22:00:40 +00:00
gdb there must be only one SYSINIT with SI_SUB_RUN_SCHEDULER+SI_ORDER_ANY order 2010-09-30 17:05:23 +00:00
geom Limit maximum number of GPT entries to 4k. It is most realistic value 2011-01-18 09:52:53 +00:00
gnu Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
i386 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
ia64 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
isa bus_add_child: change type of order parameter to u_int 2010-09-10 11:19:03 +00:00
kern Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
kgssapi
libkern Add support for asterisk characters when filling in the GELI password 2010-11-14 14:12:43 +00:00
mips Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
modules Push the non-AR5416 related stuff into chipset specific directories. 2011-01-20 09:03:40 +00:00
net sysctl(8) should use the CTLTYPE to determine the type of data when 2011-01-19 17:04:07 +00:00
net80211 Jump to the next element and not to an arbitrary point. frm[1] contains 2011-01-19 17:40:58 +00:00
netatalk
netgraph sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:53:39 +00:00
netinet An sbuf configured with SBUF_AUTOEXTEND will call malloc with M_WAITOK when a 2011-01-23 13:00:25 +00:00
netinet6 Improve plausibility check in sctp_handle_sack(). 2010-12-22 17:59:38 +00:00
netipsec After some off-list discussion, revert a number of changes to the 2010-11-22 19:32:54 +00:00
netipx
netnatm
netncp
netsmb Change some variables from int to size_t. This is more accurate since 2011-01-08 23:06:54 +00:00
nfs Modify the experimental NFSv4 server so that it posts a SIGUSR2 2011-01-14 23:30:35 +00:00
nfsclient Fix the nlm so that it no longer depends on the regular 2011-01-03 20:37:31 +00:00
nfsserver ZFS might not return monotonically increasing directory offset cookies, 2010-12-28 21:12:15 +00:00
nlm sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:54:19 +00:00
opencrypto Let cryptosoft(4) add its pseudo-device with a specific unit number and its 2010-11-14 13:09:32 +00:00
pc98 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
pci Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones. 2011-01-18 00:46:10 +00:00
powerpc Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
rpc sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:54:19 +00:00
security sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. 2011-01-12 19:54:14 +00:00
sparc64 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
sun4v Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
sys Fix typo. 2011-01-23 12:44:17 +00:00
teken Use proper bounds checking on VPA. 2010-12-05 10:15:23 +00:00
tools
ufs Embed a quota error message (C string) into uprintf() fmt. 2011-01-13 16:29:27 +00:00
vm Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. 2011-01-21 10:26:26 +00:00
x86 Introduce signed and unsigned version of CTLTYPE_QUAD, renaming 2011-01-19 23:00:25 +00:00
xdr
xen Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier. 2011-01-19 00:57:58 +00:00
Makefile Add lex and yacc sources to things cscope'd. 2010-11-21 03:58:11 +00:00