aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/compaction-times.py
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2018-10-30 15:05:14 -0700
committerLinus Torvalds <[email protected]>2018-10-31 08:54:12 -0700
commitce1091d471107dbf6f91db66a480a25950c9b9ff (patch)
tree7a38d2419b4a97761bad138cac431a48fa0c7d33 /tools/perf/scripts/python/compaction-times.py
parent41e7b1661ffbf562d3aa2b7ce4ad283db50b711a (diff)
lib/bitmap.c: fix remaining space computation in bitmap_print_to_pagebuf
For various alignments of buf, the current expression computes 4096 ok 4095 ok 8190 8189 ... 4097 i.e., if the caller has already written two bytes into the page buffer, len is 8190 rather than 4094, because PTR_ALIGN aligns up to the next boundary. So if the printed version of the bitmap is huge, scnprintf() ends up writing beyond the page boundary. I don't think any current callers actually write anything before bitmap_print_to_pagebuf, but the API seems to be designed to allow it. [[email protected]: use offset_in_page(), per Andy] [[email protected]: include mm.h for offset_in_page()] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: Yury Norov <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Sudeep Holla <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions