This is a note to let you know that I've just added the patch titled
libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle
to the 3.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
libata-acpi-fix-null-ptr-derference-in-ata_acpi_dev_handle.patch
and it can be found in the queue-3.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 60817a680b1bd3341b6909fab7d8a1fcc3a78369 Mon Sep 17 00:00:00 2001
From: Aaron Lu <[email protected]>
Date: Tue, 9 Oct 2012 15:37:48 +0800
Subject: libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle
From: Aaron Lu <[email protected]>
commit 60817a680b1bd3341b6909fab7d8a1fcc3a78369 upstream.
commit 6b66d95895c149cbc04d4fac5a2f5477c543a8ae didn't handle SATA PMP
case in ata_acpi_bind_device and will cause a NULL ptr dereference when
user attached a SATA drive to the PMP port. Fix this by checking PMP
support.
This bug is reported by Dan van der Ster in the following bugzilla page:
https://bugzilla.kernel.org/show_bug.cgi?id=48211
Reported-by: Dan van der Ster <[email protected]>
Tested-by: Dan van der Ster <[email protected]>
Signed-off-by: Aaron Lu <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Tested-by: Simon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/ata/libata-acpi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct a
struct acpi_device *acpi_dev;
struct acpi_device_power_state *states;
- if (ap->flags & ATA_FLAG_ACPI_SATA)
- ata_dev = &ap->link.device[sdev->channel];
- else
+ if (ap->flags & ATA_FLAG_ACPI_SATA) {
+ if (!sata_pmp_attached(ap))
+ ata_dev = &ap->link.device[sdev->id];
+ else
+ ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id];
+ }
+ else {
ata_dev = &ap->link.device[sdev->id];
+ }
*handle = ata_dev_acpi_handle(ata_dev);
Patches currently in stable-queue which might be from [email protected] are
queue-3.6/libata-acpi-fix-null-ptr-derference-in-ata_acpi_dev_handle.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html