Files
linux/mm
Pekka Enberg 8d5be245dd perf_events: Fix perf_counter_mmap() hook in mprotect()
commit 63bfd7384b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-09 13:27:03 -08:00
..
2009-04-01 08:59:13 -07:00
2010-07-05 11:10:42 -07:00
2009-06-16 19:47:28 -07:00
2010-01-06 15:05:22 -08:00
2010-05-12 14:57:00 -07:00
2010-12-09 13:26:39 -08:00
2009-09-22 07:17:35 -07:00
2010-10-28 21:44:18 -07:00
2010-09-26 17:21:34 -07:00
2010-01-18 10:19:11 -08:00
2010-12-09 13:27:02 -08:00
2010-09-26 17:21:27 -07:00
2007-10-20 01:27:18 +02:00
2009-10-01 16:11:12 -07:00
2010-08-26 16:41:46 -07:00
2009-06-23 12:50:05 -07:00
2010-01-22 15:18:41 -08:00
2010-01-18 10:19:11 -08:00