From: Stephane Eranian Date: Mon, 11 Jun 2012 13:44:26 +0000 (+0200) Subject: perf/x86: Fix broken LBR fixup code X-Git-Tag: v3.5-rc3~15^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f42985825dd93f0593efe454e54c2aa13f7830;p=pandora-kernel.git perf/x86: Fix broken LBR fixup code I noticed that the LBR fixups were not working anymore on programs where they used to. I tracked this down to a recent change to copy_from_user_nmi(): db0dc75d640 ("perf/x86: Check user address explicitly in copy_from_user_nmi()") This commit added a call to __range_not_ok() to the copy_from_user_nmi() routine. The problem is that the logic of the test must be reversed. __range_not_ok() returns 0 if the range is VALID. We want to return early from copy_from_user_nmi() if the range is NOT valid. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra Acked-by: Arun Sharma Link: http://lkml.kernel.org/r/20120611134426.GA7542@quad Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed