pr_warn_once("%s (%d): attempted to duplicate a private mapping with mremap. This is not supported.\n", current->comm, current->pid);
#include <linux/hugetlb.h>
#include <linux/capability.h>
#include <linux/swapops.h>
#include <linux/highmem.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/mmu_notifier.h>
#include <linux/uaccess.h>
#include <linux/mm-arch-hooks.h>
#include <linux/userfaultfd_k.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
static pmd_t *get_old_pmd(struct mm_struct *mm, unsigned long addr)
pgd = pgd_offset(mm, addr);
if (pgd_none_or_clear_bad(pgd))
p4d = p4d_offset(pgd, addr);
if (p4d_none_or_clear_bad(p4d))
pud = pud_offset(p4d, addr);
if (pud_none_or_clear_bad(pud))
pmd = pmd_offset(pud, addr);
static pmd_t *alloc_new_pmd(struct mm_struct *mm, struct vm_area_struct *vma,