Commit 2394aef
mm/huge_memory: skip invalid debugfs new_order input for folio split
User can put arbitrary new_order via debugfs for folio split test.
Although new_order check is added to split_huge_page_to_list_order() in
the prior commit, these two additional checks can avoid unnecessary folio
locking and split_folio_to_order() calls.
Link: https://lkml.kernel.org/r/20240307181854.138928-2-zi.yan@sent.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-mm/7dda9283-b437-4cf8-ab0d-83c330deb9c0@moroto.mountain/
Cc: David Hildenbrand <david@redhat.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 1412ecb commit 2394aef
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3486 | 3486 | | |
3487 | 3487 | | |
3488 | 3488 | | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
3489 | 3492 | | |
3490 | 3493 | | |
3491 | 3494 | | |
| |||
3553 | 3556 | | |
3554 | 3557 | | |
3555 | 3558 | | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
3556 | 3562 | | |
3557 | 3563 | | |
3558 | 3564 | | |
| |||
0 commit comments