lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408220027.kA3pRF6J-lkp@intel.com>
Date: Thu, 22 Aug 2024 00:52:44 +0800
From: kernel test robot <lkp@...el.com>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Jakub Kicinski <kuba@...nel.org>,
	Jiri Pirko <jiri@...nulli.us>,
	Madhu Chittim <madhu.chittim@...el.com>,
	Sridhar Samudrala <sridhar.samudrala@...el.com>,
	Simon Horman <horms@...nel.org>,
	John Fastabend <john.fastabend@...il.com>,
	Sunil Kovvuri Goutham <sgoutham@...vell.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Donald Hunter <donald.hunter@...il.com>
Subject: Re: [PATCH v4 net-next 09/12] testing: net-drv: add basic shaper test

Hi Paolo,

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/Paolo-Abeni/tools-ynl-lift-an-assumption-about-spec-file-name/20240820-231626
base:   net-next/main
patch link:    https://lore.kernel.org/r/4cf74f285fa5f07be546cb83ef96775f86aa0dbf.1724165948.git.pabeni%40redhat.com
patch subject: [PATCH v4 net-next 09/12] testing: net-drv: add basic shaper test
config: hexagon-randconfig-r112-20240821 (https://download.01.org/0day-ci/archive/20240822/202408220027.kA3pRF6J-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce: (https://download.01.org/0day-ci/archive/20240822/202408220027.kA3pRF6J-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408220027.kA3pRF6J-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/shaper/shaper.c:227:24: sparse: sparse: Using plain integer as NULL pointer

vim +227 net/shaper/shaper.c

d8a22f9bfdaade Paolo Abeni 2024-08-20  208  
d8a22f9bfdaade Paolo Abeni 2024-08-20  209  /* Allocate on demand the per device shaper's cache. */
d8a22f9bfdaade Paolo Abeni 2024-08-20  210  static struct mutex *net_shaper_cache_init(struct net_device *dev,
d8a22f9bfdaade Paolo Abeni 2024-08-20  211  					   struct netlink_ext_ack *extack)
d8a22f9bfdaade Paolo Abeni 2024-08-20  212  {
d8a22f9bfdaade Paolo Abeni 2024-08-20  213  	struct net_shaper_data *new, *data = READ_ONCE(dev->net_shaper_data);
d8a22f9bfdaade Paolo Abeni 2024-08-20  214  
d8a22f9bfdaade Paolo Abeni 2024-08-20  215  	if (!data) {
d8a22f9bfdaade Paolo Abeni 2024-08-20  216  		new = kmalloc(sizeof(*dev->net_shaper_data), GFP_KERNEL);
d8a22f9bfdaade Paolo Abeni 2024-08-20  217  		if (!new) {
d8a22f9bfdaade Paolo Abeni 2024-08-20  218  			NL_SET_ERR_MSG(extack, "Can't allocate memory for shaper data");
d8a22f9bfdaade Paolo Abeni 2024-08-20  219  			return NULL;
d8a22f9bfdaade Paolo Abeni 2024-08-20  220  		}
d8a22f9bfdaade Paolo Abeni 2024-08-20  221  
d8a22f9bfdaade Paolo Abeni 2024-08-20  222  		mutex_init(&new->lock);
d8a22f9bfdaade Paolo Abeni 2024-08-20  223  		xa_init(&new->shapers);
d8a22f9bfdaade Paolo Abeni 2024-08-20  224  		idr_init(&new->node_ids);
d8a22f9bfdaade Paolo Abeni 2024-08-20  225  
d8a22f9bfdaade Paolo Abeni 2024-08-20  226  		/* No lock acquired yet, we can race with other operations. */
d8a22f9bfdaade Paolo Abeni 2024-08-20 @227  		data = cmpxchg(&dev->net_shaper_data, NULL, new);
d8a22f9bfdaade Paolo Abeni 2024-08-20  228  		if (!data)
d8a22f9bfdaade Paolo Abeni 2024-08-20  229  			data = new;
d8a22f9bfdaade Paolo Abeni 2024-08-20  230  		else
d8a22f9bfdaade Paolo Abeni 2024-08-20  231  			kfree(new);
d8a22f9bfdaade Paolo Abeni 2024-08-20  232  	}
d8a22f9bfdaade Paolo Abeni 2024-08-20  233  	return &data->lock;
d8a22f9bfdaade Paolo Abeni 2024-08-20  234  }
d8a22f9bfdaade Paolo Abeni 2024-08-20  235  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ