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)
Tue, Oct 6, 1:31 AM
Unknown Object (File)
Sun, Oct 4, 6:32 PM
Unknown Object (File)
Sun, Oct 4, 1:11 AM
Unknown Object (File)
Fri, Oct 2, 3:19 PM
Unknown Object (File)
Sun, Sep 27, 3:17 PM
Unknown Object (File)
Tue, Sep 22, 3:31 AM
Unknown Object (File)
Sun, Sep 13, 2:42 PM
Unknown Object (File)
Mon, Sep 7, 7:26 PM
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.