diff options
| author | Matthew Wilcox (Oracle) <[email protected]> | 2023-11-09 21:06:04 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-12-29 11:58:22 -0800 |
| commit | 5f3bd90d9b98855c2e811aa3b4823d583b0020df (patch) | |
| tree | 9273918c69f3432602cd2cbccd2a27ca0583ed32 /tools/perf/scripts/python | |
| parent | 382497ada051a6fc79612aba5e30cdfa26364374 (diff) | |
buffer: fix grow_buffers() for block size > PAGE_SIZE
We must not shift by a negative number so work in terms of a byte offset
to avoid the awkward shift left-or-right-depending-on-sign option. This
means we need to use check_mul_overflow() to ensure that a large block
number does not result in a wrap.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Pankaj Raghav <[email protected]>
Cc: Ryusuke Konishi <[email protected]>
[[email protected]: add cast in grow_buffers() to avoid a multiplication libcall]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions