__dma_async_device_channel_unregister called while 2 clients hold a reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Brijesh Singh and Tom Lendacky,

I recently noticed a kernel trace when shutting my PC down. The trace is only visible for a split second so I took a slow motion recording of it. The best frame of that video is attached to this mail. The call trace is:

<TASK>
dma_async_device_unregister
ccp_dmaengine_unregister
ccp5_destroy
sp_destroy
pci_device_shutdown
kernel_power_off
__do_sys_reboot
do_syscall
? do_syscall_64
? __s64_sys_rt_sigprocmask
entry_SYSCALL_64_after_hwframe

The warning originates from the linux dma driver [1]. Since the call trace incorporates functions of the CCP module, I suspect that this issue is either related to the CCP module or caused by it, which is why I'm writing you this mail. Furthermore the issue seems to be related to RAID on linux, as the trace only appears when activating my Windows LDM software RAID using ldmtool [2] . I also reported the issue there [3]. Vince (see CC of this mail) has the same kernel trace on shutdown when using his SAS/SATA controller [4] with the kernel driver mpt3sas. With the kernel parameter ccp.dmaengine=0 the trace doesn't appear on shutdown.

I'm running Arch Linux on a Gigabyte X570 Aorus Elite with an AMD Ryzen 2700X, Vince has this issue on Debian with an Asus Prime TRX40-PRO S and an AMD Ryzen Threadripper 3990x. Affected kernel versions include 5.10, 5.15, 5.16 and 5.17-rc3. 4.19 doesn't seem to be affected, maybe because dma_async_device_channel_unregister was only added in recent kernel versions [5]. I initially reported this issue to the Arch Linux bugtracker, where Vince confirmed my issue [6].

Since I'm not sure whether this is an issue with the CCP module or not I hope that you can help me there. If it's not an issue of the CCP module the issue I hope that you can give me some pointers to what's probably causing this issue. Since the following modules are loaded on RAID activation for me, the issue may reside in any of them:

raid1
dm_raid
raid456
md_mod
async_raid6_recov
async_memcpy
async_pq
async_xor
async_tx
xor
raid6_pq

Best Regards,
Leon Möller

[1] https://elixir.bootlin.com/linux/v5.17-rc3/source/drivers/dma/dmaengine.c#L1106
[2] https://github.com/mdbooth/libldm
[3] https://github.com/mdbooth/libldm/issues/21
[4] https://www.intel.com/content/www/us/en/products/sku/97264/intel-raid-controller-rs3uc080j/specifications.html
[5] https://lkml.org/lkml/2020/1/21/1093
[6] https://bugs.archlinux.org/task/73504

Attachment: kernel_trace.jpg
Description: JPEG image


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux