Skip to contentSkip to conversation

crypto: hisilicon/qm - fix memset during queues clearing

PATCH In review Kai Ye 2 participants 2 messages Mar 4, 2022 – Mar 9, 2022

Subsystems (2)
lore
Share & tools
lore

Kai Ye

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/crypto/hisilicon/qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/hisilicon/qm.c +1 -1
index 3b29c8993b8c..453390044181 100644
@@ -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);
 	}
 
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 7 lines · Kai Ye

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.

---
 drivers/crypto/hisilicon/qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt