lkml.org 
[lkml]   [2024]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] icmp: Add icmp_timestamp_ignore_all to control ICMP_TIMESTAMP
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

\
 
 \ /
  Last update: 2024-05-17 23:40    [W:0.048 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site