A VM_BUG_ON triggered on the shmem selftest. Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> --- mm/shmem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/shmem.c b/mm/shmem.c index 75866a3..f0f1431 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2241,6 +2241,10 @@ int shmem_mcopy_atomic_pte(struct mm_struct *dst_mm, *pagep = NULL; } + VM_BUG_ON(PageLocked(page) || PageSwapBacked(page)); + __SetPageLocked(page); + __SetPageSwapBacked(page); + ret = mem_cgroup_try_charge(page, dst_mm, gfp, &memcg, false); if (ret) goto out_release; @@ -2290,6 +2294,7 @@ int shmem_mcopy_atomic_pte(struct mm_struct *dst_mm, out_release_uncharge: mem_cgroup_cancel_charge(page, memcg, false); out_release: + unlock_page(page); put_page(page); out_dec_used_blocks: if (sbinfo->max_blocks) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>