Bug 48211 - kernel BUG, ata_dev_acpi_handle
Summary: kernel BUG, ata_dev_acpi_handle
Status: RESOLVED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks: 56331
  Show dependency tree
 
Reported: 2012-10-02 21:01 UTC by Dan van der Ster
Modified: 2013-04-09 06:23 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.6
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Patch to fix NULL ptr dereference in ata_dev_acpi_handle (717 bytes, patch)
2012-10-08 03:12 UTC, Aaron Lu
Details | Diff

Description Dan van der Ster 2012-10-02 21:01:26 UTC
In kernel 3.6 I get a kernel BUG related to ACPI ATA and cannot boot. 

3.5.4 boots OK with acpi on. 3.6 with acpi=off boots OK. 

3.6 with acpi on leads to a BUG at (hand copied):

<ffffffff014841b1> ata_dev_acpi_handle+0x11/0x80. 

I'm a kernel debugging newbie, and I don't have a serial cable to capture the console, so I've taken an HD video of the kernel booting with boot_delay=200.
    See: http://www.youtube.com/watch?v=WNkQCnfc56g&t=2m1s
the BUG starts around 2minutes in.

You'll have to ignore the USB messages that garbage up the initial BUG line, but at least the call trace is clear (around 2:05):

ata_acpi_find_device+0x138/0x1b0
...

The hardware is a Shuttle SP35P2 PC (Intel P35 chipset), set to AHCI in the bios. Drives are connected via a SATA port multiplier (Lian Li EX-503).

Please let me know if you require any further info to debug this.

Best Regards, Dan
Comment 1 Alan 2012-10-03 10:30:14 UTC
ata_dev_acpi_handle - NULL ptr deref
Comment 2 Alan 2012-10-03 10:30:57 UTC
Can you post a brief summary of the problem report to linux-ide@vger.kernel.org and cc mjg@redhat.com as it's probably the libata ACPI code that is breaking here.

Alan
Comment 3 Aaron Lu 2012-10-08 03:12:00 UTC
Created attachment 82641 [details]
Patch to fix NULL ptr dereference in ata_dev_acpi_handle

Hi Dan,

Can you please apply this and see if it fixed the problem?
Thanks.
Comment 4 Dan van der Ster 2012-10-08 18:59:46 UTC
Hi Aaron,
Yes, that patch fixes the problem. Thanks!
Dan
Comment 5 daniel schroeder 2012-11-05 09:58:47 UTC
null ptr at the time the external PMP enclosure is started, patch fixes the problem.
Comment 6 Jeff Garzik 2012-11-16 04:23:39 UTC
applied to #upstream-fixes
Comment 7 Florian Mickler 2012-11-26 18:44:39 UTC
A patch referencing this bug report has been merged in Linux v3.7-rc7:

commit 60817a680b1bd3341b6909fab7d8a1fcc3a78369
Author: Aaron Lu <aaron.lu@intel.com>
Date:   Tue Oct 9 15:37:48 2012 +0800

    libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle

Note You need to log in before you can comment on or make changes to this bug.