acrn-kernel/drivers
Jonathan McDowell 4d9d2fd867 crypto: safexcel - Cleanup ring IRQ workqueues on load failure
commit ca25c00ccb upstream.

A failure loading the safexcel driver results in the following warning
on boot, because the IRQ affinity has not been correctly cleaned up.
Ensure we clean up the affinity and workqueues on a failure to load the
driver.

crypto-safexcel: probe of f2800000.crypto failed with error -2
------------[ cut here ]------------
WARNING: CPU: 1 PID: 232 at kernel/irq/manage.c:1913 free_irq+0x300/0x340
Modules linked in: hwmon mdio_i2c crypto_safexcel(+) md5 sha256_generic libsha256 authenc libdes omap_rng rng_core nft_masq nft_nat nft_chain_nat nf_nat nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables libcrc32c nfnetlink fuse autofs4
CPU: 1 PID: 232 Comm: systemd-udevd Tainted: G        W          6.1.6-00002-g9d4898824677 #3
Hardware name: MikroTik RB5009 (DT)
pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : free_irq+0x300/0x340
lr : free_irq+0x2e0/0x340
sp : ffff800008fa3890
x29: ffff800008fa3890 x28: 0000000000000000 x27: 0000000000000000
x26: ffff8000008e6dc0 x25: ffff000009034cac x24: ffff000009034d50
x23: 0000000000000000 x22: 000000000000004a x21: ffff0000093e0d80
x20: ffff000009034c00 x19: ffff00000615fc00 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 000075f5c1584c5e
x14: 0000000000000017 x13: 0000000000000000 x12: 0000000000000040
x11: ffff000000579b60 x10: ffff000000579b62 x9 : ffff800008bbe370
x8 : ffff000000579dd0 x7 : 0000000000000000 x6 : ffff000000579e18
x5 : ffff000000579da8 x4 : ffff800008ca0000 x3 : ffff800008ca0188
x2 : 0000000013033204 x1 : ffff000009034c00 x0 : ffff8000087eadf0
Call trace:
 free_irq+0x300/0x340
 devm_irq_release+0x14/0x20
 devres_release_all+0xa0/0x100
 device_unbind_cleanup+0x14/0x60
 really_probe+0x198/0x2d4
 __driver_probe_device+0x74/0xdc
 driver_probe_device+0x3c/0x110
 __driver_attach+0x8c/0x190
 bus_for_each_dev+0x6c/0xc0
 driver_attach+0x20/0x30
 bus_add_driver+0x148/0x1fc
 driver_register+0x74/0x120
 __platform_driver_register+0x24/0x30
 safexcel_init+0x48/0x1000 [crypto_safexcel]
 do_one_initcall+0x4c/0x1b0
 do_init_module+0x44/0x1cc
 load_module+0x1724/0x1be4
 __do_sys_finit_module+0xbc/0x110
 __arm64_sys_finit_module+0x1c/0x24
 invoke_syscall+0x44/0x110
 el0_svc_common.constprop.0+0xc0/0xe0
 do_el0_svc+0x20/0x80
 el0_svc+0x14/0x4c
 el0t_64_sync_handler+0xb0/0xb4
 el0t_64_sync+0x148/0x14c
---[ end trace 0000000000000000 ]---

Fixes: 1b44c5a60c ("inside-secure - add SafeXcel EIP197 crypto engine driver")
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:02 +09:00
..
accessibility
acpi ACPI: resource: Add Medion S17413 to IRQ override quirk 2023-04-20 12:35:12 +02:00
amba
android
ata ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" 2023-03-10 09:32:32 +01:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-03-30 12:49:09 +02:00
auxdisplay auxdisplay: hd44780: Fix potential memory leak in hd44780_remove() 2023-03-11 13:55:16 +01:00
base tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem 2023-05-11 23:03:01 +09:00
bcma
block block: ublk_drv: mark device as LIVE before adding disk 2023-04-20 12:35:11 +02:00
bluetooth bluetooth: btbcm: Fix logic error in forming the board name. 2023-04-20 12:35:06 +02:00
bus bus: imx-weim: fix branch condition evaluates to a garbage value 2023-03-30 12:49:29 +02:00
cdrom
char ipmi: fix SSIF not responding under certain cond. 2023-05-11 23:03:01 +09:00
clk clk: rs9: Fix suspend/resume 2023-04-20 12:35:08 +02:00
clocksource clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use 2023-03-10 09:33:03 +01:00
comedi
connector
counter counter: 104-quad-8: Fix Synapse action reported for Index signals 2023-04-13 16:55:31 +02:00
cpufreq cpufreq: davinci: Fix clk use after free 2023-03-10 09:33:01 +01:00
cpuidle cpuidle: psci: Iterate backwards over list in psci_pd_remove() 2023-03-22 13:34:04 +01:00
crypto crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-05-11 23:03:02 +09:00
cxl cxl/pci: Handle excessive CDAT length 2023-04-13 16:55:25 +02:00
dax dax/kmem: Fix leak of memory-hotplug resources 2023-03-10 09:34:25 +01:00
dca
devfreq
dio
dma dmaengine: apple-admac: Fix 'current_tx' not getting freed 2023-04-20 12:35:08 +02:00
dma-buf dma-buf: actually set signaling bit for private stub fences 2023-02-09 11:28:23 +01:00
edac EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info 2023-02-01 08:34:40 +01:00
eisa
extcon
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-09 11:27:59 +01:00
firmware efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L 2023-04-20 12:35:11 +02:00
fpga fpga: bridge: properly initialize bridge device before populating children 2023-04-26 14:28:43 +02:00
fsi use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
gnss
gpio gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU 2023-05-01 08:26:27 +09:00
gpu drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var 2023-05-01 08:26:27 +09:00
greybus
hid HID: intel-ish-hid: Fix kernel panic during warm reset 2023-04-20 12:35:13 +02:00
hsi
hte
hv Drivers: vmbus: Check for channel allocation before looking up relids 2023-04-13 16:55:18 +02:00
hwmon hwmon: (adt7475) Use device_property APIs when configuring polarity 2023-05-11 23:03:00 +09:00
hwspinlock
hwtracing coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug 2023-04-13 16:55:30 +02:00
i2c i2c: ocores: generate stop condition after timeout in polling mode 2023-04-20 12:35:14 +02:00
i3c
idle Revert "cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again*" 2023-04-06 12:10:58 +02:00
iio iio: addac: stx104: Fix race condition for stx104_write_raw() 2023-05-11 23:03:01 +09:00
infiniband RDMA/core: Fix GID entry ref leak when create_ah fails 2023-04-20 12:35:10 +02:00
input Input: pegasus-notetaker - check pipe type when probing 2023-04-26 14:28:43 +02:00
interconnect interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT 2023-03-30 12:48:59 +02:00
iommu iommu/vt-d: Allow zero SAGAW if second-stage not supported 2023-04-06 12:10:49 +02:00
ipack
irqchip irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts 2023-03-10 09:33:07 +01:00
isdn use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
leds pwm: Make .get_state() callback return an error code 2023-04-13 16:55:18 +02:00
macintosh macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:50:31 +01:00
mailbox
mcb
md blk-crypto: make blk_crypto_evict_key() return void 2023-05-11 23:03:00 +09:00
media media: ov8856: Do not check for for module version 2023-05-11 23:03:00 +09:00
memory memory: tegra30-emc: fix interconnect registration race 2023-03-22 13:33:56 +01:00
memstick memstick: fix memory leak if card device is never registered 2023-04-26 14:28:39 +02:00
message
mfd mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak 2023-03-11 13:55:32 +01:00
misc misc: vmw_balloon: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:39 +01:00
mmc mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25 2023-04-26 14:28:40 +02:00
most
mtd mtd: spi-nor: fix memory leak when using debugfs_lookup() 2023-04-26 14:28:37 +02:00
mux
net wifi: mt76: add missing locking to protect against concurrent rx/status calls 2023-05-11 23:03:02 +09:00
nfc nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:33:46 +01:00
ntb
nubus
nvdimm cxl/pmem: Fix nvdimm registration races 2023-03-10 09:34:20 +01:00
nvme nvme-tcp: fix a possible UAF when failing to allocate an io queue 2023-04-26 14:28:37 +02:00
nvmem nvmem: core: fix return value 2023-02-09 11:28:25 +01:00
of of: reserved_mem: Have kmemleak ignore dynamically allocated reserved mem 2023-02-22 12:59:46 +01:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-03-10 09:33:01 +01:00
parisc
parport
pci PCI: qcom: Fix the incorrect register usage in v2.7.0 config 2023-05-11 23:02:59 +09:00
pcmcia
peci
perf Partially revert "perf/arm-cmn: Optimise DTC counter accesses" 2023-02-01 08:34:49 +01:00
phy phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes 2023-05-11 23:02:59 +09:00
pinctrl pinctrl: qcom: lpass-lpi: set output value before enabling output 2023-05-11 23:03:02 +09:00
platform platform/x86: thinkpad_acpi: Add missing T14s Gen1 type to s2idle quirk list 2023-05-11 23:02:58 +09:00
pnp
power power: supply: axp288_fuel_gauge: Added check for negative values 2023-04-20 12:35:10 +02:00
powercap powercap: fix possible name leak in powercap_register_zone() 2023-03-10 09:32:56 +01:00
pps
ps3
ptp ptp_qoriq: fix memory leak in probe() 2023-04-06 12:10:44 +02:00
pwm pwm: meson: Fix g12a ao clk81 name 2023-05-11 23:03:02 +09:00
rapidio
ras
regulator regulator: fan53555: Fix wrong TCS_SLEW_MASK 2023-04-26 14:28:32 +02:00
remoteproc remoteproc/mtk_scp: Move clk ops outside send_lock 2023-03-10 09:34:26 +01:00
reset reset: uniphier-glue: Fix possible null-ptr-deref 2023-02-01 08:34:05 +01:00
rpmsg rpmsg: glink: Release driver_override 2023-03-10 09:33:45 +01:00
rtc rtc: allow rtc_read_alarm without read_alarm callback 2023-03-11 13:55:30 +01:00
s390 s390/vfio-ap: fix memory leak in vfio_ap device driver 2023-04-06 12:10:46 +02:00
sbus
scsi scsi: mpi3mr: Handle soft reset in progress fault code (0xF002) 2023-05-11 23:02:58 +09:00
sh
siox
slimbus
soc soc: qcom: llcc: Fix slice configuration values for SC8280XP 2023-03-30 12:49:29 +02:00
soundwire soundwire: qcom: correct setting ignore bit on v1.5.1 2023-05-11 23:03:02 +09:00
spi spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe() 2023-04-26 14:28:34 +02:00
spmi
ssb
staging staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:03:01 +09:00
target scsi: target: iscsi: Fix an error message in iscsi_check_key() 2023-03-30 12:49:17 +02:00
tc
tee tee: amdtee: fix race condition in amdtee_open_session 2023-03-30 12:49:29 +02:00
thermal thermal: intel: BXT_PMIC: select REGMAP instead of depending on it 2023-03-11 13:55:32 +01:00
thunderbolt thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers 2023-04-06 12:10:33 +02:00
tty serial: max310x: fix IO data corruption in batched operations 2023-05-11 23:03:01 +09:00
ufs scsi: ufs: core: Add soft dependency on governor_simpleondemand 2023-03-30 12:49:17 +02:00
uio
usb xhci: fix debugfs register accesses while suspended 2023-05-11 23:03:01 +09:00
vdpa vp_vdpa: fix the crash in hot unplug with vp_vdpa 2023-03-22 13:34:03 +01:00
vfio vfio/type1: restore locked_vm 2023-03-10 09:34:32 +01:00
vhost vhost-vdpa: free iommu domain after last use during cleanup 2023-03-22 13:33:44 +01:00
video fbcon: set_con2fb_map needs to set con2fb_map! 2023-04-20 12:35:07 +02:00
virt virt/coco/sev-guest: Add throttling awareness 2023-03-22 13:34:06 +01:00
virtio
vlynq
w1 w1: fix WARNING after calling w1_process() 2023-02-01 08:34:26 +01:00
watchdog watchdog: sbsa_wdog: Make sure the timeout programming is within the limits 2023-03-11 13:55:24 +01:00
xen xen/grant-dma-iommu: Implement a dummy probe_device() callback 2023-03-10 09:33:02 +01:00
zorro
Kconfig
Makefile