• Martin Schwidefsky's avatar
    s390/mm: fix BUG_ON in crst_table_upgrade · 8ab867cb
    Martin Schwidefsky authored
    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: 9b11c791 ("s390/mm: simplify arch_get_unmapped_area[_topdown]")
    Cc: <stable@vger.kernel.org>  # v4.12+
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    8ab867cb
mmap.c 5.53 KB