Unverified Commit 602185f4 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12082 userfaultfd: don't BUG_ON() if khugepaged yanks our page table

parents 5c54320f c38a55c9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -724,9 +724,10 @@ static __always_inline ssize_t mfill_atomic(struct mm_struct *dst_mm,
			err = -EFAULT;
			break;
		}

		BUG_ON(pmd_none(*dst_pmd));
		BUG_ON(pmd_trans_huge(*dst_pmd));
		/*
		 * For shmem mappings, khugepaged is allowed to remove page
		 * tables under us; pte_offset_map_lock() will deal with that.
		 */

#ifdef CONFIG_USERSWAP
		if (static_branch_unlikely(&userswap_enabled) &&