Ensure that all destructors for cdevpriv finished running after destroy_dev() returns to the caller. Otherwise, since devfs_destroy_cdevpriv() removes the cdevpriv data from the list, drops the cdevpriv_mtx, and then starts the destructor, it is possible for destroy_dev() to return before destructor finished in other thread. This should allow drivers to safely remove cdev instance data that might be referenced by cdevpriv data. Diagnosed by: kevans
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Ensure that all destructors for cdevpriv finished running after destroy_dev() returns to the caller.
s/after/before/