[kernel] r19853 - in dists/sid/linux/debian: . patches patches/bugfix/all

Ben Hutchings benh at alioth.debian.org
Mon Feb 25 00:34:36 UTC 2013


Author: benh
Date: Mon Feb 25 00:34:36 2013
New Revision: 19853

Log:
Cherry-pick some upstream fixes for data loss

Added:
   dists/sid/linux/debian/patches/bugfix/all/USB-usb-storage-unusual_devs-update-for-Super-TOP-SA.patch
   dists/sid/linux/debian/patches/bugfix/all/mm-fix-pageblock-bitmap-allocation.patch
Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/patches/series

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Mon Feb 25 00:18:38 2013	(r19852)
+++ dists/sid/linux/debian/changelog	Mon Feb 25 00:34:36 2013	(r19853)
@@ -180,6 +180,8 @@
     - drm/radeon: prevent crash in the ring space allocation
   * linux-image-dbg: Add symlinks to vmlinux from the locations expected by
     kdump-tools (Closes: #700418), systemtap and others
+  * mm: fix pageblock bitmap allocation (fixes regression in 3.2.38)
+  * USB: usb-storage: unusual_devs update for Super TOP SATA bridge
 
   [ Aurelien Jarno ]
   * [armhf/vexpress] Add kernel udebs.

Added: dists/sid/linux/debian/patches/bugfix/all/USB-usb-storage-unusual_devs-update-for-Super-TOP-SA.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/bugfix/all/USB-usb-storage-unusual_devs-update-for-Super-TOP-SA.patch	Mon Feb 25 00:34:36 2013	(r19853)
@@ -0,0 +1,38 @@
+From: Josh Boyer <jwboyer at redhat.com>
+Date: Thu, 14 Feb 2013 09:39:09 -0500
+Subject: USB: usb-storage: unusual_devs update for Super TOP SATA bridge
+
+commit 18e03310b5caa6d11c1a8c61b982c37047693fba upstream.
+
+The current entry in unusual_cypress.h for the Super TOP SATA bridge devices
+seems to be causing corruption on newer revisions of this device.  This has
+been reported in Arch Linux and Fedora.  The original patch was tested on
+devices with bcdDevice of 1.60, whereas the newer devices report bcdDevice
+as 2.20.  Limit the UNUSUAL_DEV entry to devices less than 2.20.
+
+This fixes https://bugzilla.redhat.com/show_bug.cgi?id=909591
+
+The Arch Forum post on this is here:
+	https://bbs.archlinux.org/viewtopic.php?id=152011
+
+Reported-by: Carsten S. <carsteniq at yahoo.com>
+Tested-by: Carsten S. <carsteniq at yahoo.com>
+Signed-off-by: Josh Boyer <jwboyer at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ drivers/usb/storage/unusual_cypress.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h
+index 2c85530..65a6a75 100644
+--- a/drivers/usb/storage/unusual_cypress.h
++++ b/drivers/usb/storage/unusual_cypress.h
+@@ -31,7 +31,7 @@ UNUSUAL_DEV(  0x04b4, 0x6831, 0x0000, 0x9999,
+ 		"Cypress ISD-300LP",
+ 		USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
+ 
+-UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x9999,
++UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x0219,
+ 		"Super Top",
+ 		"USB 2.0  SATA BRIDGE",
+ 		USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),

Added: dists/sid/linux/debian/patches/bugfix/all/mm-fix-pageblock-bitmap-allocation.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/bugfix/all/mm-fix-pageblock-bitmap-allocation.patch	Mon Feb 25 00:34:36 2013	(r19853)
@@ -0,0 +1,80 @@
+From: Linus Torvalds <torvalds at linux-foundation.org>
+Date: Mon, 18 Feb 2013 09:58:02 -0800
+Subject: mm: fix pageblock bitmap allocation
+
+commit 7c45512df987c5619db041b5c9b80d281e26d3db upstream.
+
+Commit c060f943d092 ("mm: use aligned zone start for pfn_to_bitidx
+calculation") fixed out calculation of the index into the pageblock
+bitmap when a !SPARSEMEM zome was not aligned to pageblock_nr_pages.
+
+However, the _allocation_ of that bitmap had never taken this alignment
+requirement into accout, so depending on the exact size and alignment of
+the zone, the use of that index could then access past the allocation,
+resulting in some very subtle memory corruption.
+
+This was reported (and bisected) by Ingo Molnar: one of his random
+config builds would hang with certain very specific kernel command line
+options.
+
+In the meantime, commit c060f943d092 has been marked for stable, so this
+fix needs to be back-ported to the stable kernels that backported the
+commit to use the right alignment.
+
+Bisected-and-tested-by: Ingo Molnar <mingo at kernel.org>
+Acked-by: Mel Gorman <mgorman at suse.de>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+---
+ mm/page_alloc.c |   15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 9673d96..6a83cd3 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -4420,10 +4420,11 @@ static void __meminit calculate_node_totalpages(struct pglist_data *pgdat,
+  * round what is now in bits to nearest long in bits, then return it in
+  * bytes.
+  */
+-static unsigned long __init usemap_size(unsigned long zonesize)
++static unsigned long __init usemap_size(unsigned long zone_start_pfn, unsigned long zonesize)
+ {
+ 	unsigned long usemapsize;
+ 
++	zonesize += zone_start_pfn & (pageblock_nr_pages-1);
+ 	usemapsize = roundup(zonesize, pageblock_nr_pages);
+ 	usemapsize = usemapsize >> pageblock_order;
+ 	usemapsize *= NR_PAGEBLOCK_BITS;
+@@ -4433,17 +4434,19 @@ static unsigned long __init usemap_size(unsigned long zonesize)
+ }
+ 
+ static void __init setup_usemap(struct pglist_data *pgdat,
+-				struct zone *zone, unsigned long zonesize)
++				struct zone *zone,
++				unsigned long zone_start_pfn,
++				unsigned long zonesize)
+ {
+-	unsigned long usemapsize = usemap_size(zonesize);
++	unsigned long usemapsize = usemap_size(zone_start_pfn, zonesize);
+ 	zone->pageblock_flags = NULL;
+ 	if (usemapsize)
+ 		zone->pageblock_flags = alloc_bootmem_node_nopanic(pgdat,
+ 								   usemapsize);
+ }
+ #else
+-static inline void setup_usemap(struct pglist_data *pgdat,
+-				struct zone *zone, unsigned long zonesize) {}
++static inline void setup_usemap(struct pglist_data *pgdat, struct zone *zone,
++				unsigned long zone_start_pfn, unsigned long zonesize) {}
+ #endif /* CONFIG_SPARSEMEM */
+ 
+ #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
+@@ -4594,7 +4597,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
+ 			continue;
+ 
+ 		set_pageblock_order();
+-		setup_usemap(pgdat, zone, size);
++		setup_usemap(pgdat, zone, zone_start_pfn, size);
+ 		ret = init_currently_empty_zone(zone, zone_start_pfn,
+ 						size, MEMMAP_EARLY);
+ 		BUG_ON(ret);

Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series	Mon Feb 25 00:18:38 2013	(r19852)
+++ dists/sid/linux/debian/patches/series	Mon Feb 25 00:34:36 2013	(r19853)
@@ -626,3 +626,5 @@
 bugfix/all/mm-Try-harder-to-allocate-vmemmap-blocks.patch
 bugfix/x86/efi-Clear-EFI_RUNTIME_SERVICES-rather-than-EFI_BOOT-.patch
 bugfix/x86/x86-efi-Make-noefi-really-disable-EFI-runtime-serivc.patch
+bugfix/all/mm-fix-pageblock-bitmap-allocation.patch
+bugfix/all/USB-usb-storage-unusual_devs-update-for-Super-TOP-SA.patch



More information about the Kernel-svn-changes mailing list