From: Andi Kleen Date: Mon, 10 Oct 2005 23:03:39 +0000 (+0200) Subject: [PATCH] x86_64: Fix change_page_attr cache flushing X-Git-Tag: v2.6.14-rc4~6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=094804c5a132f04c12dd4902ee15c64362e5c1af;p=~shefty%2Frdma-dev.git [PATCH] x86_64: Fix change_page_attr cache flushing Noticed by Terence Ripperda Undo wrong change in global_flush_tlb. We need to flush the caches in all cases, not just when pages were reverted. This was a bogus optimization added earlier, but it was wrong. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 94862e1ec03..b90e8fe9eeb 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c @@ -220,8 +220,6 @@ void global_flush_tlb(void) down_read(&init_mm.mmap_sem); df = xchg(&df_list, NULL); up_read(&init_mm.mmap_sem); - if (!df) - return; flush_map((df && !df->next) ? df->address : 0); for (; df; df = next_df) { next_df = df->next;