* [linux-nvme:nvme-5.9 33/33] drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
@ 2020-07-02 23:46 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-07-02 23:46 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3030 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Keith Busch <keith.busch@wdc.com>
CC: Christoph Hellwig <hch@lst.de>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: Johannes Thumshirn <johannes.thumshirn@wdc.com>
CC: Hannes Reinecke <hare@suse.de>
CC: Sagi Grimberg <sagi@grimberg.me>
CC: "Javier González" <javier.gonz@samsung.com>
CC: Himanshu Madhani <himanshu.madhani@oracle.com>
CC: Hans Holmberg <hans.holmberg@wdc.com>
CC: Dmitry Fomichev <dmitry.fomichev@wdc.com>
tree: git://git.infradead.org/nvme.git nvme-5.9
head: b7ce8e511525050739e0a675355d2c9195fd7280
commit: b7ce8e511525050739e0a675355d2c9195fd7280 [33/33] nvme: support for zoned namespaces
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: x86_64-randconfig-m001-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
git remote add linux-nvme git://git.infradead.org/nvme.git
git remote update linux-nvme
git checkout b7ce8e511525050739e0a675355d2c9195fd7280
vim +1434 drivers/nvme/host/core.c
84fef62d135b6e Keith Busch 2017-11-07 1425
b7ce8e51152505 Keith Busch 2020-06-29 1426 static void nvme_update_formats(struct nvme_ctrl *ctrl, u32 *effects)
84fef62d135b6e Keith Busch 2017-11-07 1427 {
cf39a6bc342b98 Scott Bauer 2018-06-29 1428 struct nvme_ns *ns;
84fef62d135b6e Keith Busch 2017-11-07 1429
cf39a6bc342b98 Scott Bauer 2018-06-29 1430 down_read(&ctrl->namespaces_rwsem);
cf39a6bc342b98 Scott Bauer 2018-06-29 1431 list_for_each_entry(ns, &ctrl->namespaces, list)
b7ce8e51152505 Keith Busch 2020-06-29 @1432 if (ns->disk && _nvme_revalidate_disk(ns->disk))
cf39a6bc342b98 Scott Bauer 2018-06-29 1433 nvme_set_queue_dying(ns);
b7ce8e51152505 Keith Busch 2020-06-29 @1434 else if (blk_queue_is_zoned(ns->disk->queue)) {
b7ce8e51152505 Keith Busch 2020-06-29 1435 /*
b7ce8e51152505 Keith Busch 2020-06-29 1436 * IO commands are required to fully revalidate a zoned
b7ce8e51152505 Keith Busch 2020-06-29 1437 * device. Force the command effects to trigger rescan
b7ce8e51152505 Keith Busch 2020-06-29 1438 * work so report zones can run in a context with
b7ce8e51152505 Keith Busch 2020-06-29 1439 * unfrozen IO queues.
b7ce8e51152505 Keith Busch 2020-06-29 1440 */
b7ce8e51152505 Keith Busch 2020-06-29 1441 *effects |= NVME_CMD_EFFECTS_NCC;
b7ce8e51152505 Keith Busch 2020-06-29 1442 }
cf39a6bc342b98 Scott Bauer 2018-06-29 1443 up_read(&ctrl->namespaces_rwsem);
84fef62d135b6e Keith Busch 2017-11-07 1444 }
84fef62d135b6e Keith Busch 2017-11-07 1445
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32291 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-nvme:nvme-5.9 33/33] drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
@ 2020-07-07 13:47 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-07-07 13:47 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2590 bytes --]
tree: git://git.infradead.org/nvme.git nvme-5.9
head: b7ce8e511525050739e0a675355d2c9195fd7280
commit: b7ce8e511525050739e0a675355d2c9195fd7280 [33/33] nvme: support for zoned namespaces
config: x86_64-randconfig-m001-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
git remote add linux-nvme git://git.infradead.org/nvme.git
git remote update linux-nvme
git checkout b7ce8e511525050739e0a675355d2c9195fd7280
vim +1434 drivers/nvme/host/core.c
b7ce8e51152505 Keith Busch 2020-06-29 1426 static void nvme_update_formats(struct nvme_ctrl *ctrl, u32 *effects)
84fef62d135b6e Keith Busch 2017-11-07 1427 {
cf39a6bc342b98 Scott Bauer 2018-06-29 1428 struct nvme_ns *ns;
84fef62d135b6e Keith Busch 2017-11-07 1429
cf39a6bc342b98 Scott Bauer 2018-06-29 1430 down_read(&ctrl->namespaces_rwsem);
cf39a6bc342b98 Scott Bauer 2018-06-29 1431 list_for_each_entry(ns, &ctrl->namespaces, list)
b7ce8e51152505 Keith Busch 2020-06-29 @1432 if (ns->disk && _nvme_revalidate_disk(ns->disk))
^^^^^^^^
Assume this is NULL
cf39a6bc342b98 Scott Bauer 2018-06-29 1433 nvme_set_queue_dying(ns);
b7ce8e51152505 Keith Busch 2020-06-29 @1434 else if (blk_queue_is_zoned(ns->disk->queue)) {
^^^^^^^^
it will Oops.
b7ce8e51152505 Keith Busch 2020-06-29 1435 /*
b7ce8e51152505 Keith Busch 2020-06-29 1436 * IO commands are required to fully revalidate a zoned
b7ce8e51152505 Keith Busch 2020-06-29 1437 * device. Force the command effects to trigger rescan
b7ce8e51152505 Keith Busch 2020-06-29 1438 * work so report zones can run in a context with
b7ce8e51152505 Keith Busch 2020-06-29 1439 * unfrozen IO queues.
b7ce8e51152505 Keith Busch 2020-06-29 1440 */
b7ce8e51152505 Keith Busch 2020-06-29 1441 *effects |= NVME_CMD_EFFECTS_NCC;
b7ce8e51152505 Keith Busch 2020-06-29 1442 }
cf39a6bc342b98 Scott Bauer 2018-06-29 1443 up_read(&ctrl->namespaces_rwsem);
84fef62d135b6e Keith Busch 2017-11-07 1444 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32291 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-nvme:nvme-5.9 33/33] drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
@ 2020-07-07 13:47 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-07-07 13:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2590 bytes --]
tree: git://git.infradead.org/nvme.git nvme-5.9
head: b7ce8e511525050739e0a675355d2c9195fd7280
commit: b7ce8e511525050739e0a675355d2c9195fd7280 [33/33] nvme: support for zoned namespaces
config: x86_64-randconfig-m001-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
git remote add linux-nvme git://git.infradead.org/nvme.git
git remote update linux-nvme
git checkout b7ce8e511525050739e0a675355d2c9195fd7280
vim +1434 drivers/nvme/host/core.c
b7ce8e51152505 Keith Busch 2020-06-29 1426 static void nvme_update_formats(struct nvme_ctrl *ctrl, u32 *effects)
84fef62d135b6e Keith Busch 2017-11-07 1427 {
cf39a6bc342b98 Scott Bauer 2018-06-29 1428 struct nvme_ns *ns;
84fef62d135b6e Keith Busch 2017-11-07 1429
cf39a6bc342b98 Scott Bauer 2018-06-29 1430 down_read(&ctrl->namespaces_rwsem);
cf39a6bc342b98 Scott Bauer 2018-06-29 1431 list_for_each_entry(ns, &ctrl->namespaces, list)
b7ce8e51152505 Keith Busch 2020-06-29 @1432 if (ns->disk && _nvme_revalidate_disk(ns->disk))
^^^^^^^^
Assume this is NULL
cf39a6bc342b98 Scott Bauer 2018-06-29 1433 nvme_set_queue_dying(ns);
b7ce8e51152505 Keith Busch 2020-06-29 @1434 else if (blk_queue_is_zoned(ns->disk->queue)) {
^^^^^^^^
it will Oops.
b7ce8e51152505 Keith Busch 2020-06-29 1435 /*
b7ce8e51152505 Keith Busch 2020-06-29 1436 * IO commands are required to fully revalidate a zoned
b7ce8e51152505 Keith Busch 2020-06-29 1437 * device. Force the command effects to trigger rescan
b7ce8e51152505 Keith Busch 2020-06-29 1438 * work so report zones can run in a context with
b7ce8e51152505 Keith Busch 2020-06-29 1439 * unfrozen IO queues.
b7ce8e51152505 Keith Busch 2020-06-29 1440 */
b7ce8e51152505 Keith Busch 2020-06-29 1441 *effects |= NVME_CMD_EFFECTS_NCC;
b7ce8e51152505 Keith Busch 2020-06-29 1442 }
cf39a6bc342b98 Scott Bauer 2018-06-29 1443 up_read(&ctrl->namespaces_rwsem);
84fef62d135b6e Keith Busch 2017-11-07 1444 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32291 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-nvme:nvme-5.9 33/33] drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432)
2020-07-07 13:47 ` Dan Carpenter
(?)
@ 2020-07-07 14:51 ` Christoph Hellwig
-1 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-07-07 14:51 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
Hi Dan,
As far as I can tell ->disk is never NULL for namespaces that can be
found through the namespaces list, so I think the fix is to just remove
these checks.
Thanks for the headsup.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-07 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-07 13:47 [linux-nvme:nvme-5.9 33/33] drivers/nvme/host/core.c:1434 nvme_update_formats() error: we previously assumed 'ns->disk' could be null (see line 1432) Dan Carpenter
2020-07-07 13:47 ` Dan Carpenter
2020-07-07 14:51 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2020-07-02 23:46 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.