Bug 207095

Summary: [nvme] DMA-API: device driver tries to free DMA memory it has not allocated
Product: Drivers Reporter: Skylar (skylar)
Component: Flash/Memory Technology DevicesAssignee: David Woodhouse (dwmw2)
Status: RESOLVED INVALID    
Severity: normal    
Priority: P1    
Hardware: Other   
OS: Linux   
Kernel Version: 5.6.2 Subsystem:
Regression: No Bisected commit-id:

Description Skylar 2020-04-04 03:09:04 UTC
Just encountered this error running the latest kernel on RISCV.

[  413.938823] ------------[ cut here ]------------
[  413.938838] DMA-API: nvme 0000:05:00.0: device driver tries to free DMA memory it has not allocated [device address=0x00000000fc0bf000] [size=4096 bytes]
[  413.938881] WARNING: CPU: 0 PID: 220 at kernel/dma/debug.c:1010 check_unmap+0x4ee/0x5f8
[  413.938885] Modules linked in:
[  413.938896] CPU: 0 PID: 220 Comm: btrfs-transacti Not tainted 5.6.2 #1
[  413.938903] epc: ffffffe000093c32 ra : ffffffe000093c32 sp : ffffffe1f563b220
[  413.938909]  gp : ffffffe000a414b0 tp : ffffffe1f61dca00 t0 : ffffffe000a61fc0
[  413.938914]  t1 : 0000000000000001 t2 : 2065657266206f74 s0 : ffffffe1f563b270
[  413.938919]  s1 : 00000000fc0bf000 a0 : 000000000000008d a1 : 0000000000000000
[  413.938925]  a2 : 0000000000000001 a3 : 0000000000000000 a4 : ffffffe000ad4218
[  413.938931]  a5 : fffffffffffffff8 a6 : ffffffe000a51c78 a7 : 000000000000029a
[  413.938936]  s2 : ffffffe1f563b280 s3 : ffffffe000aa2bb8 s4 : 0000000200000022
[  413.938942]  s5 : ffffffe000a40e84 s6 : ffffffe000a41b78 s7 : 6db6db6db6db6db7
[  413.938948]  s8 : ffffffe000a42418 s9 : ffffffe1f563b280 s10: ffffffe1b7bbf000
[  413.938953]  s11: 0000000000000000 t3 : 0000000000000000 t4 : 6168207469207972
[  413.938957]  t5 : 6c6120746f6e2073 t6 : ffffffe000a61fbd
[  413.938963] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003
[  413.938967] ---[ end trace e6da251bf9c89f90 ]---
[  442.600678] nvme nvme0: controller is down; will reset: CSTS=0x3, PCI_STATUS=0x10
Comment 1 Skylar 2020-08-21 04:11:21 UTC
Resolved by change to the PCIe bus.