freebsd-skq/sys
Konstantin Belousov af80b2c901 The userland_sysctl() function retries sysctl_root() until returned
error is not EAGAIN. Several sysctls that inspect another process use
p_candebug() for checking access right for the curproc. p_candebug()
returns EAGAIN for some reasons, in particular, for the process doing
exec() now. If execing process tries to lock Giant, we get a livelock,
because sysctl handlers are covered by Giant, and often do not sleep.

Break the livelock by dropping Giant and allowing other threads to
execute in the EAGAIN loop.

Also, do not return EAGAIN from p_candebug() when process is executing,
use more appropriate EBUSY error [1].

Reported and tested by:	pho
Suggested by:	rwatson [1]
Reviewed by:	rwatson, des
MFC after:	1 week
2008-12-12 12:06:28 +00:00
..
amd64 Add constants for fields in the local APIC error status register and a 2008-12-11 15:56:30 +00:00
arm Avoid confusion and adjust link address range of Marvell Orion kernel so it is 2008-12-05 15:31:51 +00:00
boot Fix a leak introduced in r185902. We should free the devspec if 2008-12-11 16:48:35 +00:00
bsm Merge OpenBSM 1.1 alpha 2 from the OpenBSM vendor branch to head, both 2008-12-02 23:26:43 +00:00
cam Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
cddl Put the MIPS support back in after it was removed in r185029. 2008-12-04 16:31:08 +00:00
compat Add 32-bit compat support for AIO. 2008-12-11 00:58:05 +00:00
conf Put the VIMAGE options together in one place. 2008-12-11 16:13:17 +00:00
contrib Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
crypto Fix a potential NULL-pointer dereference in padlock(4). 2008-11-17 19:00:36 +00:00
ddb Collect N identical (or near identical) mkdumpheader() implementations into 2008-10-01 22:08:53 +00:00
dev It seems there are still issues on multicast perfect filtering. 2008-12-12 01:26:11 +00:00
fs Do not leak defs_de_interlock on error. 2008-12-12 11:10:10 +00:00
gdb
geom - Add missing word in comment. 2008-12-08 17:09:02 +00:00
gnu Adapt to accmode_t changes. 2008-11-14 09:58:16 +00:00
i386 Add constants for fields in the local APIC error status register and a 2008-12-11 15:56:30 +00:00
ia64 Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important. 2008-12-02 19:09:08 +00:00
isa Allow device hints to wire the unit numbers of devices. 2008-11-18 21:01:54 +00:00
kern The userland_sysctl() function retries sysctl_root() until returned 2008-12-12 12:06:28 +00:00
kgssapi Call svc_freereq() before returning from the service proc. 2008-11-12 15:31:05 +00:00
libkern Add simple locking for the in-kernel iconv code. Translation operations 2008-12-05 21:19:24 +00:00
mips Remove redundant assignment. 2008-12-11 07:00:23 +00:00
modules - Add 32-bit compat system calls for VFS_AIO. The system calls live in the 2008-12-10 20:56:19 +00:00
net Consider processes attaching/detaching from tun(4) devices as being link 2008-12-12 01:36:50 +00:00
net80211 Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
netatalk Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netgraph Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
netinet Put a global variables, which were virtualized but formerly 2008-12-11 16:26:38 +00:00
netinet6 RTF_RNH_LOCKED needs to be passed in the flags arg not report, 2008-12-12 02:07:45 +00:00
netipsec Conditionally compile out V_ globals while instantiating the appropriate 2008-12-10 23:12:39 +00:00
netipx Add missing "goto set_head" for SO_IPX_CHECKSUM; otherwise we fall through 2008-12-11 10:29:35 +00:00
netnatm Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netncp Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netsmb Implement device cloning for /dev/nsmb, the netsmb control pseudo-device. 2008-11-03 14:23:15 +00:00
nfs Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
nfs4client Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
nfsclient Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
nfsserver We need to pass a structure with enough space for an NFSv2 filehandle to 2008-12-10 14:49:54 +00:00
nlm Don't call svc_freereq() before svc_freeargs(). 2008-11-12 15:30:30 +00:00
opencrypto Don't hang if encrypting/decrypting using struct iovecs where one of the 2008-10-30 16:11:07 +00:00
pc98 Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important. 2008-12-02 19:09:08 +00:00
pccard
pci Make WOL work on RTL8168B. This controller seems to require 2008-12-11 02:24:11 +00:00
powerpc Add the ability to control the sleep LED with led(4). Adding this fairly 2008-12-09 01:01:02 +00:00
rpc Add a missing call to mtx_destroy(). 2008-11-12 12:21:18 +00:00
security Merge OpenBSM 1.1 alpha 2 from the OpenBSM vendor branch to head, both 2008-12-02 23:26:43 +00:00
sparc64 Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important. 2008-12-02 19:09:08 +00:00
sun4v Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important. 2008-12-02 19:09:08 +00:00
sys Bump __FreeBSD_version for the new VOP_VPTOCNP addition. 2008-12-12 04:29:47 +00:00
tools Remove some unused and broken code that attempted to not invoke locking 2008-11-03 19:57:40 +00:00
ufs The dqrele() function syncs the dq, then acquires the dqh lock, and then 2008-12-08 11:04:17 +00:00
vm Instead of forcing vn_start_write() to reset mp back to NULL for the 2008-11-16 21:57:54 +00:00
xdr Use the remote address for access control, not the local address. This fixes 2008-11-13 14:36:52 +00:00
xen Integrate 185578 from dfr 2008-12-04 07:59:05 +00:00
Makefile Improve the glimpse target: don't index .svn and compile directories. 2008-08-15 14:11:30 +00:00