fedora-cvs-commits@redhat.com
[Top] [All Lists]

rpms/kernel/devel linux-2.6-sata-ata_device_add-oops.patch, NONE, 1.1 ke

Subject: rpms/kernel/devel linux-2.6-sata-ata_device_add-oops.patch, NONE, 1.1 kernel-2.6.spec, 1.2502, 1.2503
From:
Date: Tue, 1 Aug 2006 19:17:23 -0400
Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17693

Modified Files:
        kernel-2.6.spec 
Added Files:
        linux-2.6-sata-ata_device_add-oops.patch 
Log Message:
SATA oops on boot fix

linux-2.6-sata-ata_device_add-oops.patch:
 libata-core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6-sata-ata_device_add-oops.patch ---
Subject: Fix reference of uninitialised memory in ata_device_add()
From: Dave Jones <davej@xxxxxxxxxx>

ata_device_add fails, calls ata_host_remove with pointers to unitialized
memory.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Tejun Heo <htejun@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>

--- linux-2.6/drivers/scsi/libata-core.c~       2006-07-29 12:35:32.000000000 
-0400
+++ linux-2.6/drivers/scsi/libata-core.c        2006-07-29 12:39:08.000000000 
-0400
@@ -5419,10 +5419,10 @@ int ata_device_add(const struct ata_prob
                unsigned long xfer_mode_mask;
 
                ap = ata_host_add(ent, host_set, i);
+               host_set->ports[i] = ap;
                if (!ap)
                        goto err_out;
 
-               host_set->ports[i] = ap;
                xfer_mode_mask =(ap->udma_mask << ATA_SHIFT_UDMA) |
                                (ap->mwdma_mask << ATA_SHIFT_MWDMA) |
                                (ap->pio_mask << ATA_SHIFT_PIO);
@@ -5532,6 +5532,8 @@ int ata_device_add(const struct ata_prob
 
 err_out:
        for (i = 0; i < count; i++) {
+               if (!host_set->ports[i])
+                       break;
                ata_host_remove(host_set->ports[i], 1);
                scsi_host_put(host_set->ports[i]->host);
        }


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2502
retrieving revision 1.2503
diff -u -r1.2502 -r1.2503
--- kernel-2.6.spec     1 Aug 2006 21:32:26 -0000       1.2502
+++ kernel-2.6.spec     1 Aug 2006 23:17:21 -0000       1.2503
@@ -424,6 +424,7 @@
 
 # SATA Bits
 Patch2200: linux-2.6-sata-promise-pata-ports.patch
+Patch2201: linux-2.6-sata-ata_device_add-oops.patch
 Patch2202: linux-2.6-sata-ahci-suspend.patch
 
 # ACPI bits
@@ -955,6 +956,8 @@
 
 # Enable PATA ports on Promise SATA.
 %patch2200 -p1
+# Fix oops on startup
+%patch2201 -p1
 # Fix AHCI Suspend.
 %patch2202 -p1
 
@@ -1623,6 +1626,7 @@
 %changelog
 * Tue Aug  1 2006 Dave Jones <davej@xxxxxxxxxx>
 - s390 kprobes support.
+- Fix oops in libata ata_device_add()
 
 * Tue Aug  1 2006 Roland McGrath <roland@xxxxxxxxxx>
 - fix bogus BUG_ON in ptrace_do_wait

-- 
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits

<Prev in Thread] Current Thread [Next in Thread>
  • rpms/kernel/devel linux-2.6-sata-ata_device_add-oops.patch, NONE, 1.1 kernel-2.6.spec, 1.2502, 1.2503, fedora-cvs-commits <=