]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mm: fix off-by-one bug in 5-level page table handling
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 4 Dec 2017 08:42:45 +0000 (09:42 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 5 Dec 2017 06:51:09 +0000 (07:51 +0100)
commitefed467f7377447d651bd1d99aaec553c0837f14
tree862fa632c344913bf8c08cf596fba3b08f1b8736
parentbdab03745d211d5eb9f0ee9e07cfdf64da335748
s390/mm: fix off-by-one bug in 5-level page table handling

Martin Cermak reported that setting a uprobe doesn't work. Reason for
this is that the common uprobes code tries to get an unmapped area at
the last possible page within an address space.

This broke with commit e2c400c458d5 ("s390/mm: implement 5 level pages
tables") which introduced an off-by-one bug which prevents to map
anything at the last possible page within an address space.

The check with the off-by-one bug however can be removed since with
commit 3e2aca6231ad ("s390/mm: fix BUG_ON in crst_table_upgrade") the
necessary check is done at both call sites.

Reported-by: Martin Cermak <mcermak@redhat.com>
Bisected-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Fixes: e2c400c458d5 ("s390/mm: implement 5 level pages tables")
Cc: <stable@vger.kernel.org> # v4.13+
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgalloc.c