From: Greg Kroah-Hartman Date: Mon, 8 Mar 2010 20:46:34 +0000 (-0800) Subject: start .33 queue X-Git-Tag: v2.6.32.10~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=512acc31725daddbf2cac10ac2ab07f6994c95d3;p=thirdparty%2Fkernel%2Fstable-queue.git start .33 queue --- diff --git a/queue-2.6.33/ahci-disable-fpdma-auto-activate-optimization-on-nvidia-ahci.patch b/queue-2.6.33/ahci-disable-fpdma-auto-activate-optimization-on-nvidia-ahci.patch new file mode 100644 index 00000000000..86dcbaec4d4 --- /dev/null +++ b/queue-2.6.33/ahci-disable-fpdma-auto-activate-optimization-on-nvidia-ahci.patch @@ -0,0 +1,51 @@ +From 453d3131ec7aab82eaaa8401a50522a337092aa8 Mon Sep 17 00:00:00 2001 +From: Robert Hancock +Date: Tue, 26 Jan 2010 22:33:23 -0600 +Subject: ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI + +From: Robert Hancock + +commit 453d3131ec7aab82eaaa8401a50522a337092aa8 upstream. + +Mike Cui reported that his system with an NVIDIA MCP79 (aka MCP7A) +chipset stopped working with 2.6.32. The problem appears to be that +2.6.32 now enables the FPDMA auto-activate optimization in the ahci +driver. The drive works fine with this enabled on an Intel AHCI so +this appears to be a chipset bug. Since MCP79 is a fairly recent +NVIDIA chipset and we don't have any info on whether any other NVIDIA +chipsets have this issue, disable FPDMA AA optimization on all NVIDIA +AHCI controllers for now. + +Should address http://bugzilla.kernel.org/show_bug.cgi?id=14922 + +Signed-off-by: Robert Hancock +While-we-investigate-issue-this-patch-looks-good-to-me-by: + Prajakta Gudadhe +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ahci.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/ata/ahci.c ++++ b/drivers/ata/ahci.c +@@ -3082,8 +3082,16 @@ static int ahci_init_one(struct pci_dev + ahci_save_initial_config(pdev, hpriv); + + /* prepare host */ +- if (hpriv->cap & HOST_CAP_NCQ) +- pi.flags |= ATA_FLAG_NCQ | ATA_FLAG_FPDMA_AA; ++ if (hpriv->cap & HOST_CAP_NCQ) { ++ pi.flags |= ATA_FLAG_NCQ; ++ /* Auto-activate optimization is supposed to be supported on ++ all AHCI controllers indicating NCQ support, but it seems ++ to be broken at least on some NVIDIA MCP79 chipsets. ++ Until we get info on which NVIDIA chipsets don't have this ++ issue, if any, disable AA on all NVIDIA AHCIs. */ ++ if (pdev->vendor != PCI_VENDOR_ID_NVIDIA) ++ pi.flags |= ATA_FLAG_FPDMA_AA; ++ } + + if (hpriv->cap & HOST_CAP_PMP) + pi.flags |= ATA_FLAG_PMP; diff --git a/queue-2.6.33/netlabel-fix-export-of-selinux-categories-127.patch b/queue-2.6.33/netlabel-fix-export-of-selinux-categories-127.patch new file mode 100644 index 00000000000..c514e6f2884 --- /dev/null +++ b/queue-2.6.33/netlabel-fix-export-of-selinux-categories-127.patch @@ -0,0 +1,35 @@ +From c36f74e67fa12202dbcb4ad92c5ac844f9d36b98 Mon Sep 17 00:00:00 2001 +From: Joshua Roys +Date: Wed, 24 Feb 2010 18:52:44 -0500 +Subject: netlabel: fix export of SELinux categories > 127 + +From: Joshua Roys + +commit c36f74e67fa12202dbcb4ad92c5ac844f9d36b98 upstream. + +This fixes corrupted CIPSO packets when SELinux categories greater than 127 +are used. The bug occured on the second (and later) loops through the +while; the inner for loop through the ebitmap->maps array used the same +index as the NetLabel catmap->bitmap array, even though the NetLabel bitmap +is twice as long as the SELinux bitmap. + +Signed-off-by: Joshua Roys +Acked-by: Paul Moore +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + security/selinux/ss/ebitmap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/security/selinux/ss/ebitmap.c ++++ b/security/selinux/ss/ebitmap.c +@@ -128,7 +128,7 @@ int ebitmap_netlbl_export(struct ebitmap + cmap_idx = delta / NETLBL_CATMAP_MAPSIZE; + cmap_sft = delta % NETLBL_CATMAP_MAPSIZE; + c_iter->bitmap[cmap_idx] +- |= e_iter->maps[cmap_idx] << cmap_sft; ++ |= e_iter->maps[i] << cmap_sft; + } + e_iter = e_iter->next; + } diff --git a/queue-2.6.33/pci-hotplug-check-ioremap-return-value-in-ibmphp_ebda.c.patch b/queue-2.6.33/pci-hotplug-check-ioremap-return-value-in-ibmphp_ebda.c.patch new file mode 100644 index 00000000000..34d6707b2b9 --- /dev/null +++ b/queue-2.6.33/pci-hotplug-check-ioremap-return-value-in-ibmphp_ebda.c.patch @@ -0,0 +1,30 @@ +From ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 Mon Sep 17 00:00:00 2001 +From: Andrew Morton +Date: Tue, 2 Feb 2010 14:45:54 -0800 +Subject: PCI hotplug: check ioremap() return value in ibmphp_ebda.c + +From: Andrew Morton + +commit ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 upstream. + +check ioremap() return value. + +Signed-off-by: Andrew Morton +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/hotplug/ibmphp_ebda.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/pci/hotplug/ibmphp_ebda.c ++++ b/drivers/pci/hotplug/ibmphp_ebda.c +@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void) + debug ("returned ebda segment: %x\n", ebda_seg); + + io_mem = ioremap(ebda_seg<<4, 1); ++ if (!io_mem) ++ return -ENOMEM; + ebda_sz = readb(io_mem); + iounmap(io_mem); + debug("ebda size: %d(KiB)\n", ebda_sz); diff --git a/queue-2.6.33/pci-hotplug-ibmphp-read-the-length-of-ebda-and-map-entire-ebda-region.patch b/queue-2.6.33/pci-hotplug-ibmphp-read-the-length-of-ebda-and-map-entire-ebda-region.patch new file mode 100644 index 00000000000..766e7db009c --- /dev/null +++ b/queue-2.6.33/pci-hotplug-ibmphp-read-the-length-of-ebda-and-map-entire-ebda-region.patch @@ -0,0 +1,51 @@ +From b0fc889c4311835ae7d02f433154bc20cad9ee11 Mon Sep 17 00:00:00 2001 +From: Chandru +Date: Mon, 11 Jan 2010 11:49:21 +0530 +Subject: PCI hotplug: ibmphp: read the length of ebda and map entire ebda region + +From: Chandru + +commit b0fc889c4311835ae7d02f433154bc20cad9ee11 upstream. + +ibmphp driver currently maps only 1KB of ebda memory area into kernel address +space during driver initialization. This causes kernel oops when the driver is +modprobe'd and it accesses memory beyond 1KB within ebda segment. The first +byte of ebda segment actually stores the length of the ebda region in +Kilobytes. Hence make use of the length parameter and map the entire ebda +region. + +Signed-off-by: Chandru Siddalingappa +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/hotplug/ibmphp_ebda.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/drivers/pci/hotplug/ibmphp_ebda.c ++++ b/drivers/pci/hotplug/ibmphp_ebda.c +@@ -245,7 +245,7 @@ static void __init print_ebda_hpc (void) + + int __init ibmphp_access_ebda (void) + { +- u8 format, num_ctlrs, rio_complete, hs_complete; ++ u8 format, num_ctlrs, rio_complete, hs_complete, ebda_sz; + u16 ebda_seg, num_entries, next_offset, offset, blk_id, sub_addr, re, rc_id, re_id, base; + int rc = 0; + +@@ -260,7 +260,14 @@ int __init ibmphp_access_ebda (void) + iounmap (io_mem); + debug ("returned ebda segment: %x\n", ebda_seg); + +- io_mem = ioremap(ebda_seg<<4, 1024); ++ io_mem = ioremap(ebda_seg<<4, 1); ++ ebda_sz = readb(io_mem); ++ iounmap(io_mem); ++ debug("ebda size: %d(KiB)\n", ebda_sz); ++ if (ebda_sz == 0) ++ return -ENOMEM; ++ ++ io_mem = ioremap(ebda_seg<<4, (ebda_sz * 1024)); + if (!io_mem ) + return -ENOMEM; + next_offset = 0x180; diff --git a/queue-2.6.33/security-fix-error-return-path-in-ima_inode_alloc.patch b/queue-2.6.33/security-fix-error-return-path-in-ima_inode_alloc.patch new file mode 100644 index 00000000000..045bb75a7cc --- /dev/null +++ b/queue-2.6.33/security-fix-error-return-path-in-ima_inode_alloc.patch @@ -0,0 +1,37 @@ +From baac35c4155a8aa826c70acee6553368ca5243a2 Mon Sep 17 00:00:00 2001 +From: Xiaotian Feng +Date: Wed, 24 Feb 2010 18:39:02 +0800 +Subject: security: fix error return path in ima_inode_alloc + +From: Xiaotian Feng + +commit baac35c4155a8aa826c70acee6553368ca5243a2 upstream. + +If radix_tree_preload is failed in ima_inode_alloc, we don't need +radix_tree_preload_end because kernel is alread preempt enabled + +Signed-off-by: Xiaotian Feng +Signed-off-by: Mimi Zohar +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + security/integrity/ima/ima_iint.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/security/integrity/ima/ima_iint.c ++++ b/security/integrity/ima/ima_iint.c +@@ -63,12 +63,11 @@ int ima_inode_alloc(struct inode *inode) + spin_lock(&ima_iint_lock); + rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint); + spin_unlock(&ima_iint_lock); ++ radix_tree_preload_end(); + out: + if (rc < 0) + kmem_cache_free(iint_cache, iint); + +- radix_tree_preload_end(); +- + return rc; + } + diff --git a/queue-2.6.33/series b/queue-2.6.33/series new file mode 100644 index 00000000000..d51fe28c8c2 --- /dev/null +++ b/queue-2.6.33/series @@ -0,0 +1,5 @@ +ahci-disable-fpdma-auto-activate-optimization-on-nvidia-ahci.patch +netlabel-fix-export-of-selinux-categories-127.patch +pci-hotplug-ibmphp-read-the-length-of-ebda-and-map-entire-ebda-region.patch +pci-hotplug-check-ioremap-return-value-in-ibmphp_ebda.c.patch +security-fix-error-return-path-in-ima_inode_alloc.patch