HomeFreeBSD

ctladm: Fix a race when loading ctl.ko

Description

ctladm: Fix a race when loading ctl.ko

If multiple ctladm processes try to load ctl.ko at the same time, only
one will succeed. Handle this possibility by retrying the operation
(open /dev/cam/ctl) if kldload returns EEXIST, rather than bailing.
This at least helps ensure that ctladm tests can be run in parallel
when ctl.ko is not preloaded.

Reviewed by: asomers
MFC after: 1 week

(cherry picked from commit 7d6932d20aedbbb220cd78e90ab4e82d1abaad31)

Details

Provenance
markjAuthored on Mon, Jun 24, 3:09 PM
Parents
rG10f4a77485ff: procfs.4: Fix the description of credential info in the "status" file
Branches
Unknown
Tags
Unknown