summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-03-19 15:35:09 +0100
committerIngo Molnar <mingo@kernel.org>2013-05-01 12:34:46 +0200
commit5919b30933d7c4fac1f214c59f26c5e990044f09 (patch)
tree1d719e5fd6534ed0a6dd00927e3b8343bb725e50 /arch
parent1b0dac2ac6debdbf1541e15f2cede03613cf4465 (diff)
perf: Fix vmalloc ring buffer pages handling
If we allocate perf ring buffer with the size of single (user) page, we will get memory corruption when releasing itin rb_free_work function (for CONFIG_PERF_USE_VMALLOC option). For single page sized ring buffer the page_order is -1 (because nr_pages is 0). This needs to be recognized in the rb_free_work function to release proper amount of pages. Adding data_page_nr function that returns number of allocated data pages. Customizing the rest of the code to use it. Reported-by: Jan Stancek <jstancek@redhat.com> Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20130319143509.GA1128@krava.brq.redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions