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)
Sat, Jul 18, 5:31 PM
Unknown Object (File)
Thu, Jul 16, 10:04 AM
Unknown Object (File)
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Thu, Jul 9, 12:29 AM
Unknown Object (File)
Fri, Jul 3, 12:02 PM
Unknown Object (File)
Fri, Jul 3, 5:29 AM
Unknown Object (File)
Fri, Jul 3, 2:18 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.