Patchwork [3.5.y.z,extended,stable] Patch "s390/mm: fix flush_tlb_kernel_range()" has been added to staging queue

mail settings
Submitter Luis Henriques
Date March 20, 2013, 10:43 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/229318/
State New
Headers show


Luis Henriques - March 20, 2013, 10:43 a.m.
This is a note to let you know that I have just added a patch titled

    s390/mm: fix flush_tlb_kernel_range()

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From f4e8e8da56a062667dcded9d7ca58fe0cfa72410 Mon Sep 17 00:00:00 2001
From: Heiko Carstens <>
Date: Mon, 4 Mar 2013 14:14:11 +0100
Subject: [PATCH] s390/mm: fix flush_tlb_kernel_range()

commit f6a70a07079518280022286a1dceb797d12e1edf upstream.

Our flush_tlb_kernel_range() implementation calls __tlb_flush_mm() with
&init_mm as argument. __tlb_flush_mm() however will only flush tlbs
for the passed in mm if its mm_cpumask is not empty.

For the init_mm however its mm_cpumask has never any bits set. Which in
turn means that our flush_tlb_kernel_range() implementation doesn't
work at all.

This can be easily verified with a vmalloc/vfree loop which allocates
a page, writes to it and then frees the page again. A crash will follow
almost instantly.

To fix this remove the cpumask_empty() check in __tlb_flush_mm() since
there shouldn't be too many mms with a zero mm_cpumask, besides the
init_mm of course.

Signed-off-by: Heiko Carstens <>
Signed-off-by: Martin Schwidefsky <>
Luis Henriques <>
 arch/s390/include/asm/tlbflush.h | 2 --
 1 file changed, 2 deletions(-)



diff --git a/arch/s390/include/asm/tlbflush.h b/arch/s390/include/asm/tlbflush.h
index 9fde315..6f709bd 100644
--- a/arch/s390/include/asm/tlbflush.h
+++ b/arch/s390/include/asm/tlbflush.h
@@ -74,8 +74,6 @@  static inline void __tlb_flush_idte(unsigned long asce)

 static inline void __tlb_flush_mm(struct mm_struct * mm)
-	if (unlikely(cpumask_empty(mm_cpumask(mm))))
-		return;
 	 * If the machine has IDTE we prefer to do a per mm flush
 	 * on all cpus instead of doing a local flush if the mm