linux/arch/s390
Nathan Chancellor d7dbe5f691 s390/cpum_cf: Fix uninitialized warning after backport of ce97123324
Upstream commit ce97123324 ("s390/cpum_cf: Deny all sampling events by
counter PMU"), backported to 6.6 as commit d660c8d814 ("s390/cpum_cf:
Deny all sampling events by counter PMU"), implicitly depends on the
unconditional initialization of err to -ENOENT added by upstream
commit aa1ac98268 ("s390/cpumf: Fix double free on error in
cpumf_pmu_event_init()"). The latter change is missing from 6.6,
resulting in an instance of -Wuninitialized, which is fairly obvious
from looking at the actual diff.

  arch/s390/kernel/perf_cpum_cf.c:858:10: warning: variable 'err' is uninitialized when used here [-Wuninitialized]
    858 |                 return err;
        |                        ^~~

Commit aa1ac98268 ("s390/cpumf: Fix double free on error in
cpumf_pmu_event_init()") depends on commit c70ca29803 ("perf/core:
Simplify the perf_event_alloc() error path"), which is a part of a much
larger series unsuitable for stable.

Extract the unconditional initialization of err to -ENOENT from
commit aa1ac98268 ("s390/cpumf: Fix double free on error in
cpumf_pmu_event_init()") and apply it to 6.6 as a standalone change to
resolve the warning.

Fixes: d660c8d814 ("s390/cpum_cf: Deny all sampling events by counter PMU")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-02 13:40:41 +02:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/boot: Remove alt_stfle_fac_list from decompressor 2024-06-12 11:03:44 +02:00
configs s390/configs: add kasan.config addon config file 2022-11-08 19:32:32 +01:00
crypto crypto: s390/aes - Fix buffer overread in CTR mode 2024-01-31 16:16:58 -08:00
hypfs s390/hypfs: Enable limited access during lockdown 2025-08-28 16:26:19 +02:00
include s390/time: Use monotonic clock in get_cycles() 2025-08-28 16:25:55 +02:00
kernel s390/cpum_cf: Fix uninitialized warning after backport of ce97123324 2025-10-02 13:40:41 +02:00
kvm KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY 2025-06-27 11:07:30 +01:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-04-06 12:10:55 +02:00
mm mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() 2025-08-28 16:26:11 +02:00
net s390/bpf: Store backchain even for leaf progs 2025-06-27 11:07:11 +01:00
pci s390/pci: Do not try re-enabling load/store if device is disabled 2025-07-10 15:59:43 +02:00
purgatory s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS 2025-02-21 13:49:28 +01:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390: always build relocatable kernel 2022-11-08 19:32:32 +01:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS 2025-02-21 13:49:28 +01:00