original_kernel/drivers/crypto/caam
Xulin Sun 430f13389b crypto: caam - free qman_fq after kill_fq
kill_fq removes a complete frame queue, it needs to free the qman_fq
in the last. Else kmemleak will report the below warning:

unreferenced object 0xffff800073085c80 (size 128):
  comm "cryptomgr_test", pid 199, jiffies 4294937850 (age 67.840s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 a0 80 7e 00 00 80 ff ff
    00 00 00 00 00 00 00 00 04 00 04 00 5c 01 00 00
  backtrace:
    [<ffff8000001e5760>] create_object+0xf8/0x258
    [<ffff800000994e38>] kmemleak_alloc+0x58/0xa0
    [<ffff8000001d5f18>] kmem_cache_alloc_trace+0x2c8/0x358
    [<ffff8000007e8410>] create_caam_req_fq+0x40/0x170
    [<ffff8000007e870c>] caam_drv_ctx_update+0x54/0x248
    [<ffff8000007fca54>] aead_setkey+0x154/0x300
    [<ffff800000452120>] setkey+0x50/0xf0
    [<ffff80000045b144>] __test_aead+0x5ec/0x1028
    [<ffff80000045c28c>] test_aead+0x44/0xc8
    [<ffff80000045c368>] alg_test_aead+0x58/0xd0
    [<ffff80000045bdb4>] alg_test+0x14c/0x308
    [<ffff8000004588e8>] cryptomgr_test+0x50/0x58
    [<ffff8000000c3b2c>] kthread+0xdc/0xf0
    [<ffff800000083c00>] ret_from_fork+0x10/0x50

And check where the function kill_fq() is called to remove
the additional kfree to qman_fq and avoid re-calling the released qman_fq.

Signed-off-by: Xulin Sun <xulin.sun@windriver.com>
Acked-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-07-28 17:55:50 +08:00
..
Kconfig
Makefile
caamalg.c crypto: caam/qi - fix compilation with DEBUG enabled 2017-07-18 18:16:00 +08:00
caamalg_desc.c crypto: caam - fix condition for the jump over key(s) command 2017-07-18 18:16:07 +08:00
caamalg_desc.h
caamalg_qi.c crypto: caam/qi - remove unused header sg_sw_sec4.h 2017-07-18 18:16:04 +08:00
caamhash.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
caampkc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-07-05 15:17:26 +08:00
caampkc.h
caamrng.c crypto: caam - clean-up in caam_init_rng() 2017-07-18 18:16:07 +08:00
compat.h
ctrl.c crypto: caam - remove unused variables in caam_drv_private 2017-07-18 18:16:06 +08:00
ctrl.h
desc.h
desc_constr.h
error.c crypto: caam/qi - fix compilation with DEBUG enabled 2017-07-18 18:16:00 +08:00
error.h crypto: caam/qi - fix compilation with DEBUG enabled 2017-07-18 18:16:00 +08:00
intern.h crypto: caam - remove unused variables in caam_drv_private 2017-07-18 18:16:06 +08:00
jr.c
jr.h
key_gen.c crypto: caam - fix signals handling 2017-07-12 18:38:04 +08:00
key_gen.h
pdb.h
pkc_desc.c
qi.c crypto: caam - free qman_fq after kill_fq 2017-07-28 17:55:50 +08:00
qi.h crypto: caam/qi - handle large number of S/Gs case 2017-07-18 18:16:02 +08:00
regs.h
sg_sw_qm.h
sg_sw_sec4.h crypto: caam - remove unused sg_to_sec4_sg_len() 2017-07-18 18:16:05 +08:00