]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
s390/extable: fix exception table sorting
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 24 Feb 2022 21:03:29 +0000 (22:03 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 14:17:55 +0000 (15:17 +0100)
commitb211085d11eb92f4c21cf905bd979ce980fd95b6
treece4895ad9625b0131b8d8f519d70509639f3a076
parent78389d7c0bd12e4da05965308dd2bb5e60f2ef89
s390/extable: fix exception table sorting

BugLink: https://bugs.launchpad.net/bugs/1964361
commit c194dad21025dfd043210912653baab823bdff67 upstream.

s390 has a swap_ex_entry_fixup function, however it is not being used
since common code expects a swap_ex_entry_fixup define. If it is not
defined the default implementation will be used. So fix this by adding
a proper define.
However also the implementation of the function must be fixed, since a
NULL value for handler has a special meaning and must not be adjusted.

Luckily all of this doesn't fix a real bug currently: the main extable
is correctly sorted during build time, and for runtime sorting there
is currently no case where the handler field is not NULL.

Fixes: 05a68e892e89 ("s390/kernel: expand exception table logic to allow new handling options")
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/s390/include/asm/extable.h