diff options
| author | Yang Shen <shenyang39@huawei.com> | 2021-12-11 16:56:55 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-12-17 16:59:48 +1100 |
| commit | fc6c01f0cd10b89c4b01dd2940e0b0cda1bd82fb (patch) | |
| tree | 9d870be6ee65ec56e6a7ddb09efdc570f16baf0f /scripts/generate_rust_analyzer.py | |
| parent | 808957baf3aa42b71453c8accc71cf5e52665982 (diff) | |
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>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions
