* Re: [PATCH mptcp-next v9 07/23] mptcp: implement mptcp_userspace_pm_dump_addr
[not found] <fe0b361ec239de2c02192c729a083c45f301e559.1705375746.git.tanggeliang@kylinos.cn>
@ 2024-01-17 10:11 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-17 10:11 UTC (permalink / raw)
To: Geliang Tang, mptcp; +Cc: llvm, oe-kbuild-all, Geliang Tang
Hi Geliang,
kernel test robot noticed the following build warnings:
[auto build test WARNING on mptcp/export]
[also build test WARNING on mptcp/export-net linus/master next-20240117]
[cannot apply to v6.7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Geliang-Tang/mptcp-add-pm_has_addr_attr_id-helper/20240116-113812
base: https://github.com/multipath-tcp/mptcp_net-next.git export
patch link: https://lore.kernel.org/r/fe0b361ec239de2c02192c729a083c45f301e559.1705375746.git.tanggeliang%40kylinos.cn
patch subject: [PATCH mptcp-next v9 07/23] mptcp: implement mptcp_userspace_pm_dump_addr
config: i386-buildonly-randconfig-002-20240116 (https://download.01.org/0day-ci/archive/20240117/202401171744.SJN2kTRQ-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240117/202401171744.SJN2kTRQ-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/202401171744.SJN2kTRQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/mptcp/pm_userspace.c:602:6: warning: variable 'sk' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
602 | if (!mptcp_pm_is_userspace(msk)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/mptcp/pm_userspace.c:634:11: note: uninitialized use occurs here
634 | sock_put(sk);
| ^~
net/mptcp/pm_userspace.c:602:2: note: remove the 'if' if its condition is always false
602 | if (!mptcp_pm_is_userspace(msk)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
603 | GENL_SET_ERR_MSG(info, "invalid request; userspace PM not selected");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604 | goto out;
| ~~~~~~~~~
605 | }
| ~
net/mptcp/pm_userspace.c:590:17: note: initialize the variable 'sk' to silence this warning
590 | struct sock *sk;
| ^
| = NULL
1 warning generated.
vim +602 net/mptcp/pm_userspace.c
577
578 int mptcp_userspace_pm_dump_addr(struct sk_buff *msg,
579 struct netlink_callback *cb)
580 {
581 struct id_bitmap {
582 DECLARE_BITMAP(map, MPTCP_PM_MAX_ADDR_ID + 1);
583 } *bitmap;
584 const struct genl_info *info = genl_info_dump(cb);
585 struct net *net = sock_net(msg->sk);
586 struct mptcp_pm_addr_entry *entry;
587 struct mptcp_sock *msk;
588 struct nlattr *token;
589 int ret = -EINVAL;
590 struct sock *sk;
591 void *hdr;
592
593 bitmap = (struct id_bitmap *)cb->ctx;
594 token = info->attrs[MPTCP_PM_ATTR_TOKEN];
595
596 msk = mptcp_token_get_sock(net, nla_get_u32(token));
597 if (!msk) {
598 NL_SET_ERR_MSG_ATTR(info->extack, token, "invalid token");
599 return ret;
600 }
601
> 602 if (!mptcp_pm_is_userspace(msk)) {
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-17 10:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fe0b361ec239de2c02192c729a083c45f301e559.1705375746.git.tanggeliang@kylinos.cn>
2024-01-17 10:11 ` [PATCH mptcp-next v9 07/23] mptcp: implement mptcp_userspace_pm_dump_addr kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox