freebsd-dev/sys
Konstantin Belousov de10ffa527 Since rev. 1.199 of sys/kern/kern_conf.c, the thread that calls
destroy_dev() from d_close() cdev method would self-deadlock.
devfs_close() bump device thread reference counter, and destroy_dev()
sleeps, waiting for si_threadcount to reach zero for cdev without
d_purge method.

destroy_dev_sched() could be used instead from d_close(), to
schedule execution of destroy_dev() in another context. The
destroy_dev_sched_drain() function can be used to drain the scheduled
calls to destroy_dev_sched(). Similarly, drain_dev_clone_events() drains
the events clone to make sure no lingering devices are left after
dev_clone event handler deregistered.

make_dev_credf(MAKEDEV_REF) function should be used from dev_clone
event handlers instead of make_dev()/make_dev_cred() to ensure that created
device has reference counter bumped before cdev mutex is dropped inside
make_dev().

Reviewed by:	tegge (early versions), njl (programming interface)
Debugging help and testing by:	Peter Holm
Approved by:	re (kensmith)
2007-07-03 17:42:37 +00:00
..
amd64 Revert previous commit, retaining cpufreq. 2007-07-01 22:19:20 +00:00
arm The iop34x has 128 interrupts. 2007-06-16 15:03:33 +00:00
boot - Remove UMAP filesystem. It was disconnected from build three years ago, 2007-06-25 05:06:57 +00:00
bsm Change $P4$ ID strings to P4 ID strings so that they are not auto-expanded 2007-04-17 12:27:08 +00:00
cam After talking with njl@, change this wildcard entry to be a bit less wild. 2007-07-01 17:42:07 +00:00
cddl In zfs_vget, if we fail to translate an inode number to the corresponding 2007-06-27 12:00:24 +00:00
coda Revert UF_OPENING workaround for CURRENT. 2007-05-31 11:51:53 +00:00
compat Try a cheap way to get around gcc4.2 believing that user arguments 2007-06-17 04:37:57 +00:00
conf Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
contrib Add two place holders in struct pf_rule for future netgraph integration. 2007-07-03 12:58:33 +00:00
crypto Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC 2007-07-03 12:13:45 +00:00
ddb
dev Recover from some major omissions/problems with the 24XX port. 2007-07-02 20:08:20 +00:00
fs Since rev. 1.199 of sys/kern/kern_conf.c, the thread that calls 2007-07-03 17:42:37 +00:00
gdb Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
geom Have gpart synthesize a disk geometry if the underlying provider 2007-06-17 22:19:19 +00:00
gnu Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in 2007-06-12 00:12:01 +00:00
i4b
i386 Revert previous commit, retaining cpufreq. 2007-07-01 22:19:20 +00:00
ia64 Enable SCTP by default for GENERIC kernels in order to give it 2007-06-14 17:14:27 +00:00
isa Prototype (but functional) Linux-ish /dev/nvram interface to the extra 2007-06-15 22:58:14 +00:00
kern Since rev. 1.199 of sys/kern/kern_conf.c, the thread that calls 2007-07-03 17:42:37 +00:00
libkern Unbreak high resolution profiling a little: use dummy asms to prevent 2007-06-13 06:17:48 +00:00
modules Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
net Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
net80211 Move the XCHANNEL radiotap definition to a free slot. NetBSD defined some 2007-07-01 06:59:30 +00:00
netatalk Mark wire data structures in netatalk as __packed so that they are 2007-06-28 12:54:58 +00:00
netatm Fix various compilation warnings for gcc-4.2. 2007-06-23 00:02:20 +00:00
netgraph These modules depend on usb, make that explicit 2007-06-23 04:34:38 +00:00
netinet Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
netinet6 Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
netipsec Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC 2007-07-03 12:13:45 +00:00
netipx Include priv.h to pick up suser(9) definitions, missed in an earlier 2007-06-13 22:42:43 +00:00
netnatm s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
netncp Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
netsmb Initialize some variables that GCC4.2 thinks might possibly be used without 2007-06-15 23:49:54 +00:00
nfs
nfs4client - Move rusage from being per-process in struct pstats to per-thread in 2007-06-01 01:12:45 +00:00
nfsclient Do proper "locking" for missing vmmeters part. 2007-06-04 21:45:18 +00:00
nfsserver Include priv.h to pick up suser(9) definitions, missed in an earlier 2007-06-13 22:42:43 +00:00
opencrypto Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
pc98 Enable SCTP by default for GENERIC kernels in order to give it 2007-06-14 17:14:27 +00:00
pccard
pci Prepare for future integration between CAM and newbus. xpt_bus_register 2007-06-17 05:55:54 +00:00
powerpc Reimplement bus_dmamap_load with bus_dmamap_load_buffer. 2007-06-22 03:57:36 +00:00
rpc Check for a NULL return from rpcclnt_buildheader- it can fail if 2007-06-16 05:42:26 +00:00
security Remove two boot printfs generated by Audit to announce it's presence, 2007-07-01 20:51:30 +00:00
sparc64 - Move ofw_pci_alloc_busno() to the ofw_pci KOBJ interface, 2007-06-18 21:49:42 +00:00
sun4v - Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by 2007-06-16 22:30:38 +00:00
sys Since rev. 1.199 of sys/kern/kern_conf.c, the thread that calls 2007-07-03 17:42:37 +00:00
tools
ufs Fix an annoying pointer/int cast warning that shows up on 64 bit systems. 2007-07-02 01:31:43 +00:00
vm In the previous revision, when I replaced the unconditional acquisition 2007-07-02 06:56:37 +00:00
Makefile Commit IPv6 support for FAST_IPSEC to the tree. 2007-07-01 11:41:27 +00:00