From: kernel test robot <lkp@intel.com>
To: ye.xingchen@zte.com.cn, davem@davemloft.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
corbet@lwn.net, dsahern@kernel.org, ncardwell@google.com,
soheil@google.com, mfreemon@cloudflare.com, lixiaoyan@google.com,
david.laight@aculab.com, haiyangz@microsoft.com,
ye.xingchen@zte.com.cn, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
xu.xin16@zte.com.cn, zhang.yunkai@zte.com.cn, fan.yu9@zte.com.cn
Subject: Re: [PATCH net-next] icmp: Add icmp_timestamp_ignore_all to control ICMP_TIMESTAMP
Date: Sat, 18 May 2024 05:34:18 +0800 [thread overview]
Message-ID: <202405180545.RQgwvazz-lkp@intel.com> (raw)
In-Reply-To: <20240517172639229ec5bN7VBV7SGEHkSK5K6f@zte.com.cn>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/icmp-Add-icmp_timestamp_ignore_all-to-control-ICMP_TIMESTAMP/20240517-172903
base: net-next/main
patch link: https://lore.kernel.org/r/20240517172639229ec5bN7VBV7SGEHkSK5K6f%40zte.com.cn
patch subject: [PATCH net-next] icmp: Add icmp_timestamp_ignore_all to control ICMP_TIMESTAMP
config: arm-clps711x_defconfig (https://download.01.org/0day-ci/archive/20240518/202405180545.RQgwvazz-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240518/202405180545.RQgwvazz-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405180545.RQgwvazz-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from net/ipv4/icmp.c:69:
In file included from include/linux/inet.h:42:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/arm/include/asm/cacheflush.h:10:
In file included from include/linux/mm.h:2210:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> net/ipv4/icmp.c:1157:16: warning: variable 'net' is uninitialized when used here [-Wuninitialized]
1157 | if (READ_ONCE(net->ipv4.sysctl_icmp_timestamp_ignore_all))
| ^~~
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
net/ipv4/icmp.c:1155:17: note: initialize the variable 'net' to silence this warning
1155 | struct net *net;
| ^
| = NULL
2 warnings generated.
vim +/net +1157 net/ipv4/icmp.c
1144
1145 /*
1146 * Handle ICMP Timestamp requests.
1147 * RFC 1122: 3.2.2.8 MAY implement ICMP timestamp requests.
1148 * SHOULD be in the kernel for minimum random latency.
1149 * MUST be accurate to a few minutes.
1150 * MUST be updated at least at 15Hz.
1151 */
1152 static enum skb_drop_reason icmp_timestamp(struct sk_buff *skb)
1153 {
1154 struct icmp_bxm icmp_param;
1155 struct net *net;
1156
> 1157 if (READ_ONCE(net->ipv4.sysctl_icmp_timestamp_ignore_all))
1158 return SKB_NOT_DROPPED_YET;
1159
1160 /*
1161 * Too short.
1162 */
1163 if (skb->len < 4)
1164 goto out_err;
1165
1166 /*
1167 * Fill in the current time as ms since midnight UT:
1168 */
1169 icmp_param.data.times[1] = inet_current_timestamp();
1170 icmp_param.data.times[2] = icmp_param.data.times[1];
1171
1172 BUG_ON(skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4));
1173
1174 icmp_param.data.icmph = *icmp_hdr(skb);
1175 icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY;
1176 icmp_param.data.icmph.code = 0;
1177 icmp_param.skb = skb;
1178 icmp_param.offset = 0;
1179 icmp_param.data_len = 0;
1180 icmp_param.head_len = sizeof(struct icmphdr) + 12;
1181 icmp_reply(&icmp_param, skb);
1182 return SKB_NOT_DROPPED_YET;
1183
1184 out_err:
1185 __ICMP_INC_STATS(dev_net(skb_dst(skb)->dev), ICMP_MIB_INERRORS);
1186 return SKB_DROP_REASON_PKT_TOO_SMALL;
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-05-17 21:39 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240517172639229ec5bN7VBV7SGEHkSK5K6f@zte.com.cn>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202405180545.RQgwvazz-lkp@intel.com \
--to=lkp@intel.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=david.laight@aculab.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fan.yu9@zte.com.cn \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixiaoyan@google.com \
--cc=llvm@lists.linux.dev \
--cc=mfreemon@cloudflare.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
--cc=xu.xin16@zte.com.cn \
--cc=ye.xingchen@zte.com.cn \
--cc=zhang.yunkai@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox