linux/drivers/crypto
Horia Geanta de0e35ec2b crypto: caam - fix uninitialized state->buf_dma field
state->buf_dma not being initialized can cause try_buf_map_to_sec4_sg
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=0x000000002eb15068] [size=0 bytes]
WARNING: at lib/dma-debug.c:1080
Modules linked in: caamhash(+) [last unloaded: caamhash]
CPU: 0 PID: 1387 Comm: cryptomgr_test Tainted: G        W     3.16.0-rc1 #23
task: eed24e90 ti: eebd0000 task.ti: eebd0000
NIP: c02889fc LR: c02889fc CTR: c02d7020
REGS: eebd1a50 TRAP: 0700   Tainted: G        W      (3.16.0-rc1)
MSR: 00029002 <CE,EE,ME>  CR: 44042082  XER: 00000000

GPR00: c02889fc eebd1b00 eed24e90 0000008d c1de3478 c1de382c 00000000 00029002
GPR08: 00000007 00000000 01660000 00000000 24042082 00000000 c07a1900 eeda2a40
GPR16: 005d62a0 c078ad4c 00000000 eeb15068 c07e1e10 c0da1180 00029002 c0d97408
GPR24: c62497a0 00000014 eebd1b58 00000000 c078ad4c ee130210 00000000 2eb15068
NIP [c02889fc] check_unmap+0x8ac/0xab0
LR [c02889fc] check_unmap+0x8ac/0xab0
Call Trace:
[eebd1b00] [c02889fc] check_unmap+0x8ac/0xab0 (unreliable)
--- Exception: 0 at   (null)
    LR =   (null)
[eebd1b50] [c0288c78] debug_dma_unmap_page+0x78/0x90 (unreliable)
[eebd1bd0] [f956f738] ahash_final_ctx+0x6d8/0x7b0 [caamhash]
[eebd1c30] [c022ff4c] __test_hash+0x2ac/0x6c0
[eebd1de0] [c0230388] test_hash+0x28/0xb0
[eebd1e00] [c02304a4] alg_test_hash+0x94/0xc0
[eebd1e20] [c022fa94] alg_test+0x114/0x2e0
[eebd1ea0] [c022cd1c] cryptomgr_test+0x4c/0x60
[eebd1eb0] [c00497a4] kthread+0xc4/0xe0
[eebd1f40] [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 state->buf_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