Page MenuHomeFreeBSD

efirt(9): carefully destroy efi_lock
ClosedPublic

Authored by kib on Jun 20 2026, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 13, 2:42 PM
Unknown Object (File)
Mon, Sep 7, 7:26 PM
Unknown Object (File)
Sun, Sep 6, 7:00 AM
Unknown Object (File)
Sat, Aug 29, 1:58 PM
Unknown Object (File)
Sat, Aug 29, 1:57 PM
Unknown Object (File)
Sat, Aug 29, 1:44 PM
Unknown Object (File)
Fri, Aug 28, 12:20 AM
Unknown Object (File)
Fri, Aug 21, 4:06 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.Jun 20 2026, 12:23 PM
kib created this revision.
This revision is now accepted and ready to land.Jun 20 2026, 6:03 PM
This revision was automatically updated to reflect the committed changes.