Date: Mon, 14 Feb 2011 07:29:59 -0800 From: Matthew Fleming <mdf356@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: acpi_resource bug? Message-ID: <AANLkTimKJnyFQgTgtLTOFvmcY4fbK5gdT6mwt9zB=%2BRY@mail.gmail.com> In-Reply-To: <201102140924.36531.jhb@freebsd.org> References: <AANLkTi=C31iGJMonj7E3DGLWhx0cSKQR=b7ZHTv9CdmA@mail.gmail.com> <201102140924.36531.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 14, 2011 at 6:24 AM, John Baldwin <jhb@freebsd.org> wrote: > 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: Is there a guarantee that res->Length is <=3D sizeof(ACPI_RESOURCE) ? Thanks, matthew > > Index: acpi_resource.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- acpi_resource.c =A0 =A0 (revision 218554) > +++ acpi_resource.c =A0 =A0 (working copy) > @@ -82,7 +82,7 @@ acpi_lookup_irq_handler(ACPI_RESOURCE *res, void * > =A0 =A0 =A0 =A0req->found =3D 1; > =A0 =A0 =A0 =A0KASSERT(irq =3D=3D rman_get_start(req->res), > =A0 =A0 =A0 =A0 =A0 =A0("IRQ resources do not match")); > - =A0 =A0 =A0 bcopy(res, req->acpi_res, sizeof(ACPI_RESOURCE)); > + =A0 =A0 =A0 bcopy(res, req->acpi_res, res->Length); > =A0 =A0 =A0 =A0return (AE_CTRL_TERMINATE); > =A0 =A0 } > =A0 =A0 return (AE_OK); > > -- > John Baldwin >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimKJnyFQgTgtLTOFvmcY4fbK5gdT6mwt9zB=%2BRY>