summaryrefslogtreecommitdiff
path: root/drivers/crypto/hisilicon
diff options
context:
space:
mode:
authorKai Ye <yekai13@huawei.com>2022-03-04 12:46:47 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-03-09 06:12:31 +0300
commitfd11727eec0dd95ee1b7d8f9f10ee60678eecc29 (patch)
tree29e7fdd6a1e7831dc762c6370720741eda222de7 /drivers/crypto/hisilicon
parent7a70d9a1cf112c0bdb42800d264d48f34089e3e8 (diff)
downloadlinux-fd11727eec0dd95ee1b7d8f9f10ee60678eecc29.tar.xz
crypto: hisilicon/qm - fix memset during queues clearing
Due to that extra page addr is used as a qp error flag when the device resetting. So it not should to clear this qp flag in userspace. Signed-off-by: Kai Ye <yekai13@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon')
-rw-r--r--drivers/crypto/hisilicon/qm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 3b29c8993b8c..453390044181 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -3840,7 +3840,7 @@ static void qm_clear_queues(struct hisi_qm *qm)
for (i = 0; i < qm->qp_num; i++) {
qp = &qm->qp_array[i];
- if (qp->is_resetting)
+ if (qp->is_in_kernel && qp->is_resetting)
memset(qp->qdma.va, 0, qp->qdma.size);
}