diff options
author | Lecopzer Chen <[email protected]> | 2019-09-23 15:36:24 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-09-24 15:54:09 -0700 |
commit | db57e98d87908b8837352abe08515e42752270c1 (patch) | |
tree | 7071d2bd033dd5f3dd8a61554141faef96e79994 /lib/mpi/mpi-cmp.c | |
parent | ae83189405ea5c693683327fa69ac95a23ec59be (diff) |
mm/sparse.c: fix ALIGN() without power of 2 in sparse_buffer_alloc()
The size argument passed into sparse_buffer_alloc() has already been
aligned with PAGE_SIZE or PMD_SIZE.
If the size after aligned is not power of 2 (e.g. 0x480000), the
PTR_ALIGN() will return wrong value. Use roundup to round sparsemap_buf
up to next multiple of size.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Lecopzer Chen <[email protected]>
Signed-off-by: Mark-PK Tsai <[email protected]>
Cc: YJ Chiang <[email protected]>
Cc: Lecopzer Chen <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions