s390/ftrace: verify opcode before applying patch
authorSven Schnelle <svens@linux.ibm.com>
Sun, 23 Jan 2022 19:20:09 +0000 (20:20 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sun, 6 Feb 2022 22:31:29 +0000 (23:31 +0100)
commit98c0d24d1e7576a853b0812d95e599ba1a909e21
tree5a74a240467e3e89ecba483f2b0cff5c813ac29e
parentf36e7c9845d998d1e4100b46cec9c678bff69a24
s390/ftrace: verify opcode before applying patch

commit 72b3942a173c ("scripts: ftrace - move the
sort-processing in ftrace_init") had the unexpected
side effect that wrong code locations were patched.
To prevent this from happening again, verify the
opcode before patching it.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/ftrace.c