acpi_resource bug?
John Baldwin
jhb at freebsd.org
Mon Feb 14 14:56:23 UTC 2011
On Sunday, February 13, 2011 2:46:07 pm Matthew Fleming wrote:
> I'm not very familiar with the acpi code, but we have seen an
> intermittent issue on boot:
>
> 1) should the length of the bcopy() be changed to either respect
> res->Length or the actual length of the ACPI_RESOURCE_DATA for the
> type?
It should just use res->Length:
Index: acpi_resource.c
===================================================================
--- acpi_resource.c (revision 218554)
+++ acpi_resource.c (working copy)
@@ -82,7 +82,7 @@ acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *
req->found = 1;
KASSERT(irq == rman_get_start(req->res),
("IRQ resources do not match"));
- bcopy(res, req->acpi_res, sizeof(ACPI_RESOURCE));
+ bcopy(res, req->acpi_res, res->Length);
return (AE_CTRL_TERMINATE);
}
return (AE_OK);
--
John Baldwin
More information about the freebsd-current
mailing list