diff options
author | Doug Berger <[email protected]> | 2022-09-14 12:09:17 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-09-26 12:14:34 -0700 |
commit | 317314527d173e1f139ceaf8cb87cb1746abf240 (patch) | |
tree | f244845d33ab1e283634f49a5ef224ee85aa2700 /lib/mpi/mpi-sub-ui.c | |
parent | dac22531bbd4af2426c4e29e05594415ccfa365d (diff) |
mm/hugetlb: correct demote page offset logic
With gigantic pages it may not be true that struct page structures are
contiguous across the entire gigantic page. The nth_page macro is used
here in place of direct pointer arithmetic to correct for this.
Mike said:
: This error could cause addressing exceptions. However, this is only
: possible in configurations where CONFIG_SPARSEMEM &&
: !CONFIG_SPARSEMEM_VMEMMAP. Such a configuration option is rare and
: unknown to be the default anywhere.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support")
Signed-off-by: Doug Berger <[email protected]>
Reviewed-by: Mike Kravetz <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions