]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/pai: fix sampling event removal for PMU device driver
authorThomas Richter <tmricht@linux.ibm.com>
Thu, 29 Feb 2024 14:00:28 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:13 +0000 (16:38 +0200)
commit47b6af87610a7ba013ee8b0573ddafaf7ad3a7d3
treef547a4b617351010ec26cde95765f6a4ef0ecc09
parent95e5d9eb26705a9a76d2ef8bcba9ee2e195d653d
s390/pai: fix sampling event removal for PMU device driver

[ Upstream commit e9f3af02f63909f41b43c28330434cc437639c5c ]

In case of a sampling event, the PAI PMU device drivers need a
reference to this event.  Currently to PMU device driver reference
is removed when a sampling event is destroyed. This may lead to
situations where the reference of the PMU device driver is removed
while being used by a different sampling event.
Reset the event reference pointer of the PMU device driver when
a sampling event is deleted and before the next one might be added.

Fixes: 39d62336f5c1 ("s390/pai: add support for cryptography counters")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/perf_pai_crypto.c
arch/s390/kernel/perf_pai_ext.c