]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/mm: fix flush_tlb_kernel_range()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 4 Mar 2013 13:14:11 +0000 (14:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Mar 2013 20:05:00 +0000 (13:05 -0700)
commit59c0110f7ee64a9b5389b8b4fd2ec5feab9c6dc8
tree78f1f0031158bd52e529d72e6280c238a7d6b3e2
parent8a52ddf504acc488696bdbe7bc4cef7a30a40091
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/tlbflush.h