diff options
author | Jiri Olsa <[email protected]> | 2013-03-19 15:35:09 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2013-05-01 12:34:46 +0200 |
commit | 5919b30933d7c4fac1f214c59f26c5e990044f09 (patch) | |
tree | 1d719e5fd6534ed0a6dd00927e3b8343bb725e50 /fs/jbd2/commit.c | |
parent | 1b0dac2ac6debdbf1541e15f2cede03613cf4465 (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 <[email protected]>
Original-patch-by: Peter Zijlstra <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions