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.
This commit is contained in:
@@ -2928,9 +2928,9 @@ static int acpi_nfit_query_poison(struct acpi_nfit_desc *acpi_desc)
|
||||
return rc;
|
||||
|
||||
if (ars_status_process_records(acpi_desc))
|
||||
return -ENOMEM;
|
||||
dev_err(acpi_desc->dev, "Failed to process ARS records\n");
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ars_register(struct acpi_nfit_desc *acpi_desc,
|
||||
@@ -3341,8 +3341,6 @@ static int acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc,
|
||||
struct nvdimm *nvdimm, unsigned int cmd)
|
||||
{
|
||||
struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc);
|
||||
struct nfit_spa *nfit_spa;
|
||||
int rc = 0;
|
||||
|
||||
if (nvdimm)
|
||||
return 0;
|
||||
@@ -3355,17 +3353,10 @@ static int acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc,
|
||||
* just needs guarantees that any ARS it initiates are not
|
||||
* interrupted by any intervening start requests from userspace.
|
||||
*/
|
||||
mutex_lock(&acpi_desc->init_mutex);
|
||||
list_for_each_entry(nfit_spa, &acpi_desc->spas, list)
|
||||
if (acpi_desc->scrub_spa
|
||||
|| test_bit(ARS_REQ_SHORT, &nfit_spa->ars_state)
|
||||
|| test_bit(ARS_REQ_LONG, &nfit_spa->ars_state)) {
|
||||
rc = -EBUSY;
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&acpi_desc->init_mutex);
|
||||
if (work_busy(&acpi_desc->dwork.work))
|
||||
return -EBUSY;
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc,
|
||||
|
Reference in New Issue
Block a user