From: kernel test robot <lkp@intel.com>
To: Wei Wang <weibunny.kernel@gmail.com>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Daniel Zahka <daniel.zahka@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
David Wei <dw@davidwei.uk>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, Wei Wang <weibunny@fb.com>
Subject: Re: [PATCH v9 net-next 2/5] psp: add new netlink cmd for dev-assoc and dev-disassoc
Date: Wed, 1 Apr 2026 07:43:02 +0800 [thread overview]
Message-ID: <202604010708.Yck6IfPj-lkp@intel.com> (raw)
In-Reply-To: <20260330223143.2394706-3-weibunny.kernel@gmail.com>
Hi Wei,
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/Wei-Wang/psp-add-admin-non-admin-version-of-psp_device_get_locked/20260331-065558
base: net-next/main
patch link: https://lore.kernel.org/r/20260330223143.2394706-3-weibunny.kernel%40gmail.com
patch subject: [PATCH v9 net-next 2/5] psp: add new netlink cmd for dev-assoc and dev-disassoc
config: sh-randconfig-r113-20260401 (https://download.01.org/0day-ci/archive/20260401/202604010708.Yck6IfPj-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604010708.Yck6IfPj-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604010708.Yck6IfPj-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> net/psp/psp_nl.c:494:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct psp_dev [noderef] __rcu *_n_ @@ got struct psp_dev *psd @@
net/psp/psp_nl.c:494:13: sparse: expected struct psp_dev [noderef] __rcu *_n_
net/psp/psp_nl.c:494:13: sparse: got struct psp_dev *psd
vim +494 net/psp/psp_nl.c
449
450 int psp_nl_dev_assoc_doit(struct sk_buff *skb, struct genl_info *info)
451 {
452 struct psp_dev *psd = info->user_ptr[0];
453 struct psp_assoc_dev *psp_assoc_dev;
454 struct net_device *assoc_dev;
455 u32 assoc_ifindex;
456 struct sk_buff *rsp;
457 struct net *net;
458 int nsid;
459
460 if (GENL_REQ_ATTR_CHECK(info, PSP_A_DEV_IFINDEX))
461 return -EINVAL;
462
463 if (info->attrs[PSP_A_DEV_NSID]) {
464 nsid = nla_get_s32(info->attrs[PSP_A_DEV_NSID]);
465
466 net = get_net_ns_by_id(genl_info_net(info), nsid);
467 if (!net) {
468 NL_SET_BAD_ATTR(info->extack,
469 info->attrs[PSP_A_DEV_NSID]);
470 return -EINVAL;
471 }
472 } else {
473 net = get_net(genl_info_net(info));
474 }
475
476 psp_assoc_dev = kzalloc(sizeof(*psp_assoc_dev), GFP_KERNEL);
477 if (!psp_assoc_dev) {
478 put_net(net);
479 return -ENOMEM;
480 }
481
482 assoc_ifindex = nla_get_u32(info->attrs[PSP_A_DEV_IFINDEX]);
483 assoc_dev = netdev_get_by_index(net, assoc_ifindex,
484 &psp_assoc_dev->dev_tracker,
485 GFP_KERNEL);
486 if (!assoc_dev) {
487 put_net(net);
488 kfree(psp_assoc_dev);
489 NL_SET_BAD_ATTR(info->extack, info->attrs[PSP_A_DEV_IFINDEX]);
490 return -ENODEV;
491 }
492
493 /* Check if device is already associated with a PSP device */
> 494 if (cmpxchg(&assoc_dev->psp_dev, NULL, psd)) {
495 NL_SET_ERR_MSG(info->extack,
496 "Device already associated with a PSP device");
497 netdev_put(assoc_dev, &psp_assoc_dev->dev_tracker);
498 put_net(net);
499 kfree(psp_assoc_dev);
500 return -EBUSY;
501 }
502
503 psp_assoc_dev->assoc_dev = assoc_dev;
504 rsp = psp_nl_reply_new(info);
505 if (!rsp) {
506 rcu_assign_pointer(assoc_dev->psp_dev, NULL);
507 netdev_put(assoc_dev, &psp_assoc_dev->dev_tracker);
508 put_net(net);
509 kfree(psp_assoc_dev);
510 return -ENOMEM;
511 }
512
513 list_add_tail(&psp_assoc_dev->dev_list, &psd->assoc_dev_list);
514
515 put_net(net);
516
517 psp_nl_notify_dev(psd, PSP_CMD_DEV_CHANGE_NTF);
518
519 return psp_nl_reply_send(rsp, info);
520 }
521
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-31 23:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 22:31 [PATCH v9 net-next 0/5] psp: Add support for dev-assoc/disassoc Wei Wang
2026-03-30 22:31 ` [PATCH v9 net-next 1/5] psp: add admin/non-admin version of psp_device_get_locked Wei Wang
2026-03-30 22:31 ` [PATCH v9 net-next 2/5] psp: add new netlink cmd for dev-assoc and dev-disassoc Wei Wang
2026-03-31 13:03 ` Daniel Zahka
2026-03-31 21:48 ` Wei Wang
2026-03-31 23:43 ` kernel test robot [this message]
2026-03-30 22:31 ` [PATCH v9 net-next 3/5] psp: add a new netdev event for dev unregister Wei Wang
2026-03-31 13:30 ` Daniel Zahka
2026-03-31 21:51 ` Wei Wang
2026-04-01 13:02 ` Daniel Zahka
2026-04-01 21:39 ` Wei Wang
2026-03-30 22:31 ` [PATCH v9 net-next 4/5] selftests/net: Add bpf skb forwarding program Wei Wang
2026-03-30 22:31 ` [PATCH v9 net-next 5/5] selftest/net: psp: Add test for dev-assoc/disassoc Wei Wang
2026-03-31 14:04 ` Daniel Zahka
2026-03-31 22:09 ` Wei Wang
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=202604010708.Yck6IfPj-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=weibunny.kernel@gmail.com \
--cc=weibunny@fb.com \
--cc=willemdebruijn.kernel@gmail.com \
/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.