aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-18 15:21:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-18 15:21:09 -0500
commit25e19c1fe421280a47f37c3571aa379e6e67966c (patch)
tree3635424070da53b33adcbd023657a6b8bcf805a5 /tools/testing
parentc67a98c00ea3c1fad14833f440fcd770232d24e7 (diff)
parent2121db09630113e67b51ae78c18115f1858f648a (diff)
Merge tag 'libnvdimm-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "A small batch of fixes for v4.20-rc3. The overflow continuation fix addresses something that has been broken for several releases. Arguably it could wait even longer, but it's a one line fix and this finishes the last of the known address range scrub bug reports. The revert addresses a lockdep regression. The unit tests are not critical to fix, but no reason to hold this fix back. Summary: - Address Range Scrub overflow continuation handling has been broken since it was initially merged. It was only recently that error injection and platform-BIOS support enabled this corner case to be exercised. - The recent attempt to provide more isolation for the kernel Address Range Scrub state machine from userapace initiated sessions triggers a lockdep report. Revert and try again at the next merge window. - Fix a kasan reported buffer overflow in libnvdimm unit test infrastrucutre (nfit_test)" * tag 'libnvdimm-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: Revert "acpi, nfit: Further restrict userspace ARS start requests" acpi, nfit: Fix ARS overflow continuation tools/testing/nvdimm: Fix the array size for dimm devices.
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/nvdimm/test/nfit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index 9527d47a1070..01ec04bf91b5 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -140,8 +140,8 @@ static u32 handle[] = {
140 [6] = NFIT_DIMM_HANDLE(1, 0, 0, 0, 1), 140 [6] = NFIT_DIMM_HANDLE(1, 0, 0, 0, 1),
141}; 141};
142 142
143static unsigned long dimm_fail_cmd_flags[NUM_DCR]; 143static unsigned long dimm_fail_cmd_flags[ARRAY_SIZE(handle)];
144static int dimm_fail_cmd_code[NUM_DCR]; 144static int dimm_fail_cmd_code[ARRAY_SIZE(handle)];
145 145
146static const struct nd_intel_smart smart_def = { 146static const struct nd_intel_smart smart_def = {
147 .flags = ND_INTEL_SMART_HEALTH_VALID 147 .flags = ND_INTEL_SMART_HEALTH_VALID
@@ -205,7 +205,7 @@ struct nfit_test {
205 unsigned long deadline; 205 unsigned long deadline;
206 spinlock_t lock; 206 spinlock_t lock;
207 } ars_state; 207 } ars_state;
208 struct device *dimm_dev[NUM_DCR]; 208 struct device *dimm_dev[ARRAY_SIZE(handle)];
209 struct nd_intel_smart *smart; 209 struct nd_intel_smart *smart;
210 struct nd_intel_smart_threshold *smart_threshold; 210 struct nd_intel_smart_threshold *smart_threshold;
211 struct badrange badrange; 211 struct badrange badrange;
@@ -2680,7 +2680,7 @@ static int nfit_test_probe(struct platform_device *pdev)
2680 u32 nfit_handle = __to_nfit_memdev(nfit_mem)->device_handle; 2680 u32 nfit_handle = __to_nfit_memdev(nfit_mem)->device_handle;
2681 int i; 2681 int i;
2682 2682
2683 for (i = 0; i < NUM_DCR; i++) 2683 for (i = 0; i < ARRAY_SIZE(handle); i++)
2684 if (nfit_handle == handle[i]) 2684 if (nfit_handle == handle[i])
2685 dev_set_drvdata(nfit_test->dimm_dev[i], 2685 dev_set_drvdata(nfit_test->dimm_dev[i],
2686 nfit_mem); 2686 nfit_mem);