netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Aring <aahringo@redhat.com>, teigland@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	gfs2@lists.linux.dev, song@kernel.org, yukuai3@huawei.com,
	agruenba@redhat.com, mark@fasheh.com, jlbec@evilplan.org,
	joseph.qi@linux.alibaba.com, gregkh@linuxfoundation.org,
	rafael@kernel.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	ocfs2-devel@lists.linux.dev, netdev@vger.kernel.org,
	vvidic@valentin-vidic.from.hr, heming.zhao@suse.com,
	lucien.xin@gmail.com, aahringo@redhat.com
Subject: Re: [PATCH dlm/next 11/12] dlm: add nldlm net-namespace aware UAPI
Date: Tue, 20 Aug 2024 15:40:09 +0800	[thread overview]
Message-ID: <202408201509.g1VKeeOl-lkp@intel.com> (raw)
In-Reply-To: <20240819183742.2263895-12-aahringo@redhat.com>

Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on teigland-dlm/next]
[also build test WARNING on next-20240820]
[cannot apply to gfs2/for-next driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.11-rc4]
[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/Alexander-Aring/dlm-introduce-dlm_find_lockspace_name/20240820-024440
base:   https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git next
patch link:    https://lore.kernel.org/r/20240819183742.2263895-12-aahringo%40redhat.com
patch subject: [PATCH dlm/next 11/12] dlm: add nldlm net-namespace aware UAPI
config: x86_64-buildonly-randconfig-001-20240820 (https://download.01.org/0day-ci/archive/20240820/202408201509.g1VKeeOl-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240820/202408201509.g1VKeeOl-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/202408201509.g1VKeeOl-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/dlm/nldlm.c:195:2: warning: variable 'ls' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
     195 |         list_for_each_entry(ls_iter, &dn->lockspaces, list) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:779:7: note: expanded from macro 'list_for_each_entry'
     779 |              !list_entry_is_head(pos, head, member);                    \
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/dlm/nldlm.c:202:7: note: uninitialized use occurs here
     202 |         if (!ls) {
         |              ^~
   fs/dlm/nldlm.c:195:2: note: remove the condition if it is always true
     195 |         list_for_each_entry(ls_iter, &dn->lockspaces, list) {
         |         ^
   include/linux/list.h:779:7: note: expanded from macro 'list_for_each_entry'
     779 |              !list_entry_is_head(pos, head, member);                    \
         |              ^
   fs/dlm/nldlm.c:185:23: note: initialize the variable 'ls' to silence this warning
     185 |         struct dlm_cfg_ls *ls, *ls_iter = NULL;
         |                              ^
         |                               = NULL
>> fs/dlm/nldlm.c:918:11: warning: variable 'log_level' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     918 |         else if (dn->config.ci_log_debug)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~
   fs/dlm/nldlm.c:921:50: note: uninitialized use occurs here
     921 |         rv = nla_put_u32(skb, NLDLM_CFG_ATTR_LOG_LEVEL, log_level);
         |                                                         ^~~~~~~~~
   fs/dlm/nldlm.c:918:7: note: remove the 'if' if its condition is always true
     918 |         else if (dn->config.ci_log_debug)
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
     919 |                 log_level = NLDLM_LOG_LEVEL_DEBUG;
   fs/dlm/nldlm.c:868:20: note: initialize the variable 'log_level' to silence this warning
     868 |         uint32_t log_level;
         |                           ^
         |                            = 0
   2 warnings generated.


vim +195 fs/dlm/nldlm.c

   181	
   182	static int nldlm_get_ls(struct sk_buff *msg, struct genl_info *info)
   183	{
   184		struct dlm_net *dn = dlm_pernet(sock_net(msg->sk));
 > 185		struct dlm_cfg_ls *ls, *ls_iter = NULL;
   186		char lsname[DLM_LOCKSPACE_LEN];
   187		struct sk_buff *skb;
   188		int rv;
   189	
   190		rv = nldlm_parse_ls(info->attrs[NLDLM_ATTR_LS], lsname);
   191		if (rv < 0)
   192			return rv;
   193	
   194		mutex_lock(&dn->cfg_lock);
 > 195		list_for_each_entry(ls_iter, &dn->lockspaces, list) {
   196			if (!strncmp(ls_iter->name, lsname, DLM_LOCKSPACE_LEN)) {
   197				ls = ls_iter;
   198				break;
   199			}
   200		}
   201	
   202		if (!ls) {
   203			rv = -ENOENT;
   204			goto err;
   205		}
   206	
   207		skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
   208		if (!skb) {
   209			rv = -ENOMEM;
   210			goto err;
   211		}
   212	
   213		rv = __nldlm_get_ls(skb, ls, info->snd_portid,
   214				    info->snd_seq, NULL, 0);
   215		if (rv < 0) {
   216			nlmsg_free(skb);
   217			goto err;
   218		}
   219	
   220		rv = genlmsg_reply(skb, info);
   221	
   222	err:
   223		mutex_unlock(&dn->cfg_lock);
   224		return rv;
   225	}
   226	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-08-20  7:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 18:37 [PATCH dlm/next 00/12] dlm: net-namespace functionality Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 01/12] dlm: introduce dlm_find_lockspace_name() Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 02/12] dlm: disallow different configs nodeid storages Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 03/12] dlm: add struct net to dlm_new_lockspace() Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 04/12] dlm: handle port as __be16 network byte order Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 05/12] dlm: use dlm_config as only cluster configuration Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 06/12] dlm: dlm_config_info config fields to unsigned int Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 07/12] dlm: rename config to configfs Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 08/12] kobject: add kset_type_create_and_add() helper Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 09/12] kobject: export generic helper ops Alexander Aring
2024-08-19 18:37 ` [PATCH dlm/next 10/12] dlm: separate dlm lockspaces per net-namespace Alexander Aring
2024-08-20 19:22   ` Dan Carpenter
2024-08-19 18:37 ` [PATCH dlm/next 11/12] dlm: add nldlm net-namespace aware UAPI Alexander Aring
2024-08-19 22:12   ` Jakub Kicinski
2024-08-21 13:13     ` Alexander Aring
2024-08-21 22:57       ` Jakub Kicinski
2024-08-20  7:40   ` kernel test robot [this message]
2024-08-19 18:37 ` [PATCH dlm/next 12/12] gfs2: separate mount context by net-namespaces Alexander Aring
2024-08-20 14:42   ` kernel test robot
2024-08-20 17:37   ` kernel test robot

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=202408201509.g1VKeeOl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aahringo@redhat.com \
    --cc=agruenba@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gfs2@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=heming.zhao@suse.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lucien.xin@gmail.com \
    --cc=mark@fasheh.com \
    --cc=netdev@vger.kernel.org \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=song@kernel.org \
    --cc=teigland@redhat.com \
    --cc=vvidic@valentin-vidic.from.hr \
    --cc=yukuai3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).