]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2022 06:47:46 +0000 (07:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2022 06:47:46 +0000 (07:47 +0100)
added patches:
libbpf-fix-uninitialized-warning-in-btf_dump_dump_type_data.patch

queue-6.0/libbpf-fix-uninitialized-warning-in-btf_dump_dump_type_data.patch [new file with mode: 0644]
queue-6.0/series

diff --git a/queue-6.0/libbpf-fix-uninitialized-warning-in-btf_dump_dump_type_data.patch b/queue-6.0/libbpf-fix-uninitialized-warning-in-btf_dump_dump_type_data.patch
new file mode 100644 (file)
index 0000000..5cc0c1a
--- /dev/null
@@ -0,0 +1,43 @@
+From dfd0afbf151d85411b371e841f62b81ee5d1ca54 Mon Sep 17 00:00:00 2001
+From: David Michael <fedora.dm0@gmail.com>
+Date: Sun, 13 Nov 2022 15:52:17 -0500
+Subject: libbpf: Fix uninitialized warning in btf_dump_dump_type_data
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: David Michael <fedora.dm0@gmail.com>
+
+commit dfd0afbf151d85411b371e841f62b81ee5d1ca54 upstream.
+
+GCC 11.3.0 fails to compile btf_dump.c due to the following error,
+which seems to originate in btf_dump_struct_data where the returned
+value would be uninitialized if btf_vlen returns zero.
+
+btf_dump.c: In function ‘btf_dump_dump_type_data’:
+btf_dump.c:2363:12: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ 2363 |         if (err < 0)
+      |            ^
+
+Fixes: 920d16af9b42 ("libbpf: BTF dumper support for typed data")
+Signed-off-by: David Michael <fedora.dm0@gmail.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Acked-by: Stanislav Fomichev <sdf@google.com>
+Acked-by: Alan Maguire <alan.maguire@oracle.com>
+Link: https://lore.kernel.org/bpf/87zgcu60hq.fsf@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/lib/bpf/btf_dump.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/lib/bpf/btf_dump.c
++++ b/tools/lib/bpf/btf_dump.c
+@@ -1963,7 +1963,7 @@ static int btf_dump_struct_data(struct b
+ {
+       const struct btf_member *m = btf_members(t);
+       __u16 n = btf_vlen(t);
+-      int i, err;
++      int i, err = 0;
+       /* note that we increment depth before calling btf_dump_print() below;
+        * this is intentional.  btf_dump_data_newline() will not print a
index 9dfbad093671f94d7a6fa16520d2060efcb46b70..4719b70fa663ceb4332a571e6d250e29c5622f2e 100644 (file)
@@ -1,3 +1,4 @@
 rtc-cmos-fix-event-handler-registration-ordering-issue.patch
 rtc-cmos-fix-wake-alarm-breakage.patch
 x86-vdso-conditionally-export-__vdso_sgx_enter_enclave.patch
+libbpf-fix-uninitialized-warning-in-btf_dump_dump_type_data.patch