android_kernel_samsung_sm8650/drivers
Koba Ko dcdd2198bb crypto: ccp - Failure on re-initialization due to duplicate sysfs filename
[ Upstream commit 299bf602b3f92f1456aef59c6413591fb02e762a ]

The following warning appears during the CCP module re-initialization:

[  140.965403] sysfs: cannot create duplicate filename
'/devices/pci0000:00/0000:00:07.1/0000:03:00.2/dma/dma0chan0'
[  140.975736] CPU: 0 PID: 388 Comm: kworker/0:2 Kdump: loaded Not
tainted 6.2.0-0.rc2.18.eln124.x86_64 #1
[  140.985185] Hardware name: HPE ProLiant DL325 Gen10/ProLiant DL325
Gen10, BIOS A41 07/17/2020
[  140.993761] Workqueue: events work_for_cpu_fn
[  140.998151] Call Trace:
[  141.000613]  <TASK>
[  141.002726]  dump_stack_lvl+0x33/0x46
[  141.006415]  sysfs_warn_dup.cold+0x17/0x23
[  141.010542]  sysfs_create_dir_ns+0xba/0xd0
[  141.014670]  kobject_add_internal+0xba/0x260
[  141.018970]  kobject_add+0x81/0xb0
[  141.022395]  device_add+0xdc/0x7e0
[  141.025822]  ? complete_all+0x20/0x90
[  141.029510]  __dma_async_device_channel_register+0xc9/0x130
[  141.035119]  dma_async_device_register+0x19e/0x3b0
[  141.039943]  ccp_dmaengine_register+0x334/0x3f0 [ccp]
[  141.045042]  ccp5_init+0x662/0x6a0 [ccp]
[  141.049000]  ? devm_kmalloc+0x40/0xd0
[  141.052688]  ccp_dev_init+0xbb/0xf0 [ccp]
[  141.056732]  ? __pci_set_master+0x56/0xd0
[  141.060768]  sp_init+0x70/0x90 [ccp]
[  141.064377]  sp_pci_probe+0x186/0x1b0 [ccp]
[  141.068596]  local_pci_probe+0x41/0x80
[  141.072374]  work_for_cpu_fn+0x16/0x20
[  141.076145]  process_one_work+0x1c8/0x380
[  141.080181]  worker_thread+0x1ab/0x380
[  141.083953]  ? __pfx_worker_thread+0x10/0x10
[  141.088250]  kthread+0xda/0x100
[  141.091413]  ? __pfx_kthread+0x10/0x10
[  141.095185]  ret_from_fork+0x2c/0x50
[  141.098788]  </TASK>
[  141.100996] kobject_add_internal failed for dma0chan0 with -EEXIST,
don't try to register things with the same name in the same directory.
[  141.113703] ccp 0000:03:00.2: ccp initialization failed

The /dma/dma0chan0 sysfs file is not removed since dma_chan object
has been released in ccp_dma_release() before releasing dma device.
A correct procedure would be: release dma channels first => unregister
dma device => release ccp dma object.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216888
Fixes: 68dbe80f5b ("crypto: ccp - Release dma channels before dmaengine unrgister")
Tested-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Koba Ko <koba.ko@canonical.com>
Reviewed-by: Vladis Dronov <vdronov@redhat.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:32:56 +01:00
..
accessibility tty: fix possible null-ptr-defer in spk_ttyio_release 2023-01-24 07:24:37 +01:00
acpi ACPI: battery: Fix missing NUL-termination with large strings 2023-03-10 09:32:56 +01:00
amba
android binder: validate alloc->mm in ->mmap() handler 2022-11-09 15:41:27 +01:00
ata ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" 2023-03-10 09:32:32 +01:00
atm
auxdisplay
base driver core: Fix test_async_probe_init saves device in wrong array 2023-02-01 08:34:26 +01:00
bcma
block block: ublk: check IO buffer based on flag need_get_data 2023-03-10 09:32:46 +01:00
bluetooth Bluetooth: btusb: Add more device IDs for WCN6855 2023-02-25 11:25:41 +01:00
bus bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() 2023-02-09 11:27:59 +01:00
cdrom
char use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
clk clk: mxl: syscon_node_to_regmap() returns error pointers 2023-02-25 11:25:39 +01:00
clocksource clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() 2022-12-31 13:31:59 +01:00
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-01-24 07:24:35 +01:00
connector
counter counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-12-31 13:32:41 +01:00
cpufreq cpufreq: qcom-hw: Fix cpufreq_driver->get() for non-LMH systems 2023-02-14 19:11:44 +01:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2022-12-31 13:31:55 +01:00
crypto crypto: ccp - Failure on re-initialization due to duplicate sysfs filename 2023-03-10 09:32:56 +01:00
cxl cxl/region: Fix passthrough-decoder detection 2023-02-14 19:11:52 +01:00
dax device-dax: Fix duplicate 'hmem' device registration 2022-11-21 15:34:40 -08:00
dca
devfreq PM/devfreq: governor: Add a private governor_data for governor 2023-01-07 11:11:40 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-12-31 13:32:38 +01:00
dma dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init 2023-02-06 08:06:33 +01: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 extcon: usbc-tusb320: Update state on probe even if no IRQ pending 2022-12-31 13:32:39 +01:00
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 arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines 2023-02-14 19:11:54 +01:00
fpga fpga: stratix10-soc: Fix return value check in s10_ops_write_init() 2023-02-09 11:28:22 +01:00
fsi use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
gnss
gpio gpio: sim: fix a memory leak 2023-02-22 12:59:50 +01:00
gpu drm/amd/display: Properly reuse completion structure 2023-03-03 11:52:24 +01:00
greybus
hid HID: asus: use spinlock to safely schedule workers 2023-03-10 09:32:32 +01:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2022-12-31 13:32:45 +01:00
hte
hv HV: hv_balloon: fix memory leak with using debugfs_lookup() 2023-02-09 11:28:21 +01:00
hwmon hwmon: (jc42) Fix missing unlock on error in jc42_write() 2022-12-31 13:33:06 +01:00
hwspinlock
hwtracing coresight: cti: Fix null pointer error on CTI init before ETM 2022-12-31 13:32:41 +01:00
i2c i2c: rk3x: fix a bunch of kernel-doc warnings 2023-02-09 11:28:13 +01:00
i3c
idle cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again* 2023-03-10 09:32:36 +01:00
iio iio:adc:twl6030: Enable measurement of VAC 2023-02-09 11:28:26 +01:00
infiniband IB/hfi1: Assign npages earlier 2023-03-03 11:52:21 +01:00
input Input: i8042 - add Clevo PCX0DX to i8042 quirk table 2023-02-01 08:34:50 +01:00
interconnect interconnect: qcom: msm8996: Fix regmap max_register values 2023-02-01 08:34:06 +01:00
iommu iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY even betterer 2023-01-18 11:58:21 +01:00
ipack
irqchip irqchip/loongson-liointc: Fix improper error handling in liointc_init() 2022-12-31 13:31:57 +01:00
isdn use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
leds leds: is31fl319x: Fix setting current limit for is31fl319{0,1,3} 2022-12-31 13:32:45 +01:00
macintosh macintosh/macio-adb: check the return value of ioremap() 2022-12-31 13:32:50 +01:00
mailbox mailbox: zynq-ipi: fix error handling while device_register() fails 2022-12-31 13:32:55 +01:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2022-12-31 13:32:41 +01:00
md bcache: Silence memcpy() run-time false positive warnings 2023-02-09 11:28:14 +01:00
media media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line 2023-02-09 11:28:01 +01:00
memory memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() 2023-02-01 08:34:02 +01:00
memstick memstick/ms_block: Add check for alloc_ordered_workqueue 2022-12-31 13:32:25 +01:00
message
mfd mfd: mt6360: Add bounds checking in Regmap read/write call-backs 2023-01-04 11:29:01 +01:00
misc use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
mmc mmc: mmc_spi: fix error handling in mmc_spi_probe() 2023-02-22 12:59:48 +01:00
most
mtd mtd: cfi: allow building spi-intel standalone 2023-01-18 11:58:24 +01:00
mux
net wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup 2023-03-10 09:32:55 +01:00
nfc nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() 2023-01-18 11:58:26 +01:00
ntb
nubus
nvdimm nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-02-14 19:11:53 +01:00
nvme nvme-pci: refresh visible attrs for cmb attributes 2023-02-22 12:59:56 +01: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
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-07 11:11:55 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-09 15:40:32 +01:00
pci Revert "PCI/ASPM: Refactor L1 PM Substates Control Register programming" 2023-02-14 19:11:42 +01: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-combo: fix runtime suspend 2023-02-09 11:28:25 +01:00
pinctrl pinctrl: amd: Fix debug output for debounce time 2023-03-03 11:52:21 +01:00
platform platform/chrome: cros_ec_typec: Update port DP VDO 2023-03-10 09:32:52 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2022-12-31 13:31:56 +01:00
power power: supply: fix null pointer dereferencing in power_supply_get_battery_info 2022-12-31 13:32:45 +01:00
powercap
pps
ps3
ptp
pwm pwm: tegra: Fix 32 bit build 2022-12-31 13:33:12 +01:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2022-12-31 13:32:00 +01:00
ras
regulator regulator: da9211: Use irq handler when ready 2023-01-18 11:58:22 +01:00
remoteproc remoteproc: imx_rproc: Correct i.MX93 DRAM mapping 2023-01-07 11:11:55 +01:00
reset reset: uniphier-glue: Fix possible null-ptr-deref 2023-02-01 08:34:05 +01:00
rpmsg
rtc rtc: efi: Enable SET/GET WAKEUP services as optional 2023-02-09 11:28:17 +01:00
s390 s390/vfio-ap: fix an error handling path in vfio_ap_mdev_probe_queue() 2023-03-10 09:32:53 +01:00
sbus
scsi scsi: hisi_sas: Fix SATA devices missing issue during I_T nexus reset 2023-02-25 11:25:39 +01:00
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-09 15:40:14 +01:00
slimbus slimbus: qcom-ngd: Fix build error when CONFIG_SLIM_QCOM_NGD_CTRL=y && CONFIG_QCOM_RPROC_COMMON=m 2022-11-10 18:45:40 +01:00
soc PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() 2023-02-01 08:34:08 +01:00
soundwire soundwire: dmi-quirks: add quirk variant for LAPBC710 NUC15 2023-01-04 11:28:56 +01:00
spi spi: mediatek: Enable irq before the spi registration 2023-02-25 11:25:40 +01:00
spmi
ssb
staging staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:24:35 +01:00
target scsi: target: core: Fix warning on RT kernels 2023-02-09 11:28:12 +01:00
tc
tee tee: optee: fix possible memory leak in optee_register_device() 2022-11-17 09:22:12 +01:00
thermal thermal/drivers/imx_sc_thermal: Fix the loop condition 2023-03-10 09:32:55 +01:00
thunderbolt thunderbolt: Do not call PM runtime functions in tb_retimer_scan() 2023-01-24 07:24:37 +01:00
tty vc_screen: don't clobber return value in vcs_read 2023-03-03 11:52:23 +01:00
ufs scsi: ufs: core: Fix devfreq deadlocks 2023-02-01 08:34:39 +01:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2022-12-31 13:32:38 +01:00
usb USB: core: Don't hold device lock while reading the "descriptors" sysfs file 2023-03-03 11:52:25 +01:00
vdpa vdpa: ifcvf: Do proper cleanup if IFCVF init fails 2023-02-22 12:59:42 +01:00
vfio vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp() 2023-02-01 08:34:36 +01:00
vhost vhost-scsi: unbreak any layout for response 2023-02-09 11:28:04 +01:00
video fbdev: Fix invalid page access after closing deferred I/O devices 2023-02-22 12:59:46 +01:00
virt virt/sev-guest: Add a MODULE_ALIAS 2022-12-31 13:32:09 +01:00
virtio virtio_pci: modify ENOENT to EINVAL 2023-01-24 07:24:31 +01:00
vlynq
w1 w1: fix WARNING after calling w1_process() 2023-02-01 08:34:26 +01:00
watchdog watchdog: diag288_wdt: fix __diag288() inline assembly 2023-02-09 11:28:16 +01:00
xen use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
zorro
Kconfig
Makefile