All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Wei <dw@davidwei.uk>, Jakub Kicinski <kuba@kernel.org>,
	Jiri Pirko <jiri@resnulli.us>,
	Sabrina Dubroca <sd@queasysnail.net>,
	netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v7 1/4] netdevsim: allow two netdevsim ports to be connected
Date: Sun, 28 Jan 2024 06:48:51 +0800	[thread overview]
Message-ID: <202401280644.lnmk82jI-lkp@intel.com> (raw)
In-Reply-To: <20240127040354.944744-2-dw@davidwei.uk>

Hi David,

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/David-Wei/netdevsim-allow-two-netdevsim-ports-to-be-connected/20240127-121234
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240127040354.944744-2-dw%40davidwei.uk
patch subject: [PATCH net-next v7 1/4] netdevsim: allow two netdevsim ports to be connected
config: x86_64-randconfig-r122-20240127 (https://download.01.org/0day-ci/archive/20240128/202401280644.lnmk82jI-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240128/202401280644.lnmk82jI-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/202401280644.lnmk82jI-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/netdevsim/bus.c:349:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct netdevsim *peer @@     got struct netdevsim [noderef] __rcu *peer @@
   drivers/net/netdevsim/bus.c:349:14: sparse:     expected struct netdevsim *peer
   drivers/net/netdevsim/bus.c:349:14: sparse:     got struct netdevsim [noderef] __rcu *peer

vim +349 drivers/net/netdevsim/bus.c

   311	
   312	static ssize_t unlink_device_store(const struct bus_type *bus, const char *buf, size_t count)
   313	{
   314		struct netdevsim *nsim, *peer;
   315		unsigned int netnsid, ifidx;
   316		struct net_device *dev;
   317		struct net *ns;
   318		int err;
   319	
   320		err = sscanf(buf, "%u:%u", &netnsid, &ifidx);
   321		if (err != 2) {
   322			pr_err("Format for unlinking a device is \"netnsid:ifidx\" (uint uint).\n");
   323			return -EINVAL;
   324		}
   325	
   326		err = -EINVAL;
   327		rtnl_lock();
   328		ns = get_net_ns_by_id(current->nsproxy->net_ns, netnsid);
   329		if (!ns) {
   330			pr_err("Could not find netns with id: %u\n", netnsid);
   331			goto out_unlock_rtnl;
   332		}
   333	
   334		dev = __dev_get_by_index(ns, ifidx);
   335		if (!dev) {
   336			pr_err("Could not find device with ifindex %u in netnsid %u\n", ifidx, netnsid);
   337			goto out_put_netns;
   338		}
   339	
   340		if (!netdev_is_nsim(dev)) {
   341			pr_err("Device with ifindex %u in netnsid %u is not a netdevsim\n", ifidx, netnsid);
   342			goto out_put_netns;
   343		}
   344	
   345		err = 0;
   346		nsim = netdev_priv(dev);
   347		if (!nsim->peer)
   348			goto out_put_netns;
 > 349		peer = nsim->peer;
   350	
   351		RCU_INIT_POINTER(nsim->peer, NULL);
   352		RCU_INIT_POINTER(peer->peer, NULL);
   353	
   354	out_put_netns:
   355		put_net(ns);
   356	out_unlock_rtnl:
   357		rtnl_unlock();
   358	
   359		return !err ? count : err;
   360	}
   361	static BUS_ATTR_WO(unlink_device);
   362	

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

  reply	other threads:[~2024-01-27 22:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27  4:03 [PATCH net-next v7 0/4] netdevsim: link and forward skbs between ports David Wei
2024-01-27  4:03 ` [PATCH net-next v7 1/4] netdevsim: allow two netdevsim ports to be connected David Wei
2024-01-27 22:48   ` kernel test robot [this message]
2024-01-27  4:03 ` [PATCH net-next v7 2/4] netdevsim: forward skbs from one connected port to another David Wei
2024-01-27  4:03 ` [PATCH net-next v7 3/4] netdevsim: add selftest for forwarding skb between connected ports David Wei
2024-01-29 20:34   ` Simon Horman
2024-01-30 18:57     ` David Wei
2024-02-02 10:22       ` Simon Horman
2024-01-27  4:03 ` [PATCH net-next v7 4/4] netdevsim: add Makefile for selftests David Wei

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=202401280644.lnmk82jI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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.