]> 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>
Wed, 16 Aug 2017 12:10:01 +0000 (14:10 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Sep 2017 13:44:25 +0000 (15:44 +0200)
commit7e2d732b9ee65737b1b5d879d0c371b4de234add
treef02fc2fdb751573d77c6fa682a1a697f9ca27613
parent64a6cde79081b8329ebe96cbc31049c25b103c0b
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>
(backported from b3e5dc45fd1ec2aa1de6b80008f9295eb17e0659 linux-next)
[merged with "s390/mm,kvm: flush gmap address space with IDTE"]
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/s390/include/asm/tlbflush.h