Skip to content
Commit 8fe7e94e authored by Robert Richter's avatar Robert Richter
Browse files

oprofile, x86: Fix race in nmi handler while starting counters



In some rare cases, nmis are generated immediately after the nmi
handler of the cpu was started. This causes the counter not to be
enabled. Before enabling the nmi handlers we need to set variable
ctr_running first and make sure its value is written to memory.

Also, the patch makes all existing barriers a memory barrier instead
of a compiler barrier only.

Reported-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: <stable@kernel.org> # .35+
Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
parent 2c53b436
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment