From patchwork Mon Aug 22 21:13:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1086432 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ML8eMc021650 for ; Mon, 22 Aug 2011 21:11:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751649Ab1HVVLo (ORCPT ); Mon, 22 Aug 2011 17:11:44 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:58128 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589Ab1HVVLo (ORCPT ); Mon, 22 Aug 2011 17:11:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 91CD91B7C91; Mon, 22 Aug 2011 22:31:12 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07068-02; Mon, 22 Aug 2011 22:31:00 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 9C5E11B7E12; Mon, 22 Aug 2011 22:31:00 +0200 (CEST) From: "Rafael J. Wysocki" To: Rick Warner Subject: Re: kernel oops and panic in acpi_atomic_read under 2.6.39.3. call trace included Date: Mon, 22 Aug 2011 23:13:26 +0200 User-Agent: KMail/1.13.6 (Linux/3.1.0-rc2+; KDE/4.6.0; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, "Richard Houghton" , "ACPI Devel Mailing List" , "Len Brown" , "Matthew Garrett" References: <201108171751.51648.rick@microway.com> <201108222047.11086.rjw@sisk.pl> <201108221651.35654.rick@microway.com> In-Reply-To: <201108221651.35654.rick@microway.com> MIME-Version: 1.0 Message-Id: <201108222313.26769.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 22 Aug 2011 21:11:45 +0000 (UTC) Hi, On Monday, August 22, 2011, Rick Warner wrote: ... > Hi Rafael, > > Thanks for the off-list help in getting you this info. > > I had already rebuilt the kernel using the change I mentioned earlier (test on > !&g->error_status_address) since the call trace I got. > > I luckily still had a copy of the kernel and modules I built previously using > just your patch, so I undid my change to the ghes.c source, leaving just your > patch but not mine so it would match the ghes.ko module I ran on. This is the > output of gdb on that ghes.ko now: > > (gdb) l *ghes_read_estatus+0x38 > 0x258 is in ghes_read_estatus (drivers/acpi/apei/ghes.c:296). > warning: Source file is more recent than executable. > 291 int rc; > 292 if (!g) > 293 return -EINVAL; > 294 > 295 rc = acpi_atomic_read(&buf_paddr, &g->error_status_address); > 296 if (rc) { > 297 if (!silent && printk_ratelimit()) > 298 pr_warning(FW_WARN GHES_PFX > 299 "Failed to read error status block address for hardware error source: > %d.\n", > 300 g->header.source_id); > > The warning about the source being newer is because of the reverted change in > the ghes.c source mentioned above. OK, since &buf_addr cannot be NULL, perhaps ghes is. Please check if the appended patch makes a difference. Thanks, Rafael --- drivers/acpi/apei/ghes.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/acpi/apei/ghes.c =================================================================== --- linux.orig/drivers/acpi/apei/ghes.c +++ linux/drivers/acpi/apei/ghes.c @@ -393,11 +393,16 @@ static void ghes_copy_tofrom_phys(void * static int ghes_read_estatus(struct ghes *ghes, int silent) { - struct acpi_hest_generic *g = ghes->generic; + struct acpi_hest_generic *g; u64 buf_paddr; u32 len; int rc; + if (!ghes || !ghes->generic) + return -EINVAL; + + g = ghes->generic; + rc = acpi_atomic_read(&buf_paddr, &g->error_status_address); if (rc) { if (!silent && printk_ratelimit())