freebsd-src/sys/fs/devfs
Jason A. Harmening 67864268da devfs: add integrity asserts for cdevp_list
It's possible for misuse of cdev KPIs or for bugs in devfs itself to
result in e.g. a cdev object's container being freed while still on the
global list used to populate each devfs mount; see PR 273418 for a
recent example.

Since a node may be marked inactive well before it is reaped from the
list, add a new flag solely to track list membership, and employ it in
some basic list integrity assertions to catch bad actors.

Discussed with:	kib, mjg
MFC after:	1 week
2023-09-21 11:51:12 -05:00
..
devfs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
devfs_devs.c devfs: add integrity asserts for cdevp_list 2023-09-21 11:51:12 -05:00
devfs_dir.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
devfs_int.h devfs: add integrity asserts for cdevp_list 2023-09-21 11:51:12 -05:00
devfs_rule.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
devfs_vfsops.c Fix MNT_IGNORE for devfs, fdescfs and nullfs 2023-08-26 12:08:37 +01:00
devfs_vnops.c devfs: add integrity asserts for cdevp_list 2023-09-21 11:51:12 -05:00