From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Alexander Aring <aahringo@redhat.com>,
teigland@redhat.com
Cc: lkp@intel.com, 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 10/12] dlm: separate dlm lockspaces per net-namespace
Date: Tue, 20 Aug 2024 22:22:05 +0300 [thread overview]
Message-ID: <2a99ef8c-9475-4843-87e7-c8f03c756e2b@stanley.mountain> (raw)
In-Reply-To: <20240819183742.2263895-11-aahringo@redhat.com>
Hi Alexander,
kernel test robot noticed the following build warnings:
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-11-aahringo%40redhat.com
patch subject: [PATCH dlm/next 10/12] dlm: separate dlm lockspaces per net-namespace
config: x86_64-randconfig-161-20240820 (https://download.01.org/0day-ci/archive/20240821/202408210031.QCBHr27k-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202408210031.QCBHr27k-lkp@intel.com/
New smatch warnings:
fs/dlm/lock.c:4989 dlm_receive_buffer() error: we previously assumed 'ls' could be null (see line 4988)
vim +/ls +4989 fs/dlm/lock.c
bde0f4dba584ae Alexander Aring 2024-08-19 4961 void dlm_receive_buffer(struct dlm_net *dn, const union dlm_packet *p,
bde0f4dba584ae Alexander Aring 2024-08-19 4962 int nodeid)
c36258b5925e6c David Teigland 2007-09-27 4963 {
1151935182b40b Alexander Aring 2023-08-01 4964 const struct dlm_header *hd = &p->header;
c36258b5925e6c David Teigland 2007-09-27 4965 struct dlm_ls *ls;
c36258b5925e6c David Teigland 2007-09-27 4966 int type = 0;
c36258b5925e6c David Teigland 2007-09-27 4967
c36258b5925e6c David Teigland 2007-09-27 4968 switch (hd->h_cmd) {
c36258b5925e6c David Teigland 2007-09-27 4969 case DLM_MSG:
00e99ccde75722 Alexander Aring 2022-04-04 4970 type = le32_to_cpu(p->message.m_type);
c36258b5925e6c David Teigland 2007-09-27 4971 break;
c36258b5925e6c David Teigland 2007-09-27 4972 case DLM_RCOM:
2f9dbeda8dc04b Alexander Aring 2022-04-04 4973 type = le32_to_cpu(p->rcom.rc_type);
c36258b5925e6c David Teigland 2007-09-27 4974 break;
c36258b5925e6c David Teigland 2007-09-27 4975 default:
c36258b5925e6c David Teigland 2007-09-27 4976 log_print("invalid h_cmd %d from %u", hd->h_cmd, nodeid);
c36258b5925e6c David Teigland 2007-09-27 4977 return;
c36258b5925e6c David Teigland 2007-09-27 4978 }
c36258b5925e6c David Teigland 2007-09-27 4979
3428785a65dabf Alexander Aring 2022-04-04 4980 if (le32_to_cpu(hd->h_nodeid) != nodeid) {
c36258b5925e6c David Teigland 2007-09-27 4981 log_print("invalid h_nodeid %d from %d lockspace %x",
3428785a65dabf Alexander Aring 2022-04-04 4982 le32_to_cpu(hd->h_nodeid), nodeid,
3428785a65dabf Alexander Aring 2022-04-04 4983 le32_to_cpu(hd->u.h_lockspace));
c36258b5925e6c David Teigland 2007-09-27 4984 return;
c36258b5925e6c David Teigland 2007-09-27 4985 }
c36258b5925e6c David Teigland 2007-09-27 4986
bde0f4dba584ae Alexander Aring 2024-08-19 4987 ls = dlm_find_lockspace_global(dn, le32_to_cpu(hd->u.h_lockspace));
c36258b5925e6c David Teigland 2007-09-27 @4988 if (!ls) {
bde0f4dba584ae Alexander Aring 2024-08-19 @4989 log_limit(ls, "dlm: invalid lockspace %u from %d cmd %d type %d\n",
^^
ls is NULL here so this doesn't work.
3428785a65dabf Alexander Aring 2022-04-04 4990 le32_to_cpu(hd->u.h_lockspace), nodeid,
3428785a65dabf Alexander Aring 2022-04-04 4991 hd->h_cmd, type);
c36258b5925e6c David Teigland 2007-09-27 4992
c36258b5925e6c David Teigland 2007-09-27 4993 if (hd->h_cmd == DLM_RCOM && type == DLM_RCOM_STATUS)
bde0f4dba584ae Alexander Aring 2024-08-19 4994 dlm_send_ls_not_ready(dn, nodeid, &p->rcom);
c36258b5925e6c David Teigland 2007-09-27 4995 return;
c36258b5925e6c David Teigland 2007-09-27 4996 }
c36258b5925e6c David Teigland 2007-09-27 4997
c36258b5925e6c David Teigland 2007-09-27 4998 /* this rwsem allows dlm_ls_stop() to wait for all dlm_recv threads to
c36258b5925e6c David Teigland 2007-09-27 4999 be inactive (in this ls) before transitioning to recovery mode */
c36258b5925e6c David Teigland 2007-09-27 5000
578acf9a87a875 Alexander Aring 2024-04-02 5001 read_lock_bh(&ls->ls_recv_active);
c36258b5925e6c David Teigland 2007-09-27 5002 if (hd->h_cmd == DLM_MSG)
eef7d739c218cb Al Viro 2008-01-25 5003 dlm_receive_message(ls, &p->message, nodeid);
f45307d395da7a Alexander Aring 2022-08-15 5004 else if (hd->h_cmd == DLM_RCOM)
eef7d739c218cb Al Viro 2008-01-25 5005 dlm_receive_rcom(ls, &p->rcom, nodeid);
f45307d395da7a Alexander Aring 2022-08-15 5006 else
f45307d395da7a Alexander Aring 2022-08-15 5007 log_error(ls, "invalid h_cmd %d from %d lockspace %x",
f45307d395da7a Alexander Aring 2022-08-15 5008 hd->h_cmd, nodeid, le32_to_cpu(hd->u.h_lockspace));
578acf9a87a875 Alexander Aring 2024-04-02 5009 read_unlock_bh(&ls->ls_recv_active);
c36258b5925e6c David Teigland 2007-09-27 5010
c36258b5925e6c David Teigland 2007-09-27 5011 dlm_put_lockspace(ls);
c36258b5925e6c David Teigland 2007-09-27 5012 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-20 19:22 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 [this message]
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
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=2a99ef8c-9475-4843-87e7-c8f03c756e2b@stanley.mountain \
--to=dan.carpenter@linaro.org \
--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=lkp@intel.com \
--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=oe-kbuild@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