commit | bdb94ad86e0a26fc10b7a246f30b89cfc3e4fdee | [log] [tgz] |
---|---|---|
author | Nick Maniscalco <maniscalco@google.com> | Mon Jul 26 21:49:04 2021 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Mon Jul 26 21:49:04 2021 +0000 |
tree | 778e82fdab4c9c430f76034d6214707e92b76ade | |
parent | dfbc17de626ae31220e273b1131735a88b80e48f [diff] |
[kernel] Don't panic when racing during secondary CPU shutdown platform_halt_secondary_cpus's job is to shutdown any and all online secondary CPUs. It does this by querying the set of online CPUs, applying a mask to mask off the primary (CPU-0) and then calling mp_unplug_cpu_mask. platform_halt_secondary_cpus could be called concurrently by multiple threads. If that happens, it's possible for the calls to race and result in the "loser" calling mp_unplug_cpu_mask with a mask containing CPUs that are already offline, which would result in ZX_ERR_BAD_STATE. This CL changes platform_halt_secondary_cpus to ignore a ZX_ERR_BAD_STATE from mp_unplug_cpu_mask if it finds that the secondary CPUs have already been offlined. Tested by running several instances of dm_reboot_bootloader_test in a loop for several hours. Fixed: 81355 Change-Id: I599fc650e5541a5ac2c529acce46f0b2a5343f2e Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/559962 Reviewed-by: Rasha Eqbal <rashaeqbal@google.com> Commit-Queue: Nick Maniscalco <maniscalco@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.