[ 25/40] s390/mm: fix flush_tlb_kernel_range()
From: Greg Kroah-Hartman
Date: Mon Mar 18 2013 - 17:20:38 EST
3.0-stable review patch. If anyone has any objections, please let me know.
From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
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
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 <heiko.carstens@xxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
arch/s390/include/asm/tlbflush.h | 2 --
1 file changed, 2 deletions(-)
@@ -73,8 +73,6 @@ static inline void __tlb_flush_idte(unsi
static inline void __tlb_flush_mm(struct mm_struct * mm)
- if (unlikely(cpumask_empty(mm_cpumask(mm))))
* 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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/