]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/mm: fix address space detection in exception handling
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Mon, 27 May 2019 16:40:19 +0000 (18:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:19:18 +0000 (12:19 +0200)
commitaffc4c420a2911a1c632df8a0286938b654bade4
treecc0eb11c7f08d8ac82b5b65b301fe4d34106f87b
parent18da05b04c87fc906596b30f6123cc2de7f1440b
s390/mm: fix address space detection in exception handling

commit 962f0af83c239c0aef05639631e871c874b00f99 upstream.

Commit 0aaba41b58bc ("s390: remove all code using the access register
mode") removed access register mode from the kernel, and also from the
address space detection logic. However, user space could still switch
to access register mode (trans_exc_code == 1), and exceptions in that
mode would not be correctly assigned.

Fix this by adding a check for trans_exc_code == 1 to get_fault_type(),
and remove the wrong comment line before that function.

Fixes: 0aaba41b58bc ("s390: remove all code using the access register mode")
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: <stable@vger.kernel.org> # v4.15+
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/mm/fault.c