Page MenuHomeFreeBSD

efirt(9): carefully destroy efi_lock
ClosedPublic

Authored by kib on Sat, Jun 20, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 26, 10:43 PM
Unknown Object (File)
Fri, Jun 26, 10:31 PM
Unknown Object (File)
Thu, Jun 25, 9:37 AM
Unknown Object (File)
Thu, Jun 25, 9:10 AM
Unknown Object (File)
Thu, Jun 25, 4:18 AM
Unknown Object (File)
Wed, Jun 24, 8:08 AM
Unknown Object (File)
Wed, Jun 24, 8:00 AM
Unknown Object (File)
Wed, Jun 24, 4:08 AM
Subscribers
None

Details

Summary
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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sat, Jun 20, 12:23 PM
kib created this revision.
This revision is now accepted and ready to land.Sat, Jun 20, 6:03 PM
This revision was automatically updated to reflect the committed changes.