[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c336c490-e002-48a8-bda7-b095ebde4c33@suswa.mountain>
Date: Wed, 18 Jun 2025 20:26:56 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Jeremy Kerr <jk@...econstruct.com.au>,
Matt Johnston <matt@...econstruct.com.au>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 12/13] net: mctp: add gateway routing support
Hi Jeremy,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Jeremy-Kerr/net-mctp-don-t-use-source-cb-data-when-forwarding-ensure-pkt_type-is-set/20250611-143319
base: 0097c4195b1d0ca57d15979626c769c74747b5a0
patch link: https://lore.kernel.org/r/20250611-dev-forwarding-v1-12-6b69b1feb37f%40codeconstruct.com.au
patch subject: [PATCH net-next 12/13] net: mctp: add gateway routing support
config: csky-randconfig-r073-20250612 (https://download.01.org/0day-ci/archive/20250613/202506131515.a5tCsTj0-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.3.0
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202506131515.a5tCsTj0-lkp@intel.com/
New smatch warnings:
net/mctp/route.c:1381 mctp_route_nlparse_common() error: uninitialized symbol 'gateway'.
vim +/gateway +1381 net/mctp/route.c
33d33bef994e518 Jeremy Kerr 2025-06-11 1350 static int mctp_route_nlparse_common(struct net *net, struct nlmsghdr *nlh,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1351 struct netlink_ext_ack *extack,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1352 struct nlattr **tb, struct rtmsg **rtm,
33d33bef994e518 Jeremy Kerr 2025-06-11 1353 struct mctp_dev **mdev,
75626016e50cb9a Jeremy Kerr 2025-06-11 1354 struct mctp_fq_addr *gatewayp,
33d33bef994e518 Jeremy Kerr 2025-06-11 1355 mctp_eid_t *daddr_start)
06d2f4c583a7d89 Matt Johnston 2021-07-29 1356 {
75626016e50cb9a Jeremy Kerr 2025-06-11 1357 struct mctp_fq_addr *gateway;
75626016e50cb9a Jeremy Kerr 2025-06-11 1358 unsigned int ifindex = 0;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1359 struct net_device *dev;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1360 int rc;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1361
06d2f4c583a7d89 Matt Johnston 2021-07-29 1362 rc = nlmsg_parse(nlh, sizeof(struct rtmsg), tb, RTA_MAX,
06d2f4c583a7d89 Matt Johnston 2021-07-29 1363 rta_mctp_policy, extack);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1364 if (rc < 0) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1365 NL_SET_ERR_MSG(extack, "incorrect format");
06d2f4c583a7d89 Matt Johnston 2021-07-29 1366 return rc;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1367 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1368
06d2f4c583a7d89 Matt Johnston 2021-07-29 1369 if (!tb[RTA_DST]) {
06d2f4c583a7d89 Matt Johnston 2021-07-29 1370 NL_SET_ERR_MSG(extack, "dst EID missing");
06d2f4c583a7d89 Matt Johnston 2021-07-29 1371 return -EINVAL;
06d2f4c583a7d89 Matt Johnston 2021-07-29 1372 }
06d2f4c583a7d89 Matt Johnston 2021-07-29 1373 *daddr_start = nla_get_u8(tb[RTA_DST]);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1374
75626016e50cb9a Jeremy Kerr 2025-06-11 1375 if (tb[RTA_OIF])
06d2f4c583a7d89 Matt Johnston 2021-07-29 1376 ifindex = nla_get_u32(tb[RTA_OIF]);
06d2f4c583a7d89 Matt Johnston 2021-07-29 1377
75626016e50cb9a Jeremy Kerr 2025-06-11 1378 if (tb[RTA_GATEWAY])
75626016e50cb9a Jeremy Kerr 2025-06-11 1379 gateway = nla_data(tb[RTA_GATEWAY]);
Unitialized on else path
06d2f4c583a7d89 Matt Johnston 2021-07-29 1380
75626016e50cb9a Jeremy Kerr 2025-06-11 @1381 if (ifindex && gateway) {
^^^^^^^
warning.
75626016e50cb9a Jeremy Kerr 2025-06-11 1382 NL_SET_ERR_MSG(extack,
75626016e50cb9a Jeremy Kerr 2025-06-11 1383 "cannot specify both ifindex and gateway");
33d33bef994e518 Jeremy Kerr 2025-06-11 1384 return -EINVAL;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists