* [PATCH] crypto: hisilicon/qm - fix memset during queues clearing
@ 2022-03-04 9:46 Kai Ye
2022-03-09 3:22 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Kai Ye @ 2022-03-04 9:46 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto, linux-kernel, wangzhou1, yekai13
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>
---
drivers/crypto/hisilicon/qm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: hisilicon/qm - fix memset during queues clearing
2022-03-04 9:46 [PATCH] crypto: hisilicon/qm - fix memset during queues clearing Kai Ye
@ 2022-03-09 3:22 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-03-09 3:22 UTC (permalink / raw)
To: Kai Ye; +Cc: linux-crypto, linux-kernel, wangzhou1
On Fri, Mar 04, 2022 at 05:46:47PM +0800, Kai Ye wrote:
> 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>
> ---
> drivers/crypto/hisilicon/qm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-09 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 9:46 [PATCH] crypto: hisilicon/qm - fix memset during queues clearing Kai Ye
2022-03-09 3:22 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).