aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_xarray.c
diff options
context:
space:
mode:
authorGavin Shan <[email protected]>2025-03-21 12:02:22 +0000
committerAndrew Morton <[email protected]>2025-05-12 00:48:17 +0000
commit79049bb48a76333646d076e29d4f99fedefdaf0d (patch)
tree8dd6272a32e4908a875dab68a053e6d5c3213c0a /lib/test_xarray.c
parentmm: fix parameter passed to page_mapcount_is_type() (diff)
downloadkernel-79049bb48a76333646d076e29d4f99fedefdaf0d.tar.gz
kernel-79049bb48a76333646d076e29d4f99fedefdaf0d.zip
mm/debug: fix parameter passed to page_mapcount_is_type()
As the comments of page_mapcount_is_type() indicate, the parameter passed to the function should be one more than page->_mapcount. However, page->_mapcount is passed to the function by commit 4ffca5a96678 ("mm: support only one page_type per page") where page_type_has_type() is replaced by page_mapcount_is_type(), but the parameter isn't adjusted. Fix the parameter for page_mapcount_is_type() to be (page->__mapcount + 1). Note that the issue doesn't cause any visible impacts due to the safety gap introduced by PGTY_mapcount_underflow limit. [[email protected]: simplify __dump_folio(), per David] Link: https://lkml.kernel.org/r/[email protected] Fixes: 4ffca5a96678 ("mm: support only one page_type per page") Signed-off-by: Gavin Shan <[email protected]> Acked-by: David Hildenbrand <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: gehao <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Miaohe Lin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions