Page MenuHomeFreeBSD

bhyve/arm64: Fix a race in PSCI CPU_ON
ClosedPublic

Authored by andrew on Wed, Aug 6, 4:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 17, 10:52 AM
Unknown Object (File)
Sat, Aug 16, 5:26 PM
Unknown Object (File)
Tue, Aug 12, 12:08 AM
Unknown Object (File)
Tue, Aug 12, 12:07 AM
Unknown Object (File)
Mon, Aug 11, 4:36 PM
Unknown Object (File)
Thu, Aug 7, 10:48 AM

Details

Summary

When multiple CPUs try to start the same CPU only one should return
success, the other CPUs should see either ON_PENDING or ALREADY_ON.
There was a race between checking if the CPU is on and marking it as
on in the running_cpumask CPU set.

Fix the race by using CPU_TEST_SET_ATOMIC to both check and set the
state in running_cpumask.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable