Re: kernel oops and panic in acpi_atomic_read under 2.6.39.3. call trace included

From: Rafael J. Wysocki
Date: Mon Aug 22 2011 - 17:11:48 EST


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(-)

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())
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/