1
0
Fork 0
alistair23-linux/arch/s390
Gerald Schaefer 31c5755caf s390/mm: fix panic in gup_fast on large pud
commit 582b4e5540 upstream.

On s390 there currently is no implementation of pud_write(). That was ok
as long as we had our own implementation of get_user_pages_fast() which
checked for pud protection by testing the bit directly w/o using
pud_write(). The other callers of pud_write() are not reachable on s390.

After commit 1a42010cdc ("s390/mm: convert to the generic
get_user_pages_fast code") we use the generic get_user_pages_fast(), which
does call pud_write() in pud_access_permitted() for FOLL_WRITE access on
a large pud. Without an s390 specific pud_write(), the generic version is
called, which contains a BUG() statement to remind us that we don't have a
proper implementation. This results in a kernel panic.

Fix this by providing an implementation of pud_write().

Cc: <stable@vger.kernel.org> # 5.2+
Fixes: 1a42010cdc ("s390/mm: convert to the generic get_user_pages_fast code")
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:22 +01:00
..
appldata proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
boot s390: make 'install' not depend on vmlinux 2020-03-12 13:00:13 +01:00
configs s390: update defconfigs 2019-10-04 16:37:33 +02:00
crypto s390/crypto: Fix unsigned variable compared with zero 2019-12-31 16:45:41 +01:00
hypfs Merge branch 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-09-24 12:33:34 -07:00
include s390/mm: fix panic in gup_fast on large pud 2020-03-12 13:00:22 +01:00
kernel s390/ftrace: generate traced function stack frame 2020-02-24 08:36:55 +01:00
kvm KVM: s390: ENOTSUPP -> EOPNOTSUPP fixups 2020-02-24 08:36:31 +01:00
lib s390 updates for the 5.4 merge window 2019-09-17 14:04:43 -07:00
mm s390/mm: fix dynamic pagetable upgrade for hugetlbfs 2020-02-11 04:35:17 -08:00
net s390/bpf: Use kvcalloc for addrs array 2019-12-31 16:45:06 +01:00
numa s390/numa: correct early_param handling 2019-08-26 12:51:17 +02:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: Fix unexpected write combine on resource 2020-03-12 13:00:22 +01:00
purgatory s390/purgatory: do not build purgatory with kcov, kasan and friends 2020-01-12 12:21:40 +01:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools s390: add support for IBM z15 machines 2019-09-13 12:19:14 +02:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-03-12 13:00:13 +01:00