From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android17-6.18 2/2] net/xfrm/xfrm_state.c:3320:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 18 Jul 2026 07:43:17 +0800 [thread overview]
Message-ID: <202607180715.2ivHmzKC-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android17-6.18
head: 3e53bdbe8bc90023e80d8bdf7a6ab8bf5d13fcc0
commit: f2bc8231fd43a02f9d97252b3435869727054d60 [2/2] xfrm: check all hash buckets for leftover states during netns deletion
config: x86_64-randconfig-r122-20260718 (https://download.01.org/0day-ci/archive/20260718/202607180715.2ivHmzKC-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/202607180715.2ivHmzKC-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
| Fixes: f2bc8231fd43 ("xfrm: check all hash buckets for leftover states during netns deletion")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607180715.2ivHmzKC-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/xfrm/xfrm_state.c:1737:9: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1744:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1744:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1744:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1751:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1751:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1751:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1871:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1871:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1871:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:1874:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:1874:17: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:1874:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2506:9: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2605:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct hlist_head *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:2605:25: sparse: expected struct hlist_head *h
net/xfrm/xfrm_state.c:2605:25: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3270:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_bydst @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3270:31: sparse: expected struct hlist_head [noderef] __rcu *state_bydst
net/xfrm/xfrm_state.c:3270:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3273:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_bysrc @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3273:31: sparse: expected struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3273:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3276:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_byspi @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3276:31: sparse: expected struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3276:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3279:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct hlist_head [noderef] __rcu *state_byseq @@ got struct hlist_head * @@
net/xfrm/xfrm_state.c:3279:31: sparse: expected struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3279:31: sparse: got struct hlist_head *
net/xfrm/xfrm_state.c:3297:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byseq @@
net/xfrm/xfrm_state.c:3297:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3297:33: sparse: got struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3299:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byspi @@
net/xfrm/xfrm_state.c:3299:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3299:33: sparse: got struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3301:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bysrc @@
net/xfrm/xfrm_state.c:3301:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3301:33: sparse: got struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3303:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bydst @@
net/xfrm/xfrm_state.c:3303:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3303:33: sparse: got struct hlist_head [noderef] __rcu *state_bydst
>> net/xfrm/xfrm_state.c:3320:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3320:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3320:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3321:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3321:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3321:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3322:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3322:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3322:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3323:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head const *h @@ got struct hlist_head [noderef] __rcu * @@
net/xfrm/xfrm_state.c:3323:17: sparse: expected struct hlist_head const *h
net/xfrm/xfrm_state.c:3323:17: sparse: got struct hlist_head [noderef] __rcu *
net/xfrm/xfrm_state.c:3327:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byseq @@
net/xfrm/xfrm_state.c:3327:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3327:33: sparse: got struct hlist_head [noderef] __rcu *state_byseq
net/xfrm/xfrm_state.c:3328:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_byspi @@
net/xfrm/xfrm_state.c:3328:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3328:33: sparse: got struct hlist_head [noderef] __rcu *state_byspi
net/xfrm/xfrm_state.c:3329:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bysrc @@
net/xfrm/xfrm_state.c:3329:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3329:33: sparse: got struct hlist_head [noderef] __rcu *state_bysrc
net/xfrm/xfrm_state.c:3330:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct hlist_head *n @@ got struct hlist_head [noderef] __rcu *state_bydst @@
net/xfrm/xfrm_state.c:3330:33: sparse: expected struct hlist_head *n
net/xfrm/xfrm_state.c:3330:33: sparse: got struct hlist_head [noderef] __rcu *state_bydst
net/xfrm/xfrm_state.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/uio.h, include/linux/socket.h, ...):
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_register_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_unregister_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_get_type' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_register_type_offload' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_unregister_type_offload' - unexpected unlock
include/linux/rcupdate.h:897:25: sparse: sparse: context imbalance in 'xfrm_set_type_offload' - unexpected unlock
net/xfrm/xfrm_state.c:934:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:976:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:1655:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:58:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
net/xfrm/xfrm_state.c:58:39: sparse: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: sparse: got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:1778:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:1814:9: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2094:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2113:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c:2315:17: sparse: sparse: dereference of noderef expression
net/xfrm/xfrm_state.c: note: in included file:
include/net/xfrm.h:1971:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/net/xfrm.h:1971:16: sparse: struct sock [noderef] __rcu *
include/net/xfrm.h:1971:16: sparse: struct sock *
vim +3320 net/xfrm/xfrm_state.c
3307
3308 void xfrm_state_fini(struct net *net)
3309 {
3310 unsigned int sz;
3311 int i;
3312
3313 flush_work(&net->xfrm.state_hash_work);
3314 xfrm_state_flush(net, 0, false);
3315 flush_work(&xfrm_state_gc_work);
3316
3317 WARN_ON(!list_empty(&net->xfrm.state_all));
3318
3319 for (i = 0; i <= net->xfrm.state_hmask; i++) {
> 3320 WARN_ON(!hlist_empty(net->xfrm.state_byseq + i));
3321 WARN_ON(!hlist_empty(net->xfrm.state_byspi + i));
3322 WARN_ON(!hlist_empty(net->xfrm.state_bysrc + i));
3323 WARN_ON(!hlist_empty(net->xfrm.state_bydst + i));
3324 }
3325
3326 sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
3327 xfrm_hash_free(net->xfrm.state_byseq, sz);
3328 xfrm_hash_free(net->xfrm.state_byspi, sz);
3329 xfrm_hash_free(net->xfrm.state_bysrc, sz);
3330 xfrm_hash_free(net->xfrm.state_bydst, sz);
3331 free_percpu(net->xfrm.state_cache_input);
3332 }
3333
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-17 23:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202607180715.2ivHmzKC-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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.