freebsd-skq/sys
kib 855498f671 Fix linux_destroy_dev() behaviour when there are still files open from
the destroying cdev.

Currently linux_destroy_dev() waits for the reference count on the
linux cdev to drain, and each open file hold the reference.
Practically it means that linux_destroy_dev() is blocked until all
userspace processes that have the cdev open, exit.  FreeBSD devfs does
not have such problem, because device refcount only prevents freeing
of the cdev memory, and separate 'active methods' counter blocks
destroy_dev() until all threads leave the cdevsw methods.  After that,
attempts to enter cdevsw methods are refused with an error.

Implement somewhat similar mechanism for LinuxKPI cdevs.  Demote cdev
refcount to only mean a hold on the linux cdev memory.  Add sirefs
count to track both number of threads inside the cdev methods, and for
single-bit indicator that cdev is being destroyed.  In the later case,
the call is redirected to the dummy cdev.

Reviewed by:	markj
Discussed with:	hselasky
Tested by:	zeising
MFC after:	1 week
Sponsored by:	Mellanox Technologies
Differential revision:	https://reviews.freebsd.org/D18606
2018-12-30 15:46:45 +00:00
..
amd64 Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
arm Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
arm64 Pass VM_PROT_EXECUTE to vm_fault for instruction faults. 2018-12-27 14:14:41 +00:00
bsm
cam add a knob that disables detection of write protected disks 2018-12-17 16:01:37 +00:00
cddl MFV r342532: 5882 Temporary pool names 2018-12-26 11:03:14 +00:00
compat Fix linux_destroy_dev() behaviour when there are still files open from 2018-12-30 15:46:45 +00:00
conf Update to Zstandard 1.3.8 2018-12-29 21:18:01 +00:00
contrib Update to Zstandard 1.3.8 2018-12-29 21:18:01 +00:00
crypto Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev cxgbe(4): Attach to two T540 variants. 2018-12-30 01:57:11 +00:00
dts arm64: allwinner: Fix pwm dtso 2018-12-12 21:10:34 +00:00
fs When loading an inode from disk, verify that its mode is valid. 2018-12-27 07:18:53 +00:00
gdb
geom Switch from mutexes to atomics in GEOM_DEV I/O path. 2018-12-27 19:15:24 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 i386: Fix allocation of the KVA frame for pmap_quick_enter_page(). 2018-12-29 15:49:03 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Simplify jail ID printing on process exit 2018-12-29 21:36:02 +00:00
kgssapi
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Add note to 32-bit mips smp config files documenting the status 2018-12-19 23:22:14 +00:00
modules Include the new TPM 2.0 driver in the TPM module. 2018-12-19 22:43:10 +00:00
net Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
net80211 net80211: fix duplicate sequence number bump for non-AMPDU QoS frames. 2018-12-30 03:03:53 +00:00
netgraph Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4) 2018-12-17 16:00:35 +00:00
netinet Fix a regression in the TCP handling of received segments. 2018-12-20 16:05:30 +00:00
netinet6 Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Fix endless loop on NAT exhaustion with sticky-address 2018-12-12 20:15:06 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed ipoib: Notify on modify QP failure only when relevant 2018-12-05 13:27:17 +00:00
opencrypto Plug memory leak for AES_*_NIST_GMAC algorithms. 2018-12-13 08:59:51 +00:00
powerpc Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
riscv Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security mac: reduce pessimization of sdt probe handling 2018-12-19 22:30:26 +00:00
sparc64 Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
sys Enable sys/random.h #include from C++ 2018-12-24 19:37:10 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs Move ASSERT_VOP_LOCKED to top of ufs_vinit() as it should be true 2018-12-30 06:03:20 +00:00
vm Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
x86 add support for marking interrupt handlers as suspended 2018-12-17 17:11:00 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile