CVE-2026-99125: s390/pai: Handle multiple PMU stop callback invocations
In the Linux kernel, the following vulnerability has been resolved:
s390/pai: Handle multiple PMU stop callback invocations
Handle the following scenario: The kernel protects itself against a very high sampling load and throttles the sampling using:
perfeventthrottle() --> PMU->stop()
Shortly later the scheduler may terminate the task and removes it from the CPU. It again calls
PMU->stop()
which results in two invocations of PMU->stop() called back to back. Protect against this and check the PERFHESSTOPPED bit on function entry. If it is already set return. Clear bit PERFHESSTOPPED in PMU->start().
Prohibit ioctl(fd, PERFEVENTIOCPERIOD, ...) call for this event. It sets perfevent::eventlimit to a positive value and causes perfeventoverflow() to invoke paistop() call back function when perfevent::eventlimit hits zero. This is not supported because the sample events CRYPTOALL and NNPAALL are only taken at schedule out of a task.
Use listforeachentrysafe() for safe iteration over syswidelist in paihavesamples().