From 9aea61456fe42b3d016c326b05921feb06a80f9b Mon Sep 17 00:00:00 2001 From: Zhengchao Shao Date: Thu, 1 Feb 2024 10:37:57 +0800 Subject: [PATCH 1/2] tcp: fix static scanning issue with sysctl_local_port_allocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I90CON CVE: NA -------------------------------- Fix static scanning issue with sysctl_local_port_allocation: sysctl_local_port_allocation:do not initialise globals to 0. Fixes: f07a514b584a ("tcp: fix compilation issue when CONFIG_SYSCTL is disabled") Signed-off-by: Zhengchao Shao --- net/ipv4/inet_hashtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 6fb12a4d86af..57a207101545 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -28,7 +28,7 @@ #include #include -int sysctl_local_port_allocation = 0; +int sysctl_local_port_allocation; u32 inet_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, const __be32 faddr, -- Gitee From 05d8562a3b4ebe20ccc34db240b0a8cd58a858f6 Mon Sep 17 00:00:00 2001 From: Zhengchao Shao Date: Thu, 1 Feb 2024 10:37:58 +0800 Subject: [PATCH 2/2] bond: fix static scanning issue with bond_broadcast_arp_or_nd_table_header hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I90CON CVE: NA -------------------------------- fix static scanning issue with bond_broadcast_arp_or_nd_table_header: symbol 'bond_broadcast_arp_or_nd_table_header' was not declared. Should it be static? Signed-off-by: Zhengchao Shao --- drivers/net/bonding/bond_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_sysctl.c b/drivers/net/bonding/bond_sysctl.c index 17404d37a2fd..78c1ad71c8f0 100644 --- a/drivers/net/bonding/bond_sysctl.c +++ b/drivers/net/bonding/bond_sysctl.c @@ -6,7 +6,7 @@ int sysctl_bond_broadcast_arp_or_nd __read_mostly; EXPORT_SYMBOL(sysctl_bond_broadcast_arp_or_nd); -struct ctl_table_header *bond_broadcast_arp_or_nd_table_header; +static struct ctl_table_header *bond_broadcast_arp_or_nd_table_header; static struct ctl_table bond_broadcast_arp_or_nd_table[] = { { -- Gitee