From: Shaokun Zhang <zhangshaokun@xxxxxxxxxxxxx> In aarch64 sync icache and dcache, if anonymous pages hold self-modified code and these pages are migrated, it also should be flushed dcache and invalided icache. Therefore, page_mapping(page) check should be removed, otherwise icache maybe fetch stale instruction from PoU. Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx Signed-off-by: Shaokun Zhang <zhangshaokun@xxxxxxxxxxxxx> --- Change from v1: - update changelog suggested by Catalin. - add stable maillist arch/arm64/mm/flush.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index dbd12ea..43a76b0 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c @@ -71,10 +71,6 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr) { struct page *page = pte_page(pte); - /* no flushing needed for anonymous pages */ - if (!page_mapping(page)) - return; - if (!test_and_set_bit(PG_dcache_clean, &page->flags)) sync_icache_aliases(page_address(page), PAGE_SIZE << compound_order(page)); -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html