sparc64: Do not insert non-valid PTEs into the TSB hash table.
David S. Miller authored
[ Upstream commit 18f38132

 ]

The assumption was that update_mmu_cache() (and the equivalent for PMDs) would
only be called when the PTE being installed will be accessible by the user.

This is not true for code paths originating from remove_migration_pte().

There are dire consequences for placing a non-valid PTE into the TSB.  The TLB
miss frramework assumes thatwhen a TSB entry matches we can just load it into
the TLB and return from the TLB miss trap.

So if a non-valid PTE is in there, we will deadlock taking the TLB miss over
and over, never satisfying the miss.

Just exit early from update_mmu_cache() and friends in this situation.

Based upon a report and patch from Christopher Alexander Tobias Schulze.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
5b36a75b
Name Last commit Last update
..
alpha Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux
arc ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
arm ARM: 8115/1: LPAE: reduce damage caused by idmap to virtual memory layout
arm64 locking/mutex: Disable optimistic spinning on some architectures
avr32 avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
blackfin Merge tag 'for-linus' of git://github.com/realmz/blackfin-linux
c6x arch: c6x: mm: include "asm/uaccess.h" to pass compiling
cris cris: media platform drivers: fix build
frv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
h8300 Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
hexagon Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux
ia64 exec/ptrace: fix get_dumpable() incorrect tests
m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
m68k m68k: Skip futex_atomic_cmpxchg_inatomic() test
metag metag: Reduce maximum stack size to 256MB
microblaze microblaze: fix clone syscall
mips MIPS: KVM: Fix memory leak on VCPU
mn10300 mn10300: Use early_param() to parse "mem=" parameter
openrisc Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux
parisc parisc: Remove SA_RESTORER define
powerpc locking/mutex: Disable optimistic spinning on some architectures
s390 s390/ptrace: fix PSW mask check
score Score: Modify the Makefile of Score, remove -mlong-calls for compiling
sh sh: fix format string bug in stack tracer
sparc sparc64: Do not insert non-valid PTEs into the TSB hash table.
tile tile: remove compat_sys_lookup_dcookie declaration to fix compile error
um uml: check length in exitcode_proc_write()
unicore32 arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error
x86 x86/espfix/xen: Fix allocation of pages for paravirt page tables
xtensa xtensa: introduce spill_registers_kernel macro
.gitignore arch: Ignore arch/i386 and arch/x86_64
Kconfig microblaze: fix clone syscall