AnsweredAssumed Answered

LS1-DMA-API: device driver tries to free DMA memory it has not allocated

Question asked by Nitesh Narayan Lal Employee on Sep 3, 2014
Latest reply on Sep 14, 2014 by alexander.yakovlev

caam 1700000.crypto: Instantiated RNG4 SH0

caam 1700000.crypto: Instantiated RNG4 SH1

caam 1700000.crypto: device ID = 0x0a140300 (Era 67108864)

caam 1700000.crypto: job rings = 4, qi = 0

alg: No test for authenc(hmac(md5),cbc(aes)) (authenc-hmac-md5-cbc-aes-caam)

 

caam_jr_enqueue:87891000

Found

caam_jr_dequeue:87891000

------------[ cut here ]------------

WARNING: CPU: 0 PID: 60 at lib/dma-debug.c:877 check_unmap+0x178/0x7b8()

(null): DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x0000000087891000] [size=28 bytes]

Modules linked in:

CPU: 0 PID: 60 Comm: cryptomgr_test Not tainted 3.12.0+ #25

Backtrace:

[<800111ec>] (dump_backtrace+0x0/0x108) from [<80011384>] (show_stack+0x18/0x1c)

r6:805a5c41 r5:00000009 r4:00000000 r3:00208040

[<8001136c>] (show_stack+0x0/0x1c) from [<8048f2d4>] (dump_stack+0x70/0x8c)

[<8048f264>] (dump_stack+0x0/0x8c) from [<8001d598>] (warn_slowpath_common+0x6c/0x90)

r4:bc7ff9b8 r3:60000113

[<8001d52c>] (warn_slowpath_common+0x0/0x90) from [<8001d660>] (warn_slowpath_fmt+0x38/0x40)

r8:806a3200 r7:00000000 r6:bc7ffa30 r5:87891000 r4:87891000

[<8001d628>] (warn_slowpath_fmt+0x0/0x40) from [<802075c8>] (check_unmap+0x178/0x7b8)

r3:805a20d6 r2:805a60df

[<80207450>] (check_unmap+0x0/0x7b8) from [<80207df8>] (debug_dma_unmap_page+0x6c/0x78)

r8:00000001 r7:00000001 r6:8881747c r5:87891000 r4:0000001c

[<80207d8c>] (debug_dma_unmap_page+0x0/0x78) from [<8037b4d0>] (caam_jr_dequeue+0x15c/0x2a4)

r7:00000000 r6:00000000 r5:00000000 r4:bf0b4a00

[<8037b374>] (caam_jr_dequeue+0x0/0x2a4) from [<803adb20>] (net_rx_action+0x70/0x17c)

[<803adab0>] (net_rx_action+0x0/0x17c) from [<8002120c>] (__do_softirq+0xd0/0x1b8)

[<8002113c>] (__do_softirq+0x0/0x1b8) from [<80021398>] (do_softirq+0x4c/0x58)

[<8002134c>] (do_softirq+0x0/0x58) from [<80021624>] (irq_exit+0x8c/0xe0)

r4:bc7fe000 r3:00000000

[<80021598>] (irq_exit+0x0/0xe0) from [<8000eb44>] (handle_IRQ+0x70/0x94)

r4:00000087 r3:00000100

[<8000ead4>] (handle_IRQ+0x0/0x94) from [<80008538>] (gic_handle_irq+0x44/0x68)

usb 1-1: new high-speed USB device number 2 using xhci-hcd

r5:bc7ffbd0 r4:c0802000

[<800084f4>] (gic_handle_irq+0x0/0x68) from [<80011e80>] (__irq_svc+0x40/0x50)

Exception stack(0xbc7ffbd0 to 0xbc7ffc18)

fbc0:                                     bc7ffc9c bc7ffc38 00000000 00000001

fbe0: 7fffffff bc7ffc98 bc7ffc9c 00000001 bc7fe000 bc7ffc98 00000001 bc7ffc24

fc00: bc7ffc18 bc7ffc18 80493ba8 80493bac 60000113 ffffffff

r6:ffffffff r5:60000113 r4:80493bac r3:80493ba8

[<80493b98>] (_raw_spin_unlock_irq+0x0/0x18) from [<8049297c>] (wait_for_common+0x128/0x170)

[<80492854>] (wait_for_common+0x0/0x170) from [<80492a10>] (wait_for_completion_interruptible+0x18/0x24)

[<804929f8>] (wait_for_completion_interruptible+0x0/0x24) from [<8037bd9c>] (gen_split_key+0x2c8/0x3d0)

[<8037bad4>] (gen_split_key+0x0/0x3d0) from [<8037db6c>] (aead_setkey+0x8c/0x23c)

[<8037dae0>] (aead_setkey+0x0/0x23c) from [<801c5164>] (setkey+0x9c/0xa8)

[<801c50c8>] (setkey+0x0/0xa8) from [<801cb390>] (__test_aead+0x244/0xd1c)

[<801cb14c>] (__test_aead+0x0/0xd1c) from [<801ccaec>] (test_aead+0x30/0xbc)

[<801ccabc>] (test_aead+0x0/0xbc) from [<801ccbec>] (alg_test_aead+0x74/0xac)

hub 1-1:1.0: USB hub found

r8:bf0b3280hub 1-1:1.0: 4 ports detected

r7:bf0b3240 r6:804a8c68 r5:bf317800 r4:00000000

[<801ccb78>] (alg_test_aead+0x0/0xac) from [<801cc0b8>] (alg_test+0x1e4/0x27c)

r7:00001083 r6:ffffffff r5:bf0b3240 r4:00000000

[<801cbed4>] (alg_test+0x0/0x27c) from [<801c9cb4>] (cryptomgr_test+0x2c/0x50)

[<801c9c88>] (cryptomgr_test+0x0/0x50) from [<80038688>] (kthread+0xb4/0xc4)

r4:bf081d7c r3:00000000

[<800385d4>] (kthread+0x0/0xc4) from [<8000e298>] (ret_from_fork+0x14/0x3c)

r7:00000000 r6:00000000 r5:800385d4 r4:bf081d7c

---[ end trace 11601762206b1dd0 ]---

 

I was trying to figure out the issue over here.

Any help is much appreciated.

Outcomes