diff options
| author | David Hildenbrand <[email protected]> | 2025-06-04 14:05:44 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-07-10 05:41:56 +0000 |
| commit | 792b429db7e0217faf7bce9fe46e7708135cf83c (patch) | |
| tree | a9615aa8301c6f52cade04ae8125ef5938603f7c /mm/mm_init.c | |
| parent | Docs/admin-guide/mm/damon: add DAMON_STAT usage document (diff) | |
| download | kernel-792b429db7e0217faf7bce9fe46e7708135cf83c.tar.gz kernel-792b429db7e0217faf7bce9fe46e7708135cf83c.zip | |
mm/gup: remove (VM_)BUG_ONs
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing in
other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as well.
Add one comment for the pfn_valid() check.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
something > 0 we're in bigger trouble. Convert the other BUG_ON's into
VM_WARN_ON_ONCE as well, they are in a similar domain "should never
happen", but more reasonable to check for during early testing.
[[email protected]: use the _FOLIO variant where possible, per Lorenzo]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Suren Baghdasaryan <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Acked-by: SeongJae Park <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Peter Xu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/mm_init.c')
0 files changed, 0 insertions, 0 deletions
