]> git.baikalelectronics.ru Git - kernel.git/commit
oprofile, x86: Fix race in nmi handler while starting counters
authorRobert Richter <robert.richter@amd.com>
Wed, 1 Jun 2011 13:31:44 +0000 (15:31 +0200)
committerRobert Richter <robert.richter@amd.com>
Wed, 15 Jun 2011 12:31:29 +0000 (14:31 +0200)
commit143a52d78ffcb2c9e897b0deff466b904bee92d0
treedb624be62586a59c5f3954bf7c8c9188fa58d819
parent380abddf94be3476f85e64e22814c928018c2f42
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: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: <stable@kernel.org> # .35+
Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/oprofile/nmi_int.c