]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
UBUNTU: SAUCE: s390/mm: fix local TLB flushing vs. detach of an mm address space
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 12 Sep 2017 09:45:41 +0000 (11:45 +0200)
committerJuerg Haefliger <juerg.haefliger@canonical.com>
Wed, 13 Sep 2017 05:58:16 +0000 (07:58 +0200)
commitf14180d091364aeb1473123614327452e3a2a1cb
tree4775d478b6969800cb737cfe26f1d7ab9fdd5339
parent6babb60c4b776b1044ef481b4dd4a8e4e54f9f24
UBUNTU: SAUCE: s390/mm: fix local TLB flushing vs. detach of an mm address space

BugLink: http://bugs.launchpad.net/bugs/1708399
The local TLB flushing code keeps an additional mask in the mm.context,
the cpu_attach_mask. At the time a global flush of an address space is
done the cpu_attach_mask is copied to the mm_cpumask in order to avoid
future global flushes in case the mm is used by a single CPU only after
the flush.

Trouble is that the reset of the mm_cpumask is racy against the detach
of an mm address space by switch_mm. The current order is first the
global TLB flush and then the copy of the cpu_attach_mask to the
mm_cpumask. The order needs to be the other way around.

Cc: <stable@vger.kernel.org>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
(cherry-picked from commit b3e5dc45fd1ec2aa1de6b80008f9295eb17e0659 linux-next)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/tlbflush.h