]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
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)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 12 Sep 2017 15:12:32 +0000 (10:12 -0500)
commit23a51d6fd7c5f98562ccf77f11ae2df76b4a07c7
tree1ce2347f0972e1d40419205af905abed7328850b
parent8cb091c60c8b9f3e9e358048fb7dd5fa3f67441e
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)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/tlbflush.h