]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Oct 2024 11:34:04 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Oct 2024 11:34:04 +0000 (13:34 +0200)
added patches:
rdma-hns-fix-uninitialized-variable.patch

queue-5.10/rdma-hns-fix-uninitialized-variable.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/rdma-hns-fix-uninitialized-variable.patch b/queue-5.10/rdma-hns-fix-uninitialized-variable.patch
new file mode 100644 (file)
index 0000000..7e0a046
--- /dev/null
@@ -0,0 +1,33 @@
+From 2a38c0f10e6d7d28e06ff1eb1f350804c4850275 Mon Sep 17 00:00:00 2001
+From: Yixing Liu <liuyixing1@huawei.com>
+Date: Fri, 18 Jun 2021 18:10:12 +0800
+Subject: RDMA/hns: Fix uninitialized variable
+
+From: Yixing Liu <liuyixing1@huawei.com>
+
+commit 2a38c0f10e6d7d28e06ff1eb1f350804c4850275 upstream.
+
+A random value will be returned if the condition below is not met, so it
+needs to be initialized.
+
+Fixes: 9ea9a53ea93b ("RDMA/hns: Add mapped page count checking for MTR")
+Link: https://lore.kernel.org/r/1624011020-16992-3-git-send-email-liweihang@huawei.com
+Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
+Signed-off-by: Weihang Li <liweihang@huawei.com>
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/hns/hns_roce_mr.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/hns/hns_roce_mr.c
++++ b/drivers/infiniband/hw/hns/hns_roce_mr.c
+@@ -832,7 +832,7 @@ int hns_roce_mtr_map(struct hns_roce_dev
+       struct ib_device *ibdev = &hr_dev->ib_dev;
+       struct hns_roce_buf_region *r;
+       unsigned int i, mapped_cnt;
+-      int ret;
++      int ret = 0;
+       /*
+        * Only use the first page address as root ba when hopnum is 0, this
index cfb95228599c3a6cc6bcfe419b019d2cd5681de8..30a3621351b0343c8e07a9a3c3ca6c30f4ee7edd 100644 (file)
@@ -515,3 +515,4 @@ net-seg6-fix-seg6_lookup_any_nexthop-to-handle-vrfs-using-flowi_l3mdev.patch
 net-vrf-determine-the-dst-using-the-original-ifindex-for-multicast.patch
 netfilter-ip6t_rpfilter-fix-regression-with-vrf-interfaces.patch
 ext4-fix-warning-in-ext4_dio_write_end_io.patch
+rdma-hns-fix-uninitialized-variable.patch