diff options
author | Naoya Horiguchi <[email protected]> | 2023-04-06 17:20:04 +0900 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-04-16 10:41:25 -0700 |
commit | 4737edbbdd4958ae29ca6a310a6a2fa4e0684b01 (patch) | |
tree | f0b12516a14c7c1d06080f28aa8480e1c52b7a82 | |
parent | 82f951340f25bba262766f82caec54e7fd6a73c7 (diff) |
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: 478d134e9506 ("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]>
-rw-r--r-- | mm/huge_memory.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index e3706a2b34b2..3fae2d2496ab 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2665,9 +2665,10 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) VM_BUG_ON_FOLIO(!folio_test_large(folio), folio); is_hzp = is_huge_zero_page(&folio->page); - VM_WARN_ON_ONCE_FOLIO(is_hzp, folio); - if (is_hzp) + if (is_hzp) { + pr_warn_ratelimited("Called split_huge_page for huge zero page\n"); return -EBUSY; + } if (folio_test_writeback(folio)) return -EBUSY; |