projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f10fe9d
)
nvme: fixup crash on failed discovery
author
Hannes Reinecke
<hare@suse.de>
Tue, 7 Aug 2018 10:43:42 +0000
(12:43 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Tue, 7 Aug 2018 12:40:27 +0000
(14:40 +0200)
When the initial discovery fails the subsystem hasn't been setup yet
in nvme_mpath_stop, and we can't dereference ctrl->subsys.
Fixes:
0d0b660f
("nvme: add ANA support")
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/multipath.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/host/multipath.c
b/drivers/nvme/host/multipath.c
index c643872f8dac0891113d9155a85ec4d8fe49339e..5a9562881d4ef87ddfbd749555f1c8eccf01acc5 100644
(file)
--- a/
drivers/nvme/host/multipath.c
+++ b/
drivers/nvme/host/multipath.c
@@
-22,7
+22,7
@@
MODULE_PARM_DESC(multipath,
inline bool nvme_ctrl_use_ana(struct nvme_ctrl *ctrl)
{
- return multipath && (ctrl->subsys->cmic & (1 << 3));
+ return multipath &&
ctrl->subsys &&
(ctrl->subsys->cmic & (1 << 3));
}
/*