On Wed, 2019-05-15 at 08:05 +0530, Anshuman Khandual wrote: > Virtual address alignment is essential in ensuring correct clearing for all > intermediate level pgtable entries and freeing associated pgtable pages. An > unaligned address can end up randomly freeing pgtable page that potentially > still contains valid mappings. Hence also check it's alignment along with > existing phys_addr check. > > Signed-off-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> > Cc: Toshi Kani <toshi.kani@xxxxxxx> > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > Cc: Will Deacon <will.deacon@xxxxxxx> > Cc: Chintan Pandya <cpandya@xxxxxxxxxxxxxx> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Cc: Catalin Marinas <catalin.marinas@xxxxxxx> > --- > Changes in V4: > > - Added similar check for ioremap_try_huge_p4d() as per Toshi Kani Thanks for the update. It looks good to me. Reviewed-by: Toshi Kani <toshi.kani@xxxxxxx> -Toshi