Patch "crypto: hisilicon/qm - fix missing put dfx access" has been added to the 5.15-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 - fix missing put dfx access

to the 5.15-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-fix-missing-put-dfx-access.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 5567b9e57531693471c86e75e4dbbfc12e2752aa
Author: Weili Qian <qianweili@xxxxxxxxxx>
Date:   Sat Aug 27 18:27:37 2022 +0800

    crypto: hisilicon/qm - fix missing put dfx access
    
    [ Upstream commit 5afc904f443de2afd31c4e0686ba178beede86fe ]
    
    In function qm_cmd_write(), if function returns from
    branch 'atomic_read(&qm->status.flags) == QM_STOP',
    the got dfx access is forgotten to put.
    
    Fixes: 607c191b371d ("crypto: hisilicon - support runtime PM for accelerator device")
    Signed-off-by: Weili Qian <qianweili@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 b616d2d8e773..b8900a5dbf6e 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1888,8 +1888,10 @@ static ssize_t qm_cmd_write(struct file *filp, const char __user *buffer,
 		return ret;
 
 	/* Judge if the instance is being reset. */
-	if (unlikely(atomic_read(&qm->status.flags) == QM_STOP))
-		return 0;
+	if (unlikely(atomic_read(&qm->status.flags) == QM_STOP)) {
+		ret = 0;
+		goto put_dfx_access;
+	}
 
 	if (count > QM_DBG_WRITE_LEN) {
 		ret = -ENOSPC;



[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