linux-stable/drivers
Junhao He b660420f44 perf: hisi: Fix use-after-free when register pmu fails
[ Upstream commit b805cafc60 ]

When we fail to register the uncore pmu, the pmu context may not been
allocated. The error handing will call cpuhp_state_remove_instance()
to call uncore pmu offline callback, which migrate the pmu context.
Since that's liable to lead to some kind of use-after-free.

Use cpuhp_state_remove_instance_nocalls() instead of
cpuhp_state_remove_instance() so that the notifiers don't execute after
the PMU device has been failed to register.

Fixes: a0ab25cd82 ("drivers/perf: hisi: Add support for HiSilicon PA PMU driver")
FIxes: 3bf30882c3 ("drivers/perf: hisi: Add support for HiSilicon SLLC PMU driver")
Signed-off-by: Junhao He <hejunhao3@huawei.com>
Link: https://lore.kernel.org/r/20231024113630.13472-1-hejunhao3@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:01 +01:00
..
accessibility
acpi ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:51:55 +01:00
amba amba: bus: fix refcount leak 2023-09-13 09:42:56 +02:00
android binder: fix memory leak in binder_init() 2023-08-16 18:27:24 +02:00
ata scsi: sd: Introduce manage_shutdown device flag 2023-11-02 09:35:29 +01:00
atm
auxdisplay
base regmap: debugfs: Fix a erroneous check after snprintf() 2023-11-20 11:51:55 +01:00
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-10-10 22:00:37 +02:00
bluetooth Bluetooth: btusb: add shutdown function for QCA6174 2023-10-25 12:03:10 +02:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 14:56:48 +02:00
cdrom
char parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-06 14:56:51 +02:00
clk clk: qcom: config IPQ_APSS_6018 should depend on QCOM_SMEM 2023-11-20 11:51:57 +01:00
clocksource clocksource/drivers/arm_arch_timer: limit XGene-1 workaround 2023-11-20 11:52:01 +01:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:08:58 +02:00
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-13 09:43:04 +02:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-13 09:42:48 +02:00
crypto virtio-crypto: handle config changed by work queue 2023-11-02 09:35:23 +01:00
cxl
dax
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:51:54 +01:00
dio
dma dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe 2023-11-08 14:10:58 +01:00
dma-buf dma-buf: add dma_fence_timestamp helper 2023-10-19 23:08:57 +02:00
edac EDAC/igen6: Fix the issue of no error events 2023-09-13 09:42:45 +02:00
eisa
extcon extcon: cht_wc: add POWER_SUPPLY dependency 2023-09-13 09:42:53 +02:00
firewire scsi: sd: Introduce manage_shutdown device flag 2023-11-02 09:35:29 +01:00
firmware efi: fix memory leak in krealloc failure handling 2023-11-08 14:10:59 +01:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-13 09:42:54 +02:00
gnss
gpio gpio: vf610: mask the gpio irq in system suspend and support wakeup 2023-10-25 12:03:16 +02:00
gpu drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling 2023-11-20 11:52:01 +01:00
greybus
hid HID: input: map battery system charging 2023-10-25 12:03:14 +02:00
hsi
hte hte: tegra: Fix missing error code in tegra_hte_test_probe() 2023-11-20 11:51:58 +01:00
hv Drivers: hv: vmbus: Don't dereference ACPI root object handle 2023-09-13 09:42:59 +02:00
hwmon hwmon: (sch5627) Disallow write access if virtual registers are locked 2023-11-20 11:51:58 +01:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-09-19 12:28:05 +02:00
hwtracing coresight: tmc-etr: Disable warnings for allocation failures 2023-11-08 14:10:57 +01:00
i2c i2c: aspeed: Fix i2c bus hang in slave read 2023-11-02 09:35:30 +01:00
i3c i3c: master: svc: fix probe failure when no i3c device exist 2023-09-13 09:43:01 +02:00
idle intel_idle: add Emerald Rapids Xeon support 2023-10-10 22:00:44 +02:00
iio iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale 2023-11-02 09:35:30 +01:00
infiniband RDMA/cxgb4: Check skb value for failure to allocate 2023-10-19 23:08:49 +02:00
input Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport 2023-11-08 14:10:58 +01:00
interconnect interconnect: Teach lockdep about icc_bw_lock order 2023-09-23 11:11:13 +02:00
iommu iommu/mediatek: Fix share pgtable for iova over 4GB 2023-10-10 22:00:41 +02:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 14:10:57 +01:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:27:26 +02:00
leds leds: Drop BUG_ON check for LED_COLOR_ID_MULTI 2023-10-10 22:00:40 +02:00
macintosh
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-19 12:27:58 +02:00
mcb mcb-lpc: Reallocate memory region to avoid memory overlapping 2023-11-02 09:35:22 +01:00
md dm zoned: free dmz->ddev array in dmz_put_zoned_devices 2023-10-10 22:00:44 +02:00
media media: uvcvideo: Fix OOB read 2023-10-06 14:57:04 +02:00
memory
memstick
message
mfd
misc misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support 2023-11-08 14:11:05 +01:00
mmc mmc: core: Fix error propagation for some ioctl commands 2023-11-02 09:35:21 +01:00
most
mtd mtd: physmap-core: Restore map_rom fallback 2023-10-25 12:03:13 +02:00
mux
net ipvlan: properly track tx_errors 2023-11-20 11:51:55 +01:00
nfc
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-13 09:43:02 +02:00
nubus
nvdimm nvdimm: Fix dereference after free in register_nvdimm_pmu() 2023-09-13 09:42:47 +02:00
nvme nvme-rdma: do not try to stop unallocated queues 2023-10-25 12:03:14 +02:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-02 09:35:31 +01:00
of of: dynamic: Fix potential memory leak in of_changeset_action() 2023-10-10 22:00:44 +02:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-13 09:42:28 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 14:56:51 +02:00
parport
pci PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device 2023-11-08 14:11:03 +01:00
pcmcia pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-08-23 17:52:24 +02:00
peci
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:52:01 +01:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2023-10-25 12:03:16 +02:00
pinctrl pinctrl: qcom: lpass-lpi: fix concurrent register updates 2023-11-02 09:35:22 +01:00
platform platform/x86: wmi: Fix opening of char device 2023-11-20 11:51:57 +01:00
pnp
power power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint 2023-11-08 14:11:02 +01:00
powercap
pps
ps3
ptp ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 22:00:42 +02:00
pwm pwm: lpc32xx: Remove handling of PWM channels 2023-09-19 12:28:00 +02:00
rapidio
ras
regulator regulator: mt6358: Fail probe on unknown chip ID 2023-11-20 11:51:56 +01:00
remoteproc
reset
rpmsg rpmsg: glink: Add check for kstrdup 2023-09-13 09:42:58 +02:00
rtc rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff 2023-09-06 21:27:00 +01:00
s390 s390/cio: fix a memleak in css_alloc_subchannel 2023-10-25 12:03:15 +02:00
sbus
scsi scsi: mpt3sas: Fix in error path 2023-11-08 14:11:00 +01:00
sh
siox
slimbus
soc soc: imx8m: Enable OCOTP clock for imx8mm before reading registers 2023-10-06 14:56:49 +02:00
soundwire soundwire: fix enumeration completion 2023-08-03 10:24:15 +02:00
spi spi: nxp-fspi: use the correct ioremap function 2023-11-20 11:51:56 +01:00
spmi
ssb
staging media: rkvdec: increase max supported height for H.264 2023-09-13 09:42:50 +02:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 22:00:41 +02:00
tc
tee tee: amdtee: fix use-after-free vulnerability in amdtee_close_session 2023-10-19 23:08:57 +02:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:51:54 +01:00
thunderbolt thunderbolt: Restart XDomain discovery handshake after failure 2023-10-19 23:08:56 +02:00
tty tty: 8250: Add Brainboxes Oxford Semiconductor-based quirks 2023-11-08 14:11:05 +01:00
ufs scsi: ufs: core: Correct clear TM error log 2023-10-19 23:08:57 +02:00
uio
usb usb: raw-gadget: properly handle interrupted requests 2023-11-08 14:11:03 +01:00
vdpa vdpa: Enable strict validation for netlinks ops 2023-08-23 17:52:31 +02:00
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 14:56:45 +02:00
vhost vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE 2023-11-02 09:35:23 +01:00
video fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() 2023-11-08 14:11:00 +01:00
virt
virtio virtio_pci: fix the common cfg map size 2023-11-02 09:35:23 +01:00
vlynq
w1
watchdog watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load 2023-09-19 12:28:00 +02:00
xen xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-11-20 11:52:01 +01:00
zorro
Kconfig
Makefile