summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-21 15:51:19 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-21 15:51:19 -1000
commit6e80ecdddf4ea6f3cd84e83720f3d852e6624a68 (patch)
tree058bb07b5cae1df834bbac82aeafaba0a98f855b /drivers
parent4a704d6db0ee4a349d5d523813a718e429b4914d (diff)
parent33a56086712561b8b9cdc881e0317f4c36861f72 (diff)
downloadlinux-6e80ecdddf4ea6f3cd84e83720f3d852e6624a68.tar.bz2
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "A crash fix and corresponding regression test enabling for the crash scenario. The unit test for this crash is available in ndctl-v58.2. This branch has received a build success notification from the 0day-kbuild robot over 148 configs. The fix is tagged for -stable / backport to 4.13" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, namespace: fix btt claim class crash tools/testing/nvdimm: disable labels for nfit_test.1
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvdimm/namespace_devs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 1427a386a033..3e4d1e7998da 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -1417,6 +1417,15 @@ static int btt_claim_class(struct device *dev)
struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
struct nd_namespace_index *nsindex;
+ /*
+ * If any of the DIMMs do not support labels the only
+ * possible BTT format is v1.
+ */
+ if (!ndd) {
+ loop_bitmask = 0;
+ break;
+ }
+
nsindex = to_namespace_index(ndd, ndd->ns_current);
if (nsindex == NULL)
loop_bitmask |= 1;