]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390: Initialize psw mask in perf_arch_fetch_caller_regs()
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 10 Oct 2024 15:52:39 +0000 (17:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:52:34 +0000 (01:52 +0100)
commit42d83e5fed3e1abbc657f68e20b7c8df5fbf546d
tree4bd5e61b2305d3b3bad6bd283e0819d9b2f3afe6
parent87474406056891e4fdea0794e1f632b21b3dfa27
s390: Initialize psw mask in perf_arch_fetch_caller_regs()

[ Upstream commit 223e7fb979fa06934f1595b6ad0ae1d4ead1147f ]

Also initialize regs->psw.mask in perf_arch_fetch_caller_regs().
This way user_mode(regs) will return false, like it should.

It looks like all current users initialize regs to zero, so that this
doesn't fix a bug currently. However it is better to not rely on callers
to do this.

Fixes: 914d52e46490 ("s390: implement perf_arch_fetch_caller_regs")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/include/asm/perf_event.h