net/xfrm/xfrm_user.c:3328:10: sparse: sparse: Initializer entry defined twice
From: kernel test robot
Date: Thu Dec 03 2026 - 02:32:54 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
commit: d87f8bc47fbf012a7f115e311d0603d97e47c34c xfrm: avoid RCU warnings around the per-netns netlink socket
date: 9 months ago
config: csky-randconfig-r2311-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203082555.hVjTncTS-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203082555.hVjTncTS-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
| Fixes: d87f8bc47fbf ("xfrm: avoid RCU warnings around the per-netns netlink socket")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261203082555.hVjTncTS-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
>> net/xfrm/xfrm_user.c:3328:10: sparse: sparse: Initializer entry defined twice
net/xfrm/xfrm_user.c:3334:10: sparse: also defined here
vim +3328 net/xfrm/xfrm_user.c
492b558b319131 Thomas Graf 2005-05-03 3326
5106f4a8acff48 Dmitry Safonov 2020-09-21 3327 const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
a4a87fa4e96c77 Antony Antony 2024-04-30 @3328 [XFRMA_UNSPEC] = { .strict_start_type = XFRMA_SA_DIR },
c28e93040b497e jamal 2010-02-09 3329 [XFRMA_SA] = { .len = sizeof(struct xfrm_usersa_info)},
c28e93040b497e jamal 2010-02-09 3330 [XFRMA_POLICY] = { .len = sizeof(struct xfrm_userpolicy_info)},
c28e93040b497e jamal 2010-02-09 3331 [XFRMA_LASTUSED] = { .type = NLA_U64},
c28e93040b497e jamal 2010-02-09 3332 [XFRMA_ALG_AUTH_TRUNC] = { .len = sizeof(struct xfrm_algo_auth)},
1a6509d991225a Herbert Xu 2008-01-28 3333 [XFRMA_ALG_AEAD] = { .len = sizeof(struct xfrm_algo_aead) },
cf5cb79f694606 Thomas Graf 2007-08-22 3334 [XFRMA_ALG_AUTH] = { .len = sizeof(struct xfrm_algo) },
cf5cb79f694606 Thomas Graf 2007-08-22 3335 [XFRMA_ALG_CRYPT] = { .len = sizeof(struct xfrm_algo) },
cf5cb79f694606 Thomas Graf 2007-08-22 3336 [XFRMA_ALG_COMP] = { .len = sizeof(struct xfrm_algo) },
cf5cb79f694606 Thomas Graf 2007-08-22 3337 [XFRMA_ENCAP] = { .len = sizeof(struct xfrm_encap_tmpl) },
cf5cb79f694606 Thomas Graf 2007-08-22 3338 [XFRMA_TMPL] = { .len = sizeof(struct xfrm_user_tmpl) },
d1e0e61d617ba1 Lin Ma 2023-06-30 3339 [XFRMA_SEC_CTX] = { .len = sizeof(struct xfrm_user_sec_ctx) },
cf5cb79f694606 Thomas Graf 2007-08-22 3340 [XFRMA_LTIME_VAL] = { .len = sizeof(struct xfrm_lifetime_cur) },
cf5cb79f694606 Thomas Graf 2007-08-22 3341 [XFRMA_REPLAY_VAL] = { .len = sizeof(struct xfrm_replay_state) },
cf5cb79f694606 Thomas Graf 2007-08-22 3342 [XFRMA_REPLAY_THRESH] = { .type = NLA_U32 },
cf5cb79f694606 Thomas Graf 2007-08-22 3343 [XFRMA_ETIMER_THRESH] = { .type = NLA_U32 },
cf5cb79f694606 Thomas Graf 2007-08-22 3344 [XFRMA_SRCADDR] = { .len = sizeof(xfrm_address_t) },
cf5cb79f694606 Thomas Graf 2007-08-22 3345 [XFRMA_COADDR] = { .len = sizeof(xfrm_address_t) },
cf5cb79f694606 Thomas Graf 2007-08-22 3346 [XFRMA_POLICY_TYPE] = { .len = sizeof(struct xfrm_userpolicy_type)},
cf5cb79f694606 Thomas Graf 2007-08-22 3347 [XFRMA_MIGRATE] = { .len = sizeof(struct xfrm_user_migrate) },
13c1d18931ebb5 Arnaud Ebalard 2008-10-05 3348 [XFRMA_KMADDRESS] = { .len = sizeof(struct xfrm_user_kmaddress) },
6f26b61e177e57 Jamal Hadi Salim 2010-02-22 3349 [XFRMA_MARK] = { .len = sizeof(struct xfrm_mark) },
35d2856b4693e8 Martin Willi 2010-12-08 3350 [XFRMA_TFCPAD] = { .type = NLA_U32 },
d8647b79c3b7e2 Steffen Klassert 2011-03-08 3351 [XFRMA_REPLAY_ESN_VAL] = { .len = sizeof(struct xfrm_replay_state_esn) },
a947b0a93efa9a Nicolas Dichtel 2013-02-22 3352 [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 },
d3623099d3509f Nicolas Dichtel 2014-02-14 3353 [XFRMA_PROTO] = { .type = NLA_U8 },
870a2df4ca0268 Nicolas Dichtel 2014-03-06 3354 [XFRMA_ADDRESS_FILTER] = { .len = sizeof(struct xfrm_address_filter) },
d77e38e612a017 Steffen Klassert 2017-04-14 3355 [XFRMA_OFFLOAD_DEV] = { .len = sizeof(struct xfrm_user_offload) },
9b42c1f179a614 Steffen Klassert 2018-06-12 3356 [XFRMA_SET_MARK] = { .type = NLA_U32 },
9b42c1f179a614 Steffen Klassert 2018-06-12 3357 [XFRMA_SET_MARK_MASK] = { .type = NLA_U32 },
7e6526404adedf Steffen Klassert 2018-06-12 3358 [XFRMA_IF_ID] = { .type = NLA_U32 },
5e2424708da720 Lin Ma 2023-07-23 3359 [XFRMA_MTIMER_THRESH] = { .type = NLA_U32 },
a4a87fa4e96c77 Antony Antony 2024-04-30 3360 [XFRMA_SA_DIR] = NLA_POLICY_RANGE(NLA_U8, XFRM_SA_DIR_IN, XFRM_SA_DIR_OUT),
f531d13bdfe3f4 Eyal Birger 2024-05-27 3361 [XFRMA_NAT_KEEPALIVE_INTERVAL] = { .type = NLA_U32 },
1ddf9916ac0931 Steffen Klassert 2024-10-23 3362 [XFRMA_SA_PCPU] = { .type = NLA_U32 },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3363 [XFRMA_IPTFS_DROP_TIME] = { .type = NLA_U32 },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3364 [XFRMA_IPTFS_REORDER_WINDOW] = { .type = NLA_U16 },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3365 [XFRMA_IPTFS_DONT_FRAG] = { .type = NLA_FLAG },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3366 [XFRMA_IPTFS_INIT_DELAY] = { .type = NLA_U32 },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3367 [XFRMA_IPTFS_MAX_QSIZE] = { .type = NLA_U32 },
f69eb4f65c58f5 Christian Hopps 2024-11-14 3368 [XFRMA_IPTFS_PKT_SIZE] = { .type = NLA_U32 },
cf5cb79f694606 Thomas Graf 2007-08-22 3369 };
5106f4a8acff48 Dmitry Safonov 2020-09-21 3370 EXPORT_SYMBOL_GPL(xfrma_policy);
cf5cb79f694606 Thomas Graf 2007-08-22 3371
:::::: The code at line 3328 was first introduced by commit
:::::: a4a87fa4e96c7746e009de06a567688fd9af6013 xfrm: Add Direction to the SA in or out
:::::: TO: Antony Antony <antony.antony@xxxxxxxxxxx>
:::::: CC: Steffen Klassert <steffen.klassert@xxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki