From: Peter Zijlstra Date: Mon, 30 Mar 2009 17:07:03 +0000 (+0200) Subject: perf_counter: fix update_userpage() X-Git-Tag: v2.6.31-rc1~383^2~427 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38ff667b321b00f5e6830e93fb4ab11a653a2920;p=pandora-kernel.git perf_counter: fix update_userpage() It just occured to me it is possible to have multiple contending updates of the userpage (mmap information vs overflow vs counter). This would break the seqlock logic. It appear the arch code uses this from NMI context, so we cannot possibly serialize its use, therefore separate the data_head update from it and let it return to its original use. The arch code needs to make sure there are no contending callers by disabling the counter before using it -- powerpc appears to do this nicely. Signed-off-by: Peter Zijlstra Acked-by: Paul Mackerras Orig-LKML-Reference: <20090330171023.241410660@chello.nl> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed