]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mm: fix BUG_ON in crst_table_upgrade
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 31 Aug 2017 11:18:22 +0000 (13:18 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 31 Aug 2017 12:03:21 +0000 (14:03 +0200)
commit98b05125b7e75ac804005205af5aa71a3b67672c
tree1181aefbc32ee92ad98c96f457581311f3229a3f
parent6b5ba42b6ac6dd611a200e656b827386b7165829
s390/mm: fix BUG_ON in crst_table_upgrade

A 31-bit compat process can force a BUG_ON in crst_table_upgrade
with specific, invalid mmap calls, e.g.

   mmap((void*) 0x7fff8000, 0x10000, 3, 32, -1, 0)

The arch_get_unmapped_area[_topdown] functions miss an if condition
in the decision to do a page table upgrade.

Fixes: 302e638f3edb ("s390/mm: simplify arch_get_unmapped_area[_topdown]")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/mmap.c