Skip to content

Commit 4737edb

Browse files
nhoriguchiakpm00
authored andcommitted
mm/huge_memory.c: warn with pr_warn_ratelimited instead of VM_WARN_ON_ONCE_FOLIO
split_huge_page_to_list() WARNs when called for huge zero pages, which sounds to me too harsh because it does not imply a kernel bug, but just notifies the event to admins. On the other hand, this is considered as critical by syzkaller and makes its testing less efficient, which seems to me harmful. So replace the VM_WARN_ON_ONCE_FOLIO with pr_warn_ratelimited. Link: https://lkml.kernel.org/r/[email protected] Fixes: 478d134 ("mm/huge_memory: do not overkill when splitting huge_zero_page") Signed-off-by: Naoya Horiguchi <[email protected]> Reported-by: [email protected] Link: https://lore.kernel.org/lkml/[email protected]/ Reviewed-by: Yang Shi <[email protected]> Cc: Miaohe Lin <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Xu Yu <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 82f9513 commit 4737edb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mm/huge_memory.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,9 +2665,10 @@ int split_huge_page_to_list(struct page *page, struct list_head *list)
26652665
VM_BUG_ON_FOLIO(!folio_test_large(folio), folio);
26662666

26672667
is_hzp = is_huge_zero_page(&folio->page);
2668-
VM_WARN_ON_ONCE_FOLIO(is_hzp, folio);
2669-
if (is_hzp)
2668+
if (is_hzp) {
2669+
pr_warn_ratelimited("Called split_huge_page for huge zero page\n");
26702670
return -EBUSY;
2671+
}
26712672

26722673
if (folio_test_writeback(folio))
26732674
return -EBUSY;

0 commit comments

Comments
 (0)