HomeFreeBSD

Don't invoke semunload() if seminit() fails during MOD_LOAD.

Description

Don't invoke semunload() if seminit() fails during MOD_LOAD.

The module handler code invokes a MOD_UNLOAD event immediately if
MOD_LOAD fails. The result was that if seminit() failed, semunload()
was invoked twice. semunload() is not idempotent however and would
try to remove it's process_exit eventhandler twice resulting in a
panic.

Reviewed by: kib, markj
Obtained from: CheriBSD
MFC after: 1 month
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26696

Details

Provenance
jhbAuthored on
Reviewer
kib
Differential Revision
D26696: Don't invoke semunload() if seminit() fails during MOD_LOAD.
Parents
rS366583: Fix a few mandoc issues
Branches
Unknown
Tags
Unknown