efi_init() might return error after initializing the mutex, in which case MOD_UNLOAD() is not processed, and the mutex is not destroyed. Similarly, efi_uninit() skips any processing if efi_runtime was left as NULL, leaving mutex not destroyed. Initialize the mutex in MOD_LOAD case, and destroy in MOD_UNLOAD, also handling errors.
Details
Details
- Reviewers
imp emaste - Commits
- rG8edcb37dd075: efirt(9): carefully destroy efi_lock
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable