Re: [PATCH net-next 04/24] net: Use nested-BH locking for napi_alloc_cache.
From: kernel test robot <hidden>
Date: 2023-12-16 04:44:05
Also in:
lkml, oe-kbuild-all
Hi Sebastian, 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/Sebastian-Andrzej-Siewior/locking-local_lock-Introduce-guard-definition-for-local_lock/20231216-011911 base: net-next/main patch link: https://lore.kernel.org/r/20231215171020.687342-5-bigeasy%40linutronix.de patch subject: [PATCH net-next 04/24] net: Use nested-BH locking for napi_alloc_cache. config: x86_64-randconfig-121-20231216 (https://download.01.org/0day-ci/archive/20231216/202312161210.q8xdLxsl-lkp@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231216/202312161210.q8xdLxsl-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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202312161210.q8xdLxsl-lkp@intel.com/ (local) sparse warnings: (new ones prefixed by >>)
quoted
net/core/skbuff.c:302:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct local_lock_t [usertype] *l @@ got struct local_lock_t [noderef] __percpu * @@
net/core/skbuff.c:302:38: sparse: expected struct local_lock_t [usertype] *l net/core/skbuff.c:302:38: sparse: got struct local_lock_t [noderef] __percpu * net/core/skbuff.c:331:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct local_lock_t [usertype] *l @@ got struct local_lock_t [noderef] __percpu * @@ net/core/skbuff.c:331:38: sparse: expected struct local_lock_t [usertype] *l net/core/skbuff.c:331:38: sparse: got struct local_lock_t [noderef] __percpu * net/core/skbuff.c:734:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct local_lock_t [usertype] *l @@ got struct local_lock_t [noderef] __percpu * @@ net/core/skbuff.c:734:17: sparse: expected struct local_lock_t [usertype] *l net/core/skbuff.c:734:17: sparse: got struct local_lock_t [noderef] __percpu * net/core/skbuff.c:806:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct local_lock_t [usertype] *l @@ got struct local_lock_t [noderef] __percpu * @@ net/core/skbuff.c:806:9: sparse: expected struct local_lock_t [usertype] *l net/core/skbuff.c:806:9: sparse: got struct local_lock_t [noderef] __percpu * net/core/skbuff.c:1317:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct local_lock_t [usertype] *l @@ got struct local_lock_t [noderef] __percpu * @@ net/core/skbuff.c:1317:38: sparse: expected struct local_lock_t [usertype] *l net/core/skbuff.c:1317:38: sparse: got struct local_lock_t [noderef] __percpu * net/core/skbuff.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...): include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false net/core/skbuff.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
quoted
include/linux/local_lock.h:71:1: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t [usertype] * @@
include/linux/local_lock.h:71:1: sparse: expected void const [noderef] __percpu *__vpp_verify include/linux/local_lock.h:71:1: sparse: got struct local_lock_t [usertype] *
quoted
include/linux/local_lock.h:71:1: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t [usertype] * @@
include/linux/local_lock.h:71:1: sparse: expected void const [noderef] __percpu *__vpp_verify include/linux/local_lock.h:71:1: sparse: got struct local_lock_t [usertype] *
quoted
include/linux/local_lock.h:71:1: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct local_lock_t [usertype] * @@
include/linux/local_lock.h:71:1: sparse: expected void const [noderef] __percpu *__vpp_verify
include/linux/local_lock.h:71:1: sparse: got struct local_lock_t [usertype] *
net/core/skbuff.c: note: in included file (through include/net/net_namespace.h, include/linux/inet.h):
include/linux/skbuff.h:2715:28: sparse: sparse: self-comparison always evaluates to false
net/core/skbuff.c: note: in included file (through include/linux/skbuff.h, include/net/net_namespace.h, include/linux/inet.h):
include/net/checksum.h:33:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@
include/net/checksum.h:33:39: sparse: expected restricted __wsum [usertype] sum
include/net/checksum.h:33:39: sparse: got unsigned int
vim +302 net/core/skbuff.c
296
297 void *__napi_alloc_frag_align(unsigned int fragsz, unsigned int align_mask)
298 {
299 struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
300
301 fragsz = SKB_DATA_ALIGN(fragsz);
> 302 guard(local_lock_nested_bh)(&napi_alloc_cache.bh_lock);
303
304 return page_frag_alloc_align(&nc->page, fragsz, GFP_ATOMIC, align_mask);
305 }
306 EXPORT_SYMBOL(__napi_alloc_frag_align);
307
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki