Skip to content

Commit

Permalink
hugetlb: remove meaningless BUG_ON(huge_pte_none())
Browse files Browse the repository at this point in the history
When code reaches here, invalid page would have been accessed if huge pte
is none. So this BUG_ON(huge_pte_none()) is meaningless. Remove it.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Muchun Song <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
MiaoheLin authored and akpm00 committed Sep 12, 2022
1 parent a9e1eab commit 5e6b1bf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5345,7 +5345,6 @@ static vm_fault_t hugetlb_wp(struct mm_struct *mm, struct vm_area_struct *vma,
u32 hash;

put_page(old_page);
BUG_ON(huge_pte_none(pte));
/*
* Drop hugetlb_fault_mutex and i_mmap_rwsem before
* unmapping. unmapping needs to hold i_mmap_rwsem
Expand Down

0 comments on commit 5e6b1bf

Please sign in to comment.