Patch "crypto: sun8i-ss - fix a NULL vs IS_ERR() check in sun8i_ss_hashkey" has been added to the 5.19-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: sun8i-ss - fix a NULL vs IS_ERR() check in sun8i_ss_hashkey

to the 5.19-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-sun8i-ss-fix-a-null-vs-is_err-check-in-sun8i_.patch
and it can be found in the queue-5.19 subdirectory.

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



commit 331c032191683a72689785d251cd03ba26ef52c8
Author: Peng Wu <wupeng58@xxxxxxxxxx>
Date:   Thu Jun 2 07:22:34 2022 +0000

    crypto: sun8i-ss - fix a NULL vs IS_ERR() check in sun8i_ss_hashkey
    
    [ Upstream commit 7e8df1fc2d669d04c1f8a9e2d61d7afba1b43df4 ]
    
    The crypto_alloc_shash() function never returns NULL. It returns error
    pointers.
    
    Fixes: 801b7d572c0a ("crypto: sun8i-ss - add hmac(sha1)")
    Signed-off-by: Peng Wu <wupeng58@xxxxxxxxxx>
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
index 845019bd9591..36a82b22953c 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
@@ -30,8 +30,8 @@ static int sun8i_ss_hashkey(struct sun8i_ss_hash_tfm_ctx *tfmctx, const u8 *key,
 	int ret = 0;
 
 	xtfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_NEED_FALLBACK);
-	if (!xtfm)
-		return -ENOMEM;
+	if (IS_ERR(xtfm))
+		return PTR_ERR(xtfm);
 
 	len = sizeof(*sdesc) + crypto_shash_descsize(xtfm);
 	sdesc = kmalloc(len, GFP_KERNEL);



[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