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: NSuravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: <stable@kernel.org> # .35+ Signed-off-by: NRobert Richter <robert.richter@amd.com>
Showing
想要评论请 注册 或 登录