From: Greg Kroah-Hartman Date: Sun, 28 Jan 2024 00:05:07 +0000 (-0800) Subject: 6.6-stable patches X-Git-Tag: v6.1.76~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de300e6c7a4ce1a9fa0302619b0e5e308123b545;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: net-bpf-avoid-unused-sin_addr_len-warning-when-config_cgroup_bpf-is-not-set.patch --- diff --git a/queue-6.6/net-bpf-avoid-unused-sin_addr_len-warning-when-config_cgroup_bpf-is-not-set.patch b/queue-6.6/net-bpf-avoid-unused-sin_addr_len-warning-when-config_cgroup_bpf-is-not-set.patch new file mode 100644 index 00000000000..55122580a03 --- /dev/null +++ b/queue-6.6/net-bpf-avoid-unused-sin_addr_len-warning-when-config_cgroup_bpf-is-not-set.patch @@ -0,0 +1,38 @@ +From 9c1292eca243821249fa99f40175b0660d9329e3 Mon Sep 17 00:00:00 2001 +From: Martin KaFai Lau +Date: Fri, 13 Oct 2023 11:57:02 -0700 +Subject: net/bpf: Avoid unused "sin_addr_len" warning when CONFIG_CGROUP_BPF is not set + +From: Martin KaFai Lau + +commit 9c1292eca243821249fa99f40175b0660d9329e3 upstream. + +It was reported that there is a compiler warning on the unused variable +"sin_addr_len" in af_inet.c when CONFIG_CGROUP_BPF is not set. +This patch is to address it similar to the ipv6 counterpart +in inet6_getname(). It is to "return sin_addr_len;" +instead of "return sizeof(*sin);". + +Fixes: fefba7d1ae19 ("bpf: Propagate modified uaddrlen from cgroup sockaddr programs") +Reported-by: Stephen Rothwell +Signed-off-by: Martin KaFai Lau +Signed-off-by: Andrii Nakryiko +Reviewed-by: Kuniyuki Iwashima +Link: https://lore.kernel.org/bpf/20231013185702.3993710-1-martin.lau@linux.dev +Closes: https://lore.kernel.org/bpf/20231013114007.2fb09691@canb.auug.org.au/ +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/af_inet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv4/af_inet.c ++++ b/net/ipv4/af_inet.c +@@ -823,7 +823,7 @@ int inet_getname(struct socket *sock, st + } + release_sock(sk); + memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); +- return sizeof(*sin); ++ return sin_addr_len; + } + EXPORT_SYMBOL(inet_getname); + diff --git a/queue-6.6/series b/queue-6.6/series index 27cc82de5bb..230cd632636 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -270,3 +270,4 @@ drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch drm-amdgpu-pm-fix-the-power-source-flag-error.patch drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch +net-bpf-avoid-unused-sin_addr_len-warning-when-config_cgroup_bpf-is-not-set.patch