diff options
author | Pekka Enberg <penberg@kernel.org> | 2010-11-08 20:29:07 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-09 19:19:38 +0100 |
commit | 63bfd7384b119409685a17d5c58f0b56e5dc03da (patch) | |
tree | b01a10267b8e702af948e571801f02ee70ff1794 /arch/um/sys-ppc/sysrq.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmo... (diff) | |
download | linux-63bfd7384b119409685a17d5c58f0b56e5dc03da.tar.xz linux-63bfd7384b119409685a17d5c58f0b56e5dc03da.zip |
perf_events: Fix perf_counter_mmap() hook in mprotect()
As pointed out by Linus, commit dab5855 ("perf_counter: Add mmap event hooks to
mprotect()") is fundamentally wrong as mprotect_fixup() can free 'vma' due to
merging. Fix the problem by moving perf_event_mmap() hook to
mprotect_fixup().
Note: there's another successful return path from mprotect_fixup() if old
flags equal to new flags. We don't, however, need to call
perf_event_mmap() there because 'perf' already knows the VMA is
executable.
Reported-by: Dave Jones <davej@redhat.com>
Analyzed-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-ppc/sysrq.c')
0 files changed, 0 insertions, 0 deletions