Patch "crypto: hisilicon/qm - Add the err memory release process to qm uninit" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: hisilicon/qm - Add the err memory release process to qm uninit

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-hisilicon-qm-add-the-err-memory-release-proce.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b15c02b8b7d37cdc71a50ada9c2f925fd36059a6
Author: Chenghai Huang <huangchenghai2@xxxxxxxxxx>
Date:   Sun Apr 7 16:00:00 2024 +0800

    crypto: hisilicon/qm - Add the err memory release process to qm uninit
    
    [ Upstream commit c9ccfd5e0ff0dd929ce86d1b5f3c6a414110947a ]
    
    When the qm uninit command is executed, the err data needs to
    be released to prevent memory leakage. The error information
    release operation and uacce_remove are integrated in
    qm_remove_uacce.
    
    So add the qm_remove_uacce to qm uninit to avoid err memory
    leakage.
    
    Signed-off-by: Chenghai Huang <huangchenghai2@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 92f0a1d9b4a6b..13e413533f082 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -2893,12 +2893,9 @@ void hisi_qm_uninit(struct hisi_qm *qm)
 	hisi_qm_set_state(qm, QM_NOT_READY);
 	up_write(&qm->qps_lock);
 
+	qm_remove_uacce(qm);
 	qm_irqs_unregister(qm);
 	hisi_qm_pci_uninit(qm);
-	if (qm->use_sva) {
-		uacce_remove(qm->uacce);
-		qm->uacce = NULL;
-	}
 }
 EXPORT_SYMBOL_GPL(hisi_qm_uninit);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux