netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joe Damato <jdamato@fastly.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Joe Damato <jdamato@fastly.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Stanislav Fomichev <sdf@google.com>,
	Amritha Nambiar <amritha.nambiar@intel.com>,
	Larysa Zaremba <larysa.zaremba@intel.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH net-next 1/2] netdev-genl: Add ifname for queue and NAPI APIs
Date: Fri, 23 Feb 2024 04:55:26 +0800	[thread overview]
Message-ID: <202402230429.g2qC2zMK-lkp@intel.com> (raw)
In-Reply-To: <1708531057-67392-2-git-send-email-jdamato@fastly.com>

Hi Joe,

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/Joe-Damato/netdev-genl-Add-ifname-for-queue-and-NAPI-APIs/20240222-000134
base:   net-next/main
patch link:    https://lore.kernel.org/r/1708531057-67392-2-git-send-email-jdamato%40fastly.com
patch subject: [PATCH net-next 1/2] netdev-genl: Add ifname for queue and NAPI APIs
config: powerpc-acadia_defconfig (https://download.01.org/0day-ci/archive/20240223/202402230429.g2qC2zMK-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240223/202402230429.g2qC2zMK-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/202402230429.g2qC2zMK-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/core/netdev-genl.c:388:14: warning: variable 'ifname' is uninitialized when used here [-Wuninitialized]
     388 |         nla_strscpy(ifname, info->attrs[NETDEV_A_QUEUE_IFNAME], IFNAMSIZ);
         |                     ^~~~~~
   net/core/netdev-genl.c:376:14: note: initialize the variable 'ifname' to silence this warning
     376 |         char *ifname;
         |                     ^
         |                      = NULL
   1 warning generated.


vim +/ifname +388 net/core/netdev-genl.c

   370	
   371	int netdev_nl_queue_get_doit(struct sk_buff *skb, struct genl_info *info)
   372	{
   373		u32 q_id, q_type, ifindex;
   374		struct net_device *netdev;
   375		struct sk_buff *rsp;
   376		char *ifname;
   377		int err;
   378	
   379		if (GENL_REQ_ATTR_CHECK(info, NETDEV_A_QUEUE_ID) ||
   380		    GENL_REQ_ATTR_CHECK(info, NETDEV_A_QUEUE_TYPE) ||
   381		    GENL_REQ_ATTR_CHECK(info, NETDEV_A_QUEUE_IFINDEX) ||
   382		    GENL_REQ_ATTR_CHECK(info, NETDEV_A_QUEUE_IFNAME))
   383			return -EINVAL;
   384	
   385		q_id = nla_get_u32(info->attrs[NETDEV_A_QUEUE_ID]);
   386		q_type = nla_get_u32(info->attrs[NETDEV_A_QUEUE_TYPE]);
   387		ifindex = nla_get_u32(info->attrs[NETDEV_A_QUEUE_IFINDEX]);
 > 388		nla_strscpy(ifname, info->attrs[NETDEV_A_QUEUE_IFNAME], IFNAMSIZ);
   389	
   390		rsp = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL);
   391		if (!rsp)
   392			return -ENOMEM;
   393	
   394		rtnl_lock();
   395	
   396		netdev = __dev_get_by_index(genl_info_net(info), ifindex);
   397	
   398		if (strcmp(netdev->name, ifname)) {
   399			err = -ENODEV;
   400		} else {
   401			if (netdev)
   402				err = netdev_nl_queue_fill(rsp, netdev, q_id, q_type, info);
   403			else
   404				err = -ENODEV;
   405		}
   406	
   407		rtnl_unlock();
   408	
   409		if (err)
   410			goto err_free_msg;
   411	
   412		return genlmsg_reply(rsp, info);
   413	
   414	err_free_msg:
   415		nlmsg_free(rsp);
   416		return err;
   417	}
   418	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-02-22 20:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 15:57 [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs Joe Damato
2024-02-21 15:57 ` [PATCH net-next 1/2] netdev-genl: Add ifname for queue and NAPI APIs Joe Damato
2024-02-21 19:12   ` Jakub Kicinski
2024-02-21 19:17     ` Joe Damato
2024-02-21 19:12   ` Nambiar, Amritha
2024-02-21 19:23     ` Joe Damato
2024-02-22 20:55   ` kernel test robot [this message]
2024-02-23 11:21   ` Dan Carpenter
2024-02-21 15:57 ` [PATCH net-next 2/2] netdev-genl: spec: Add ifname to netdev nl YAML spec Joe Damato
2024-02-21 19:09 ` [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs Jakub Kicinski
2024-02-21 19:21   ` Joe Damato
2024-02-21 19:26     ` Jakub Kicinski
2024-02-21 19:29       ` Joe Damato

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=202402230429.g2qC2zMK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=ast@kernel.org \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lorenzo@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sdf@google.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=tariqt@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).