From: kernel test robot <lkp@intel.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
pabeni@redhat.com, Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next 5/7] icmp: reflect tos through ip cookie rather than updating inet_sk
Date: Sat, 8 Feb 2025 18:40:50 +0800 [thread overview]
Message-ID: <202502081845.hsTDUryC-lkp@intel.com> (raw)
In-Reply-To: <20250206193521.2285488-6-willemdebruijn.kernel@gmail.com>
Hi Willem,
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/Willem-de-Bruijn/tcp-only-initialize-sockcm-tsflags-field/20250207-033912
base: net-next/main
patch link: https://lore.kernel.org/r/20250206193521.2285488-6-willemdebruijn.kernel%40gmail.com
patch subject: [PATCH net-next 5/7] icmp: reflect tos through ip cookie rather than updating inet_sk
config: x86_64-buildonly-randconfig-002-20250207 (https://download.01.org/0day-ci/archive/20250208/202502081845.hsTDUryC-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502081845.hsTDUryC-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/202502081845.hsTDUryC-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/ipv4/icmp.c:408:20: warning: variable 'inet' set but not used [-Wunused-but-set-variable]
408 | struct inet_sock *inet;
| ^
1 warning generated.
vim +/inet +408 net/ipv4/icmp.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 395
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 * Driving logic for building and sending ICMP messages.
^1da177e4c3f41 Linus Torvalds 2005-04-16 398 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 399
^1da177e4c3f41 Linus Torvalds 2005-04-16 400 static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
^1da177e4c3f41 Linus Torvalds 2005-04-16 401 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 402 struct ipcm_cookie ipc;
511c3f92ad5b6d Eric Dumazet 2009-06-02 403 struct rtable *rt = skb_rtable(skb);
d8d1f30b95a635 Changli Gao 2010-06-10 404 struct net *net = dev_net(rt->dst.dev);
8c2bd38b95f75f Eric Dumazet 2024-08-29 405 bool apply_ratelimit = false;
77968b78242ee2 David S. Miller 2011-05-08 406 struct flowi4 fl4;
fdc0bde90a689b Denis V. Lunev 2008-08-23 407 struct sock *sk;
fdc0bde90a689b Denis V. Lunev 2008-08-23 @408 struct inet_sock *inet;
35ebf65e851c6d David S. Miller 2012-06-28 409 __be32 daddr, saddr;
e110861f86094c Lorenzo Colitti 2014-05-13 410 u32 mark = IP4_REPLY_MARK(net, skb->mark);
c0303efeab7391 Jesper Dangaard Brouer 2017-01-09 411 int type = icmp_param->data.icmph.type;
c0303efeab7391 Jesper Dangaard Brouer 2017-01-09 412 int code = icmp_param->data.icmph.code;
^1da177e4c3f41 Linus Torvalds 2005-04-16 413
91ed1e666a4ea2 Paolo Abeni 2017-08-03 414 if (ip_options_echo(net, &icmp_param->replyopts.opt.opt, skb))
f00c401b9b5f0a Horms 2006-02-02 415 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 416
8c2bd38b95f75f Eric Dumazet 2024-08-29 417 /* Needed by both icmpv4_global_allow and icmp_xmit_lock */
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 418 local_bh_disable();
^1da177e4c3f41 Linus Torvalds 2005-04-16 419
8c2bd38b95f75f Eric Dumazet 2024-08-29 420 /* is global icmp_msgs_per_sec exhausted ? */
8c2bd38b95f75f Eric Dumazet 2024-08-29 421 if (!icmpv4_global_allow(net, type, code, &apply_ratelimit))
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 422 goto out_bh_enable;
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 423
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 424 sk = icmp_xmit_lock(net);
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 425 if (!sk)
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 426 goto out_bh_enable;
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 427 inet = inet_sk(sk);
c0303efeab7391 Jesper Dangaard Brouer 2017-01-09 428
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 icmp_param->data.icmph.checksum = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 430
351782067b6be8 Willem de Bruijn 2018-07-06 431 ipcm_init(&ipc);
bbd17d3104f5a7 Willem de Bruijn 2025-02-06 432 ipc.tos = ip_hdr(skb)->tos;
0da7536fb47f51 Willem de Bruijn 2020-07-01 433 ipc.sockc.mark = mark;
9f6abb5f175bdb David S. Miller 2011-05-09 434 daddr = ipc.addr = ip_hdr(skb)->saddr;
35ebf65e851c6d David S. Miller 2012-06-28 435 saddr = fib_compute_spec_dst(skb);
aa6615814533c6 Francesco Fusco 2013-09-24 436
f6d8bd051c391c Eric Dumazet 2011-04-21 437 if (icmp_param->replyopts.opt.opt.optlen) {
f6d8bd051c391c Eric Dumazet 2011-04-21 438 ipc.opt = &icmp_param->replyopts.opt;
f6d8bd051c391c Eric Dumazet 2011-04-21 439 if (ipc.opt->opt.srr)
f6d8bd051c391c Eric Dumazet 2011-04-21 440 daddr = icmp_param->replyopts.opt.opt.faddr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 441 }
77968b78242ee2 David S. Miller 2011-05-08 442 memset(&fl4, 0, sizeof(fl4));
77968b78242ee2 David S. Miller 2011-05-08 443 fl4.daddr = daddr;
35ebf65e851c6d David S. Miller 2012-06-28 444 fl4.saddr = saddr;
e110861f86094c Lorenzo Colitti 2014-05-13 445 fl4.flowi4_mark = mark;
e2d118a1cb5e60 Lorenzo Colitti 2016-11-04 446 fl4.flowi4_uid = sock_net_uid(net, NULL);
0ed373390c5c18 Guillaume Nault 2024-10-22 447 fl4.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip_hdr(skb)));
77968b78242ee2 David S. Miller 2011-05-08 448 fl4.flowi4_proto = IPPROTO_ICMP;
385add906b6155 David Ahern 2015-09-29 449 fl4.flowi4_oif = l3mdev_master_ifindex(skb->dev);
3df98d79215ace Paul Moore 2020-09-27 450 security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4));
9d6ec938019c6b David S. Miller 2011-03-12 451 rt = ip_route_output_key(net, &fl4);
b23dd4fe42b455 David S. Miller 2011-03-02 452 if (IS_ERR(rt))
^1da177e4c3f41 Linus Torvalds 2005-04-16 453 goto out_unlock;
8c2bd38b95f75f Eric Dumazet 2024-08-29 454 if (icmpv4_xrlim_allow(net, rt, &fl4, type, code, apply_ratelimit))
a15c89c703d434 Eric Dumazet 2022-01-24 455 icmp_push_reply(sk, icmp_param, &fl4, &ipc, &rt);
^1da177e4c3f41 Linus Torvalds 2005-04-16 456 ip_rt_put(rt);
^1da177e4c3f41 Linus Torvalds 2005-04-16 457 out_unlock:
405666db84b984 Denis V. Lunev 2008-02-29 458 icmp_xmit_unlock(sk);
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 459 out_bh_enable:
7ba91ecb16824f Jesper Dangaard Brouer 2017-01-09 460 local_bh_enable();
^1da177e4c3f41 Linus Torvalds 2005-04-16 461 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 462
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-02-08 10:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 19:34 [PATCH net-next 0/7] net: deduplicate cookie logic Willem de Bruijn
2025-02-06 19:34 ` [PATCH net-next 1/7] tcp: only initialize sockcm tsflags field Willem de Bruijn
2025-02-06 19:34 ` [PATCH net-next 2/7] net: initialize mark in sockcm_init Willem de Bruijn
2025-02-06 19:34 ` [PATCH net-next 3/7] ipv4: initialize inet socket cookies with sockcm_init Willem de Bruijn
2025-02-06 19:34 ` [PATCH net-next 4/7] ipv4: remove get_rttos Willem de Bruijn
2025-02-07 0:59 ` Willem de Bruijn
2025-02-07 17:33 ` Willem de Bruijn
2025-02-08 9:24 ` kernel test robot
2025-02-06 19:34 ` [PATCH net-next 5/7] icmp: reflect tos through ip cookie rather than updating inet_sk Willem de Bruijn
2025-02-07 1:01 ` Willem de Bruijn
2025-02-08 10:40 ` kernel test robot [this message]
2025-02-06 19:34 ` [PATCH net-next 6/7] ipv6: replace ipcm6_init calls with ipcm6_init_sk Willem de Bruijn
2025-02-06 19:34 ` [PATCH net-next 7/7] ipv6: initialize inet socket cookies with sockcm_init Willem de Bruijn
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=202502081845.hsTDUryC-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.