On Wed, Apr 4, 2018 at 9:26 AM, Kani, Toshi <toshi.kani@xxxxxxx> wrote: > On Mon, 2018-04-02 at 21:46 -0700, Dan Williams wrote: > : >> +static int init_ars(struct acpi_nfit_desc *acpi_desc, struct nfit_spa *nfit_spa, >> +int query_rc) >> { >> -struct acpi_nfit_system_address *spa = nfit_spa->spa; >> -unsigned int overflow_retry = scrub_overflow_abort; >> -u64 init_ars_start = 0, init_ars_len = 0; >> -struct device *dev = acpi_desc->dev; >> -unsigned int tmo = scrub_timeout; >> int rc; >> >> -if (!test_bit(ARS_REQ, &nfit_spa->ars_state) || !nfit_spa->nd_region) >> -return; >> +switch (query_rc) { >> +case 0: >> +/* ARS is idle, lets look for critical known errors... */ >> +break; >> +case -EBUSY: >> +/* >> + * ARS is already running, some agent thought it was ok >> + * to busy ARS before handing off to the nfit driver. >> + */ >> +clear_bit(ARS_SHORT, &nfit_spa->ars_state); >> +rc = query_rc; >> +goto out; >> +case -ENOSPC: >> +/* ARS continuation needed... */ >> +clear_bit(ARS_SHORT, &nfit_spa->ars_state); >> +rc = query_rc; >> +goto out; >> +default: >> +rc = query_rc; >> +goto out; >> +} >> >> +WARN_ON_ONCE(!test_bit(ARS_SHORT, &nfit_spa->ars_state)); > > I am hitting this WARN_ON_ONCE. I think there is an issue in the code > flow that ars_complete() clears ARS_SHORT before init_ars(). > > acpi_nfit_scrub > acpi_nfit_query_poison > ars_status_process_records > ars_complete > init_ars Yes, I think we are inadvertently double completing operations. I have a new version that adds an ARS_DONE flag to make sure we are only completing ARS once. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html