Re: [PATCH v7 net-next 1/4] net: add generic percpu page_pool allocator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lorenzo,

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/Lorenzo-Bianconi/net-add-generic-percpu-page_pool-allocator/20240202-162516
base:   net-next/main
patch link:    https://lore.kernel.org/r/1d34b717f8f842b9c3e9f70f0e8ffd245a5d2460.1706861261.git.lorenzo%40kernel.org
patch subject: [PATCH v7 net-next 1/4] net: add generic percpu page_pool allocator
config: x86_64-randconfig-121-20240203 (https://download.01.org/0day-ci/archive/20240203/202402032223.Imbb9JgJ-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402032223.Imbb9JgJ-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402032223.Imbb9JgJ-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   net/core/dev.c:3364:23: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned int @@
   net/core/dev.c:3364:23: sparse:     expected restricted __wsum [usertype] csum
   net/core/dev.c:3364:23: sparse:     got unsigned int
   net/core/dev.c:3364:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:11809:34: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct page_pool * @@
   net/core/dev.c:11809:34: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/core/dev.c:11809:34: sparse:     got struct page_pool *
   net/core/dev.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   net/core/dev.c:205:9: sparse: sparse: context imbalance in 'unlist_netdevice' - different lock contexts for basic block
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   net/core/dev.c:3804:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   net/core/dev.c:5184:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
>> net/core/dev.c:11809:34: sparse: sparse: dereference of noderef expression

vim +11809 net/core/dev.c

 11722	
 11723	/*
 11724	 *       This is called single threaded during boot, so no need
 11725	 *       to take the rtnl semaphore.
 11726	 */
 11727	static int __init net_dev_init(void)
 11728	{
 11729		int i, rc = -ENOMEM;
 11730	
 11731		BUG_ON(!dev_boot_phase);
 11732	
 11733		net_dev_struct_check();
 11734	
 11735		if (dev_proc_init())
 11736			goto out;
 11737	
 11738		if (netdev_kobject_init())
 11739			goto out;
 11740	
 11741		INIT_LIST_HEAD(&ptype_all);
 11742		for (i = 0; i < PTYPE_HASH_SIZE; i++)
 11743			INIT_LIST_HEAD(&ptype_base[i]);
 11744	
 11745		if (register_pernet_subsys(&netdev_net_ops))
 11746			goto out;
 11747	
 11748		/*
 11749		 *	Initialise the packet receive queues.
 11750		 */
 11751	
 11752		for_each_possible_cpu(i) {
 11753			struct work_struct *flush = per_cpu_ptr(&flush_works, i);
 11754			struct softnet_data *sd = &per_cpu(softnet_data, i);
 11755	
 11756			INIT_WORK(flush, flush_backlog);
 11757	
 11758			skb_queue_head_init(&sd->input_pkt_queue);
 11759			skb_queue_head_init(&sd->process_queue);
 11760	#ifdef CONFIG_XFRM_OFFLOAD
 11761			skb_queue_head_init(&sd->xfrm_backlog);
 11762	#endif
 11763			INIT_LIST_HEAD(&sd->poll_list);
 11764			sd->output_queue_tailp = &sd->output_queue;
 11765	#ifdef CONFIG_RPS
 11766			INIT_CSD(&sd->csd, rps_trigger_softirq, sd);
 11767			sd->cpu = i;
 11768	#endif
 11769			INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
 11770			spin_lock_init(&sd->defer_lock);
 11771	
 11772			init_gro_hash(&sd->backlog);
 11773			sd->backlog.poll = process_backlog;
 11774			sd->backlog.weight = weight_p;
 11775	
 11776			if (net_page_pool_create(i))
 11777				goto out;
 11778		}
 11779	
 11780		dev_boot_phase = 0;
 11781	
 11782		/* The loopback device is special if any other network devices
 11783		 * is present in a network namespace the loopback device must
 11784		 * be present. Since we now dynamically allocate and free the
 11785		 * loopback device ensure this invariant is maintained by
 11786		 * keeping the loopback device as the first device on the
 11787		 * list of network devices.  Ensuring the loopback devices
 11788		 * is the first device that appears and the last network device
 11789		 * that disappears.
 11790		 */
 11791		if (register_pernet_device(&loopback_net_ops))
 11792			goto out;
 11793	
 11794		if (register_pernet_device(&default_device_ops))
 11795			goto out;
 11796	
 11797		open_softirq(NET_TX_SOFTIRQ, net_tx_action);
 11798		open_softirq(NET_RX_SOFTIRQ, net_rx_action);
 11799	
 11800		rc = cpuhp_setup_state_nocalls(CPUHP_NET_DEV_DEAD, "net/dev:dead",
 11801					       NULL, dev_cpu_dead);
 11802		WARN_ON(rc < 0);
 11803		rc = 0;
 11804	out:
 11805		if (rc < 0) {
 11806			for_each_possible_cpu(i) {
 11807				struct page_pool *pp_ptr;
 11808	
 11809				pp_ptr = per_cpu_ptr(system_page_pool, i);
 11810				if (!pp_ptr)
 11811					continue;
 11812	
 11813				page_pool_destroy(pp_ptr);
 11814				per_cpu(system_page_pool, i) = NULL;
 11815			}
 11816		}
 11817	
 11818		return rc;
 11819	}
 11820	

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux