Patch "crypto: octeontx2 - uninitialized variable in kvf_limits_store()" 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: octeontx2 - uninitialized variable in kvf_limits_store()

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-octeontx2-uninitialized-variable-in-kvf_limits_store.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.


>From 0ea275df84c389e910a3575a9233075118c173ee Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Sat, 27 Nov 2021 17:10:27 +0300
Subject: crypto: octeontx2 - uninitialized variable in kvf_limits_store()

From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

commit 0ea275df84c389e910a3575a9233075118c173ee upstream.

If kstrtoint() fails then "lfs_num" is uninitialized and the warning
doesn't make any sense.  Just delete it.

Fixes: 8ec8015a3168 ("crypto: octeontx2 - add support to process the crypto request")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
@@ -494,12 +494,11 @@ static ssize_t kvf_limits_store(struct d
 {
 	struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev);
 	int lfs_num;
+	int ret;
 
-	if (kstrtoint(buf, 0, &lfs_num)) {
-		dev_err(dev, "lfs count %d must be in range [1 - %d]\n",
-			lfs_num, num_online_cpus());
-		return -EINVAL;
-	}
+	ret = kstrtoint(buf, 0, &lfs_num);
+	if (ret)
+		return ret;
 	if (lfs_num < 1 || lfs_num > num_online_cpus()) {
 		dev_err(dev, "lfs count %d must be in range [1 - %d]\n",
 			lfs_num, num_online_cpus());


Patches currently in stable-queue which might be from dan.carpenter@xxxxxxxxxx are

queue-5.15/drm-amd-display-fix-bug-in-debugfs-crc_win_update-en.patch
queue-5.15/netrom-fix-api-breakage-in-nr_setsockopt.patch
queue-5.15/wilc1000-fix-double-free-error-in-probe.patch
queue-5.15/media-atomisp-fix-variable-dereferenced-before-check.patch
queue-5.15/media-atomisp-fix-uninitialized-bug-in-gmin_get_pmic.patch
queue-5.15/drm-etnaviv-limit-submit-sizes.patch
queue-5.15/drm-bridge-display-connector-fix-an-uninitialized-po.patch
queue-5.15/bluetooth-l2cap-uninitialized-variables-in-l2cap_soc.patch
queue-5.15/rocker-fix-a-sleeping-in-atomic-bug.patch
queue-5.15/drm-vboxvideo-fix-a-null-vs-is_err-check.patch
queue-5.15/crypto-octeontx2-prevent-underflow-in-get_cores_bmap.patch
queue-5.15/staging-rtl8192e-return-error-code-from-rtllib_softm.patch
queue-5.15/ksmbd-uninitialized-variable-in-create_socket.patch
queue-5.15/crypto-octeontx2-uninitialized-variable-in-kvf_limits_store.patch
queue-5.15/ax25-uninitialized-variable-in-ax25_setsockopt.patch
queue-5.15/binder-fix-handling-of-error-during-copy.patch
queue-5.15/ext4-initialize-err_blk-before-calling-__ext4_get_inode_loc.patch
queue-5.15/staging-rtl8192e-rtllib_module-fix-error-handle-case.patch



[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