linux/drivers/crypto/hisilicon
Yang Shen fc6c01f0cd crypto: hisilicon/qm - fix deadlock for remove driver
When remove the driver and executing the task occur at the same time,
the following deadlock will be triggered:

Chain exists of:
    sva_lock --> uacce_mutex --> &qm->qps_lock
    Possible unsafe locking scenario:
		CPU0                    CPU1
		----                    ----
	lock(&qm->qps_lock);
					lock(uacce_mutex);
					lock(&qm->qps_lock);
	lock(sva_lock);

And the lock 'qps_lock' is used to protect qp. Therefore, it's reasonable
cycle is to continue until the qp memory is released. So move the release
lock infront of 'uacce_remove'.

Signed-off-by: Yang Shen <shenyang39@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-12-17 16:59:48 +11:00
..
hpre crypto: hisilicon/hpre - fix memory leak in hpre_curve25519_src_init() 2021-12-17 16:59:48 +11:00
sec crypto: hisilicon/sec - use the correct print format 2021-04-16 21:16:33 +10:00
sec2 crypto: hisilicon - modify the value of engine type rate 2021-11-26 16:25:17 +11:00
trng crypto: hisilicon/trng - add version to adapt new algorithm 2021-04-16 21:16:31 +10:00
zip crypto: hisilicon/zip - enable ssid for sva sgl 2021-12-17 16:59:48 +11:00
Kconfig crypto: hisilicon/hpre - fix Kconfig 2021-03-26 20:15:57 +11:00
Makefile crypto: hisilicon/trng - add HiSilicon TRNG driver support 2020-11-27 17:13:43 +11:00
qm.c crypto: hisilicon/qm - fix deadlock for remove driver 2021-12-17 16:59:48 +11:00
qm.h crypto: hisilicon - support runtime PM for accelerator device 2021-08-21 15:44:58 +08:00
sgl.c crypto: hisilicon/sgl - fix the sg buf unmap 2021-04-16 21:16:34 +10:00