]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/vas: Don't set uses_vas for kernel windows
authorNicholas Piggin <npiggin@gmail.com>
Thu, 8 Feb 2018 09:18:38 +0000 (19:18 +1000)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:26:35 +0000 (08:26 -0600)
commita86b2492b7e5a669b3f633a835efd29f001a8cfa
tree72bb53fbb7b208190c357e9487e004d97f203cac
parent3619ecf87314163a170c2bd4f1e19cd4ae4f0627
powerpc/vas: Don't set uses_vas for kernel windows

BugLink: http://bugs.launchpad.net/bugs/1751131
commit b00b62898631b756c3e123542bbb0487aa343dd9 upstream.

cp_abort is only required for user windows, because kernel context
must not be preempted between a copy/paste pair.

Without this patch, the init task gets used_vas set when it runs the
nx842_powernv_init initcall, which opens windows for kernel usage.

used_vas is then never cleared anywhere, so it gets propagated into
all other tasks. It's a property of the address space, so it should
really be cleared when a new mm is created (or in dup_mmap if the
mmaps are marked as VM_DONTCOPY). For now we seem to have no such
driver, so leave that for another patch.

Fixes: 6c8e6bb2a52d ("powerpc/vas: Add support for user receive window")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/platforms/powernv/vas-window.c