From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Wenchao Hao <haowenchao2@huawei.com>,
"James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Douglas Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linfeilong@huawei.com, louhongxiang@huawei.com,
Wenchao Hao <haowenchao2@huawei.com>
Subject: Re: [PATCH v2 2/6] scsi:scsi_debug: Add interface to manage single device's error inject
Date: Thu, 11 May 2023 13:57:07 +0300 [thread overview]
Message-ID: <5f8d3e23-9ac7-4ed2-bf5b-1d247109869a@kili.mountain> (raw)
In-Reply-To: <20230428013320.347050-3-haowenchao2@huawei.com>
Hi Wenchao,
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/Wenchao-Hao/scsi-scsi_debug-create-scsi_debug-directory-in-the-debugfs-filesystem/20230427-201534
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link: https://lore.kernel.org/r/20230428013320.347050-3-haowenchao2%40huawei.com
patch subject: [PATCH v2 2/6] scsi:scsi_debug: Add interface to manage single device's error inject
config: mips-randconfig-m041-20230509 (https://download.01.org/0day-ci/archive/20230511/202305110949.SGOuSCr6-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202305110949.SGOuSCr6-lkp@intel.com/
smatch warnings:
drivers/scsi/scsi_debug.c:5359 scsi_debug_slave_destroy() warn: variable dereferenced before check 'devip' (see line 5358)
vim +/devip +5359 drivers/scsi/scsi_debug.c
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5349 static void scsi_debug_slave_destroy(struct scsi_device *sdp)
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5350 {
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5351 struct sdebug_dev_info *devip =
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5352 (struct sdebug_dev_info *)sdp->hostdata;
a34c4e98367965 FUJITA Tomonori 2008-03-25 5353
773642d95b8220 Douglas Gilbert 2016-04-25 5354 if (sdebug_verbose)
c1287970f4847a Tomas Winkler 2015-07-28 5355 pr_info("slave_destroy <%u %u %u %llu>\n",
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5356 sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
46ab9018f5b07d Wenchao Hao 2023-04-28 5357
46ab9018f5b07d Wenchao Hao 2023-04-28 @5358 debugfs_remove(devip->debugfs_entry);
^^^^^^^^^^^^^^^^^^^^
Dereference
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 @5359 if (devip) {
^^^^^
Checked too late.
25985edcedea63 Lucas De Marchi 2011-03-30 5360 /* make this slot available for re-use */
c2248fc974df7b Douglas Gilbert 2014-11-24 5361 devip->used = false;
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5362 sdp->hostdata = NULL;
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5363 }
8dea0d02f8bb71 FUJITA Tomonori 2008-03-30 5364 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-05-11 10:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 1:33 [PATCH v2 0/6] scsi:scsi_debug: Add error injection for single device Wenchao Hao
2023-04-28 1:33 ` [PATCH v2 1/6] scsi:scsi_debug: create scsi_debug directory in the debugfs filesystem Wenchao Hao
2023-04-28 1:33 ` [PATCH v2 2/6] scsi:scsi_debug: Add interface to manage single device's error inject Wenchao Hao
2023-05-11 10:57 ` Dan Carpenter [this message]
2023-04-28 1:33 ` [PATCH v2 3/6] scsi:scsi_debug: Define grammar to remove added error injection Wenchao Hao
2023-04-28 1:33 ` [PATCH v2 4/6] scsi:scsi_debug: timeout command if the error is injected Wenchao Hao
2023-04-28 1:33 ` [PATCH v2 5/6] scsi:scsi_debug: Return failed value " Wenchao Hao
2023-04-28 1:33 ` [PATCH v2 6/6] scsi:scsi_debug: set command's result and sense data " Wenchao Hao
2023-05-11 11:02 ` Dan Carpenter
2023-05-02 23:52 ` [PATCH v2 0/6] scsi:scsi_debug: Add error injection for single device Douglas Gilbert
2023-05-04 12:56 ` haowenchao (C)
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=5f8d3e23-9ac7-4ed2-bf5b-1d247109869a@kili.mountain \
--to=dan.carpenter@linaro.org \
--cc=dgilbert@interlog.com \
--cc=haowenchao2@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=louhongxiang@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/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
all inboxes | Powered by JetHome®