HomeFreeBSD

x86: Close race condition on MCA task queues at startup

Description

x86: Close race condition on MCA task queues at startup

Currently, the CMCI handler checks the cold variable to determine
whether it can schedule a task. The task queue is setup as part of the
mca_startup() function, which is run well after the configure_final()
function sets the cold variable to 0. Therefore, if an MCA arrives
in the window between configure_final() and mca_startup() running,
the code could try to schedule a task on an unintitalized task queue.

Close the race by specifically checking whether the mca_startup()
function has run.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12276

(cherry picked from commit 4a5d8670a7d58b04913fd90aae85a1e35236ca3d)

Details

Provenance
jtlAuthored on Fri, Oct 3, 4:23 PM
Reviewer
markj
Differential Revision
D12276: x86: Close race condition on MCA task queues at startup
Parents
rG1b00e2ad86b3: x86: Keep cumulative MCA statistics in the kernel
Branches
Unknown
Tags
Unknown