freebsd-skq/sys/fs/devfs
Edward Tomasz Napierala 4ddb3cc597 devfs(4): defer freeing until we drop devmtx ("cdev")
Before r332974 the old code would sometimes cause a rare lock order
reversal against pagequeue, which looked roughly like this:

witness_checkorder()
__mtx_lock-flags()
vm_page_alloc()
uma_small_alloc()
keg_alloc_slab()
keg_fetch-slab()
zone_fetch-slab()
zone_import()
zone_alloc_bucket()
uma_zalloc_arg()
bucket_alloc()
uma_zfree_arg()
free()
devfs_metoo()
devfs_populate_loop()
devfs_populate()
devfs_rioctl()
VOP_IOCTL_APV()
VOP_IOCTL()
vn_ioctl()
fo_ioctl()
kern_ioctl()
sys_ioctl()

Since r332974 the original problem no longer exists, but it still
makes sense to move things out of the - often congested - lock.

Reviewed By:	kib, markj
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27334
2020-12-29 13:47:36 +00:00
..
devfs_devs.c devfs(4): defer freeing until we drop devmtx ("cdev") 2020-12-29 13:47:36 +00:00
devfs_dir.c r326394 is calling malloc with M_WAITOK under a lock, revert for now 2017-11-30 14:06:54 +00:00
devfs_int.h devfs: Abstract locking assertions 2020-08-12 00:32:31 +00:00
devfs_rule.c
devfs_vfsops.c vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
devfs_vnops.c devfs: rework si_usecount to track opens 2020-08-11 14:27:57 +00:00
devfs.h devfs: rework si_usecount to track opens 2020-08-11 14:27:57 +00:00