--- - branch: MAIN date: Mon Mar 28 12:37:09 UTC 2022 files: - new: '1.204' old: '1.203' path: src/sys/miscfs/specfs/spec_vnops.c pathrev: src/sys/miscfs/specfs/spec_vnops.c@1.204 type: modified - new: '1.50' old: '1.49' path: src/sys/miscfs/specfs/specdev.h pathrev: src/sys/miscfs/specfs/specdev.h@1.50 type: modified id: 20220328T123709Z.a13238693578faedf73d838b0c3b64186ba9f6f6 log: | specfs: Prevent new opens while close is waiting to drain. Otherwise, bdev/cdev_close could have cancelled all _existing_ opens, and waited for them to complete (and freed resources used by them) -- but a new one could start, and hang (e.g., a tty), at the same time spec_close tries to drain all pending I/O operations, one of which (the new open) is now hanging indefinitely. Preventing the new open from even starting until bdev/cdev_close is finished and all I/O operations have drained avoids this deadlock. module: src subject: 'CVS commit: src/sys/miscfs/specfs' unixtime: '1648471029' user: riastradh