• P
    mm: provide a saner PTE walking API for modules · 9fd6dad1
    Paolo Bonzini 提交于
    Currently, the follow_pfn function is exported for modules but
    follow_pte is not.  However, follow_pfn is very easy to misuse,
    because it does not provide protections (so most of its callers
    assume the page is writable!) and because it returns after having
    already unlocked the page table lock.
    
    Provide instead a simplified version of follow_pte that does
    not have the pmdpp and range arguments.  The older version
    survives as follow_invalidate_pte() for use by fs/dax.c.
    Reviewed-by: NJason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    9fd6dad1
dax.c 46.4 KB