linux/drivers/crypto
Horia Geanta 76b99080cc crypto: caam - fix uninitialized edesc->dst_dma field
dst_dma not being properly initialized causes ahash_done_ctx_dst
to try to free unallocated DMA memory:

caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x0000000006513340] [size=28 bytes]
WARNING: at lib/dma-debug.c:1080
Modules linked in: caamhash(+) [last unloaded: caamhash]
CPU: 0 PID: 1373 Comm: cryptomgr_test Tainted: G        W     3.16.0-rc1 #23
task: ee23e350 ti: effd2000 task.ti: ee1f6000
NIP: c02889fc LR: c02889fc CTR: c02d7020
REGS: effd3d50 TRAP: 0700   Tainted: G        W      (3.16.0-rc1)
MSR: 00029002 <CE,EE,ME>  CR: 44048082  XER: 00000000

GPR00: c02889fc effd3e00 ee23e350 0000008e c1de3478 c1de382c 00000000 00029002
GPR08: 00000007 00000000 01660000 00000000 24048082 00000000 00000018 c07db080
GPR16: 00000006 00000100 0000002c eeb4a7e0 c07e1e10 c0da1180 00029002 c0d9b3c8
GPR24: eeb4a7c0 00000000 effd3e58 00000000 c078ad4c ee130210 00000000 06513340
NIP [c02889fc] check_unmap+0x8ac/0xab0
LR [c02889fc] check_unmap+0x8ac/0xab0
Call Trace:
[effd3e00] [c02889fc] check_unmap+0x8ac/0xab0 (unreliable)
[effd3e50] [c0288c78] debug_dma_unmap_page+0x78/0x90
[effd3ed0] [f94b89ec] ahash_done_ctx_dst+0x11c/0x200 [caamhash]
[effd3f00] [c0429640] caam_jr_dequeue+0x1c0/0x280
[effd3f50] [c002c94c] tasklet_action+0xcc/0x1a0
[effd3f80] [c002cb30] __do_softirq+0x110/0x220
[effd3fe0] [c002cf34] irq_exit+0xa4/0xe0
[effd3ff0] [c000d834] call_do_irq+0x24/0x3c
[ee1f7ae0] [c000489c] do_IRQ+0x8c/0x110
[ee1f7b00] [c000f86c] ret_from_except+0x0/0x18
--- Exception: 501 at _raw_spin_unlock_irq+0x30/0x50
    LR = _raw_spin_unlock_irq+0x2c/0x50
[ee1f7bd0] [c0590158] wait_for_common+0xb8/0x170
[ee1f7c10] [c059024c] wait_for_completion_interruptible+0x1c/0x40
[ee1f7c20] [c022fc78] do_one_async_hash_op.isra.2.part.3+0x18/0x40
[ee1f7c30] [c022ffb8] __test_hash+0x318/0x6c0
[ee1f7de0] [c0230388] test_hash+0x28/0xb0
[ee1f7e00] [c02304a4] alg_test_hash+0x94/0xc0
[ee1f7e20] [c022fa94] alg_test+0x114/0x2e0
[ee1f7ea0] [c022cd1c] cryptomgr_test+0x4c/0x60
[ee1f7eb0] [c00497a4] kthread+0xc4/0xe0
[ee1f7f40] [c000f2fc] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
41de01c8 80a9002c 2f850000 40fe0008 80a90008 80fa0018 3c60c06d 811a001c
3863f4a4 813a0020 815a0024 4830cd01 <0fe00000> 81340048 2f890000 40feff48

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-07-23 21:31:36 +08:00
..
amcc crypto: drivers - Add 2 missing __exit_p 2014-06-20 21:26:08 +08:00
caam crypto: caam - fix uninitialized edesc->dst_dma field 2014-07-23 21:31:36 +08:00
ccp crypto: ccp - Base AXI DMA cache settings on device tree 2014-07-23 21:28:38 +08:00
nx crypto: drivers - Add 2 missing __exit_p 2014-06-20 21:26:08 +08:00
qat crypto: qat - remove an unneeded cast 2014-07-10 16:50:36 +08:00
qce crypto: qce - fix sparse warnings 2014-07-08 21:18:21 +08:00
ux500 crypto: ux500 - make interrupt mode plausible 2014-07-03 21:42:10 +08:00
atmel-aes-regs.h crypto: atmel - add Atmel AES driver 2012-07-11 11:07:40 +08:00
atmel-aes.c crypto: atmel-aes - check alignment of cfb64 mode 2014-04-28 18:21:19 +08:00
atmel-sha-regs.h crypto: atmel-sha - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +08:00
atmel-sha.c crypto: atmel-sha - add sha information to the log 2013-12-12 18:39:36 +01:00
atmel-tdes-regs.h crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
atmel-tdes.c crypto: atmel-tdes - add support for Device Tree 2013-12-12 18:39:35 +01:00
bfin_crc.c cryptoo: bfin_crc - avoid get physical address of coherence memory by dma_map_single 2014-04-16 20:40:16 +08:00
bfin_crc.h crypto: bfin_crc - access crc registers by readl and writel functions 2014-04-16 20:40:15 +08:00
geode-aes.c crypto: geode - Don't use tfm->__crt_alg->cra_name directly 2014-05-22 21:03:13 +08:00
geode-aes.h crypto: geode - Consistently use AES_KEYSIZE_128 2014-05-22 21:03:12 +08:00
hifn_795x.c crypto: hifn_795x - Pass correct pointer to free_irq() 2013-05-28 15:43:04 +08:00
ixp4xx_crypto.c crypto: ixp4xx - Fix kernel compile error 2014-01-01 14:06:23 +08:00
Kconfig crypto: qce - add dependancy to Kconfig 2014-07-08 21:18:22 +08:00
Makefile crypto: qce - Build Qualcomm crypto driver 2014-07-03 21:42:03 +08:00
mv_cesa.c crypto: cesa - tfm->__crt_alg->cra_type directly 2014-05-22 21:03:17 +08:00
mv_cesa.h crypto: mv_cesa - Add sha1 and hmac(sha1) async hash drivers 2010-04-13 16:50:49 +08:00
mxs-dcp.c crypto: dcp - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:15 +08:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c crypto: n2 - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:15 +08:00
n2_core.h crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
omap-aes.c crypto: omap-aes - Use SIMPLE_DEV_PM_OPS macro 2014-03-10 20:13:38 +08:00
omap-des.c crypto: omap-des - handle error of pm_runtime_get_sync 2014-04-16 20:40:19 +08:00
omap-sham.c crypto: omap-sham - Map SG pages if they are HIGHMEM before accessing 2014-03-10 20:17:13 +08:00
padlock-aes.c crypto: drivers - remove cra_list initialization 2012-08-01 17:47:28 +08:00
padlock-sha.c crypto: padlock - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:16 +08:00
picoxcell_crypto_regs.h crypto: picoxcell - add support for the picoxcell crypto engines 2011-02-21 22:42:40 +11:00
picoxcell_crypto.c crypto: picoxcell - Use devm_ioremap_resource() 2014-02-27 05:56:47 +08:00
s5p-sss.c crypto: s5p-sss - fix multiplatform build 2014-05-13 19:43:45 +08:00
sahara.c crypto: sahara - tfm->__crt_alg->cra_name directly 2014-05-22 21:03:16 +08:00
talitos.c crypto: talitos: init the priv->alg_list more earlier in talitos_probe() 2014-02-09 09:59:25 +08:00
talitos.h crypto: talitos - add sha224, sha384 and sha512 to existing AEAD algorithms 2012-07-11 11:08:29 +08:00