]> 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 01:02:30 +0000 (02:02 +0100)
commitd465c676cc596261be781775369cf12a7d86bd1f
treead5edb0d3386cdf883ec7452c3e680d66b7d7822
parent68a7c7fe322546be1464174c8d85874b8161deda
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