mirror of
https://github.com/torvalds/linux.git
synced 2026-06-27 00:24:51 +02:00
In this if statement:
if (head + event->header.size >= mmap_size) {
if (mmaps[map_idx]) {
munmap(mmaps[map_idx], mmap_size);
mmaps[map_idx] = NULL;
}
page_offset = page_size * (head / page_size);
file_offset += page_offset;
head -= page_offset;
goto remap;
}
With, for instance, these values:
head=2992
event->header.size=48
mmap_size=3040
We end up endlessly looping back to remap. Off by one.
Problem introduced in 55b4462.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
Reported-by: David Ahern <daahern@cisco.com>
Bisected-by: David Ahern <daahern@cisco.com>
Tested-by: David Ahern <daahern@cisco.com>
Cc: David Ahern <daahern@cisco.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||
|---|---|---|
| .. | ||
| include | ||
| scripting-engines | ||
| ui | ||
| abspath.c | ||
| alias.c | ||
| bitmap.c | ||
| build-id.c | ||
| build-id.h | ||
| cache.h | ||
| callchain.c | ||
| callchain.h | ||
| color.c | ||
| color.h | ||
| config.c | ||
| cpumap.c | ||
| cpumap.h | ||
| ctype.c | ||
| debug.c | ||
| debug.h | ||
| debugfs.c | ||
| debugfs.h | ||
| environment.c | ||
| event.c | ||
| event.h | ||
| evsel.c | ||
| evsel.h | ||
| exec_cmd.c | ||
| exec_cmd.h | ||
| generate-cmdlist.sh | ||
| header.c | ||
| header.h | ||
| help.c | ||
| help.h | ||
| hist.c | ||
| hist.h | ||
| hweight.c | ||
| levenshtein.c | ||
| levenshtein.h | ||
| map.c | ||
| map.h | ||
| pager.c | ||
| parse-events.c | ||
| parse-events.h | ||
| parse-options.c | ||
| parse-options.h | ||
| path.c | ||
| PERF-VERSION-GEN | ||
| probe-event.c | ||
| probe-event.h | ||
| probe-finder.c | ||
| probe-finder.h | ||
| pstack.c | ||
| pstack.h | ||
| quote.c | ||
| quote.h | ||
| run-command.c | ||
| run-command.h | ||
| session.c | ||
| session.h | ||
| sigchain.c | ||
| sigchain.h | ||
| sort.c | ||
| sort.h | ||
| strbuf.c | ||
| strbuf.h | ||
| string.c | ||
| strlist.c | ||
| strlist.h | ||
| svghelper.c | ||
| svghelper.h | ||
| symbol.c | ||
| symbol.h | ||
| thread.c | ||
| thread.h | ||
| trace-event-info.c | ||
| trace-event-parse.c | ||
| trace-event-read.c | ||
| trace-event-scripting.c | ||
| trace-event.h | ||
| types.h | ||
| usage.c | ||
| util.c | ||
| util.h | ||
| values.c | ||
| values.h | ||
| wrapper.c | ||
| xyarray.c | ||
| xyarray.h | ||