Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:
"arm64 and arm/perf fixes:

- arm64 fix: debug exception unmasking on the CPU resume path

- ARM PMU fixes: memory leak on error path and NULL pointer
dereference"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: kernel: Fix unmasked debug exceptions when restoring mdscr_el1
drivers/perf: arm_pmu: Fix NULL pointer dereference during probe
drivers/perf: arm_pmu: Fix leak in error path

Changed files
+11 -1
arch
arm64
mm
drivers
perf
+9
arch/arm64/mm/proc.S
··· 100 100 101 101 msr tcr_el1, x8 102 102 msr vbar_el1, x9 103 + 104 + /* 105 + * __cpu_setup() cleared MDSCR_EL1.MDE and friends, before unmasking 106 + * debug exceptions. By restoring MDSCR_EL1 here, we may take a debug 107 + * exception. Mask them until local_dbg_restore() in cpu_suspend() 108 + * resets them. 109 + */ 110 + disable_dbg 103 111 msr mdscr_el1, x10 112 + 104 113 msr sctlr_el1, x12 105 114 /* 106 115 * Restore oslsr_el1 by writing oslar_el1
+2 -1
drivers/perf/arm_pmu.c
··· 925 925 if (i > 0 && spi != using_spi) { 926 926 pr_err("PPI/SPI IRQ type mismatch for %s!\n", 927 927 dn->name); 928 + of_node_put(dn); 928 929 kfree(irqs); 929 930 return -EINVAL; 930 931 } ··· 970 969 if (cpumask_weight(&pmu->supported_cpus) == 0) { 971 970 int irq = platform_get_irq(pdev, 0); 972 971 973 - if (irq_is_percpu(irq)) { 972 + if (irq >= 0 && irq_is_percpu(irq)) { 974 973 /* If using PPIs, check the affinity of the partition */ 975 974 int ret; 976 975