From owner-freebsd-current@FreeBSD.ORG Mon Feb 14 14:56:22 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F039C106564A for ; Mon, 14 Feb 2011 14:56:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C3F108FC18 for ; Mon, 14 Feb 2011 14:56:22 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5F3CE46B38; Mon, 14 Feb 2011 09:56:22 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 73CF78A009; Mon, 14 Feb 2011 09:56:21 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 14 Feb 2011 09:24:36 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102140924.36531.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 14 Feb 2011 09:56:21 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Matthew Fleming Subject: Re: acpi_resource bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 14:56:23 -0000 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