public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliang.tang@linux.dev>, mptcp@lists.linux.dev
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v9 07/23] mptcp: implement mptcp_userspace_pm_dump_addr
Date: Wed, 17 Jan 2024 18:11:04 +0800	[thread overview]
Message-ID: <202401171744.SJN2kTRQ-lkp@intel.com> (raw)
In-Reply-To: <fe0b361ec239de2c02192c729a083c45f301e559.1705375746.git.tanggeliang@kylinos.cn>

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

           reply	other threads:[~2024-01-17 10:12 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <fe0b361ec239de2c02192c729a083c45f301e559.1705375746.git.tanggeliang@kylinos.cn>]

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=202401171744.SJN2kTRQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=geliang.tang@linux.dev \
    --cc=llvm@lists.linux.dev \
    --cc=mptcp@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox