From: Greg Kroah-Hartman Date: Wed, 12 May 2010 23:19:30 +0000 (-0700) Subject: .32 queue started up X-Git-Tag: v2.6.27.47~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29e7c31f4baf8b96ceab0deddd24d82255c25a87;p=thirdparty%2Fkernel%2Fstable-queue.git .32 queue started up --- diff --git a/queue-2.6.32/acpi-sleep-eliminate-duplicate-entries-in-acpisleep_dmi_table.patch b/queue-2.6.32/acpi-sleep-eliminate-duplicate-entries-in-acpisleep_dmi_table.patch new file mode 100644 index 00000000000..b45c57b3532 --- /dev/null +++ b/queue-2.6.32/acpi-sleep-eliminate-duplicate-entries-in-acpisleep_dmi_table.patch @@ -0,0 +1,126 @@ +From 7d6fb7bd1919517937ec390f6ca2d7bcf4f89fb6 Mon Sep 17 00:00:00 2001 +From: Alex Chiang +Date: Tue, 11 May 2010 10:21:38 -0600 +Subject: ACPI: sleep: eliminate duplicate entries in acpisleep_dmi_table[] + +From: Alex Chiang + +commit 7d6fb7bd1919517937ec390f6ca2d7bcf4f89fb6 upstream. + +Duplicate entries ended up acpisleep_dmi_table[] by accident. +They don't hurt functionality, but they are ugly, so let's get +rid of them. + +Signed-off-by: Alex Chiang +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/sleep.c | 90 --------------------------------------------------- + 1 file changed, 1 insertion(+), 89 deletions(-) + +--- a/drivers/acpi/sleep.c ++++ b/drivers/acpi/sleep.c +@@ -475,101 +475,13 @@ static struct dmi_system_id __initdata a + }, + { + .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", ++ .ident = "Lenovo ThinkPad X201[s]", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"), + }, + }, + { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad T410", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad T510", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad W510", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad T410", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad T510", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad W510", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"), +- }, +- }, +- { +- .callback = init_set_sci_en_on_resume, +- .ident = "Lenovo ThinkPad X201", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), +- }, +- }, +- { + .callback = init_old_suspend_ordering, + .ident = "Panasonic CF51-2L", + .matches = { diff --git a/queue-2.6.32/dma-mapping-fix-dma_sync_single_range_.patch b/queue-2.6.32/dma-mapping-fix-dma_sync_single_range_.patch new file mode 100644 index 00000000000..a5af3f2c131 --- /dev/null +++ b/queue-2.6.32/dma-mapping-fix-dma_sync_single_range_.patch @@ -0,0 +1,42 @@ +From f33d7e2d2d113a63772bbc993cdec3b5327f0ef1 Mon Sep 17 00:00:00 2001 +From: FUJITA Tomonori +Date: Tue, 11 May 2010 14:06:43 -0700 +Subject: dma-mapping: fix dma_sync_single_range_* + +From: FUJITA Tomonori + +commit f33d7e2d2d113a63772bbc993cdec3b5327f0ef1 upstream. + +dma_sync_single_range_for_cpu() and dma_sync_single_range_for_device() use +a wrong address with a partial synchronization. + +Signed-off-by: FUJITA Tomonori +Reviewed-by: Konrad Rzeszutek Wilk +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/asm-generic/dma-mapping-common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/include/asm-generic/dma-mapping-common.h ++++ b/include/asm-generic/dma-mapping-common.h +@@ -131,7 +131,7 @@ static inline void dma_sync_single_range + debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); + + } else +- dma_sync_single_for_cpu(dev, addr, size, dir); ++ dma_sync_single_for_cpu(dev, addr + offset, size, dir); + } + + static inline void dma_sync_single_range_for_device(struct device *dev, +@@ -148,7 +148,7 @@ static inline void dma_sync_single_range + debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); + + } else +- dma_sync_single_for_device(dev, addr, size, dir); ++ dma_sync_single_for_device(dev, addr + offset, size, dir); + } + + static inline void diff --git a/queue-2.6.32/fbdev-bfin-t350mcqb-fb-fix-fbmem-allocation-with-blanking-lines.patch b/queue-2.6.32/fbdev-bfin-t350mcqb-fb-fix-fbmem-allocation-with-blanking-lines.patch new file mode 100644 index 00000000000..9634d1c2391 --- /dev/null +++ b/queue-2.6.32/fbdev-bfin-t350mcqb-fb-fix-fbmem-allocation-with-blanking-lines.patch @@ -0,0 +1,61 @@ +From de145b44b95b9d3212a82d1c0f29b09778ef33c5 Mon Sep 17 00:00:00 2001 +From: Michael Hennerich +Date: Tue, 11 May 2010 14:07:00 -0700 +Subject: fbdev: bfin-t350mcqb-fb: fix fbmem allocation with blanking lines + +From: Michael Hennerich + +commit de145b44b95b9d3212a82d1c0f29b09778ef33c5 upstream. + +The current allocation does not include the memory required for blanking +lines. So avoid memory corruption when multiple devices are using the DMA +memory near each other. + +Signed-off-by: Michael Hennerich +Signed-off-by: Mike Frysinger +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/bfin-t350mcqb-fb.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +--- a/drivers/video/bfin-t350mcqb-fb.c ++++ b/drivers/video/bfin-t350mcqb-fb.c +@@ -515,9 +515,9 @@ static int __devinit bfin_t350mcqb_probe + fbinfo->fbops = &bfin_t350mcqb_fb_ops; + fbinfo->flags = FBINFO_FLAG_DEFAULT; + +- info->fb_buffer = +- dma_alloc_coherent(NULL, fbinfo->fix.smem_len, &info->dma_handle, +- GFP_KERNEL); ++ info->fb_buffer = dma_alloc_coherent(NULL, fbinfo->fix.smem_len + ++ ACTIVE_VIDEO_MEM_OFFSET, ++ &info->dma_handle, GFP_KERNEL); + + if (NULL == info->fb_buffer) { + printk(KERN_ERR DRIVER_NAME +@@ -587,8 +587,8 @@ out7: + out6: + fb_dealloc_cmap(&fbinfo->cmap); + out4: +- dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, +- info->dma_handle); ++ dma_free_coherent(NULL, fbinfo->fix.smem_len + ACTIVE_VIDEO_MEM_OFFSET, ++ info->fb_buffer, info->dma_handle); + out3: + framebuffer_release(fbinfo); + out2: +@@ -611,8 +611,9 @@ static int __devexit bfin_t350mcqb_remov + free_irq(info->irq, info); + + if (info->fb_buffer != NULL) +- dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, +- info->dma_handle); ++ dma_free_coherent(NULL, fbinfo->fix.smem_len + ++ ACTIVE_VIDEO_MEM_OFFSET, info->fb_buffer, ++ info->dma_handle); + + fb_dealloc_cmap(&fbinfo->cmap); + diff --git a/queue-2.6.32/hp_accel-fix-race-in-device-removal.patch b/queue-2.6.32/hp_accel-fix-race-in-device-removal.patch new file mode 100644 index 00000000000..3d56cd30464 --- /dev/null +++ b/queue-2.6.32/hp_accel-fix-race-in-device-removal.patch @@ -0,0 +1,38 @@ +From 06efbeb4a47b6f865e1c9d175ab9d6e90b69ae9e Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Tue, 11 May 2010 14:07:03 -0700 +Subject: hp_accel: fix race in device removal + +From: Oliver Neukum + +commit 06efbeb4a47b6f865e1c9d175ab9d6e90b69ae9e upstream. + +The work queue has to be flushed after the device has been made +inaccessible. The patch closes a window during which a work queue might +remain active after the device is removed and would then lead to ACPI +calls with undefined behavior. + +Signed-off-by: Oliver Neukum +Acked-by: Eric Piel +Acked-by: Pavel Machek +Cc: Pavel Herrmann +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/hp_accel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwmon/hp_accel.c ++++ b/drivers/hwmon/hp_accel.c +@@ -324,8 +324,8 @@ static int lis3lv02d_remove(struct acpi_ + lis3lv02d_joystick_disable(); + lis3lv02d_poweroff(&lis3_dev); + +- flush_work(&hpled_led.work); + led_classdev_unregister(&hpled_led.led_classdev); ++ flush_work(&hpled_led.work); + + return lis3lv02d_remove_fs(&lis3_dev); + } diff --git a/queue-2.6.32/hugetlbfs-kill-applications-that-use-map_noreserve-with-sigbus-instead-of-oom-killer.patch b/queue-2.6.32/hugetlbfs-kill-applications-that-use-map_noreserve-with-sigbus-instead-of-oom-killer.patch new file mode 100644 index 00000000000..445cb220983 --- /dev/null +++ b/queue-2.6.32/hugetlbfs-kill-applications-that-use-map_noreserve-with-sigbus-instead-of-oom-killer.patch @@ -0,0 +1,61 @@ +From 4a6018f7f4f1075c1a5403b5ec0ee7262187b86c Mon Sep 17 00:00:00 2001 +From: Mel Gorman +Date: Tue, 11 May 2010 14:06:53 -0700 +Subject: hugetlbfs: kill applications that use MAP_NORESERVE with SIGBUS instead of OOM-killer + +From: Mel Gorman + +commit 4a6018f7f4f1075c1a5403b5ec0ee7262187b86c upstream. + +Ordinarily, application using hugetlbfs will create mappings with +reserves. For shared mappings, these pages are reserved before mmap() +returns success and for private mappings, the caller process is guaranteed +and a child process that cannot get the pages gets killed with sigbus. + +An application that uses MAP_NORESERVE gets no reservations and mmap() +will always succeed at the risk the page will not be available at fault +time. This might be used for example on very large sparse mappings where +the developer is confident the necessary huge pages exist to satisfy all +faults even though the whole mapping cannot be backed by huge pages. +Unfortunately, if an allocation does fail, VM_FAULT_OOM is returned to the +fault handler which proceeds to trigger the OOM-killer. This is +unhelpful. + +Even without hugetlbfs mounted, a user using mmap() can trivially trigger +the OOM-killer because VM_FAULT_OOM is returned (will provide example +program if desired - it's a whopping 24 lines long). It could be +considered a DOS available to an unprivileged user. + +This patch alters hugetlbfs to kill a process that uses MAP_NORESERVE +where huge pages were not available with SIGBUS instead of triggering the +OOM killer. + +This change affects hugetlb_cow() as well. I feel there is a failure case +in there, but I didn't create one. It would need a fairly specific target +in terms of the faulting application and the hugepage pool size. The +hugetlb_no_page() path is much easier to hit but both might as well be +closed. + +Signed-off-by: Mel Gorman +Cc: Lee Schermerhorn +Cc: David Rientjes +Cc: Andi Kleen +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/hugetlb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -1008,7 +1008,7 @@ static struct page *alloc_huge_page(stru + page = alloc_buddy_huge_page(h, vma, addr); + if (!page) { + hugetlb_put_quota(inode->i_mapping, chg); +- return ERR_PTR(-VM_FAULT_OOM); ++ return ERR_PTR(-VM_FAULT_SIGBUS); + } + } + diff --git a/queue-2.6.32/ipv4-udp-fix-short-packet-and-bad-checksum-logging.patch b/queue-2.6.32/ipv4-udp-fix-short-packet-and-bad-checksum-logging.patch new file mode 100644 index 00000000000..91537571dbd --- /dev/null +++ b/queue-2.6.32/ipv4-udp-fix-short-packet-and-bad-checksum-logging.patch @@ -0,0 +1,54 @@ +From ccc2d97cb7c798e785c9f198de243e2b59f7073b Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Thu, 6 May 2010 03:44:34 +0000 +Subject: ipv4: udp: fix short packet and bad checksum logging +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bjørn Mork + +commit ccc2d97cb7c798e785c9f198de243e2b59f7073b upstream. + +commit 2783ef23 moved the initialisation of saddr and daddr after +pskb_may_pull() to avoid a potential data corruption. Unfortunately +also placing it after the short packet and bad checksum error paths, +where these variables are used for logging. The result is bogus +output like + +[92238.389505] UDP: short packet: From 2.0.0.0:65535 23715/178 to 0.0.0.0:65535 + +Moving the saddr and daddr initialisation above the error paths, while still +keeping it after the pskb_may_pull() to keep the fix from commit 2783ef23. + +Signed-off-by: Bjørn Mork +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/udp.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/net/ipv4/udp.c ++++ b/net/ipv4/udp.c +@@ -1292,6 +1292,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, + + uh = udp_hdr(skb); + ulen = ntohs(uh->len); ++ saddr = ip_hdr(skb)->saddr; ++ daddr = ip_hdr(skb)->daddr; ++ + if (ulen > skb->len) + goto short_packet; + +@@ -1305,9 +1308,6 @@ int __udp4_lib_rcv(struct sk_buff *skb, + if (udp4_csum_init(skb, uh, proto)) + goto csum_error; + +- saddr = ip_hdr(skb)->saddr; +- daddr = ip_hdr(skb)->daddr; +- + if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) + return __udp4_lib_mcast_deliver(net, skb, uh, + saddr, daddr, udptable); diff --git a/queue-2.6.32/mmc-atmel-mci-fix-two-parameters-swapped.patch b/queue-2.6.32/mmc-atmel-mci-fix-two-parameters-swapped.patch new file mode 100644 index 00000000000..b42957765f1 --- /dev/null +++ b/queue-2.6.32/mmc-atmel-mci-fix-two-parameters-swapped.patch @@ -0,0 +1,41 @@ +From ebb1fea9b3adf25d7e2f643c614163af4f93a17f Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Tue, 11 May 2010 14:06:48 -0700 +Subject: mmc: atmel-mci: fix two parameters swapped + +From: Nicolas Ferre + +commit ebb1fea9b3adf25d7e2f643c614163af4f93a17f upstream. + +Two parameters were swapped in the calls to atmci_init_slot(). + +Signed-off-by: Nicolas Ferre +Reported-by: Anders Grahn +Cc: Haavard Skinnemoen +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/atmel-mci.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mmc/host/atmel-mci.c ++++ b/drivers/mmc/host/atmel-mci.c +@@ -1669,13 +1669,13 @@ static int __init atmci_probe(struct pla + ret = -ENODEV; + if (pdata->slot[0].bus_width) { + ret = atmci_init_slot(host, &pdata->slot[0], +- MCI_SDCSEL_SLOT_A, 0); ++ 0, MCI_SDCSEL_SLOT_A); + if (!ret) + nr_slots++; + } + if (pdata->slot[1].bus_width) { + ret = atmci_init_slot(host, &pdata->slot[1], +- MCI_SDCSEL_SLOT_B, 1); ++ 1, MCI_SDCSEL_SLOT_B); + if (!ret) + nr_slots++; + } diff --git a/queue-2.6.32/mmc-atmel-mci-prevent-kernel-oops-while-removing-card.patch b/queue-2.6.32/mmc-atmel-mci-prevent-kernel-oops-while-removing-card.patch new file mode 100644 index 00000000000..fcdd5fa6173 --- /dev/null +++ b/queue-2.6.32/mmc-atmel-mci-prevent-kernel-oops-while-removing-card.patch @@ -0,0 +1,51 @@ +From 009a891b22395fc86e5f34057d79fffee4509ab5 Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Tue, 11 May 2010 14:06:49 -0700 +Subject: mmc: atmel-mci: prevent kernel oops while removing card + +From: Nicolas Ferre + +commit 009a891b22395fc86e5f34057d79fffee4509ab5 upstream. + +The removing of an SD card in certain circumstances can lead to a kernel +oops if we do not make sure that the "data" field of the host structure is +valid. This patch adds a test in atmci_dma_cleanup() function and also +calls atmci_stop_dma() before throwing away the reference to data. + +Signed-off-by: Nicolas Ferre +Cc: Haavard Skinnemoen +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/atmel-mci.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/mmc/host/atmel-mci.c ++++ b/drivers/mmc/host/atmel-mci.c +@@ -530,9 +530,10 @@ static void atmci_dma_cleanup(struct atm + { + struct mmc_data *data = host->data; + +- dma_unmap_sg(&host->pdev->dev, data->sg, data->sg_len, +- ((data->flags & MMC_DATA_WRITE) +- ? DMA_TO_DEVICE : DMA_FROM_DEVICE)); ++ if (data) ++ dma_unmap_sg(&host->pdev->dev, data->sg, data->sg_len, ++ ((data->flags & MMC_DATA_WRITE) ++ ? DMA_TO_DEVICE : DMA_FROM_DEVICE)); + } + + static void atmci_stop_dma(struct atmel_mci *host) +@@ -1037,8 +1038,8 @@ static void atmci_command_complete(struc + "command error: status=0x%08x\n", status); + + if (cmd->data) { +- host->data = NULL; + atmci_stop_dma(host); ++ host->data = NULL; + mci_writel(host, IDR, MCI_NOTBUSY + | MCI_TXRDY | MCI_RXRDY + | ATMCI_DATA_ERROR_FLAGS); diff --git a/queue-2.6.32/mmc-atmel-mci-remove-data-error-interrupt-after-xfer.patch b/queue-2.6.32/mmc-atmel-mci-remove-data-error-interrupt-after-xfer.patch new file mode 100644 index 00000000000..2778ae1685f --- /dev/null +++ b/queue-2.6.32/mmc-atmel-mci-remove-data-error-interrupt-after-xfer.patch @@ -0,0 +1,34 @@ +From abc2c9fdf636c4335a8d72ac3c5ae152bca44b68 Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Tue, 11 May 2010 14:06:50 -0700 +Subject: mmc: atmel-mci: remove data error interrupt after xfer + +From: Nicolas Ferre + +commit abc2c9fdf636c4335a8d72ac3c5ae152bca44b68 upstream. + +Disable data error interrupts while we are actually recording that there +is not such errors. This will prevent, in some cases, the warning message +printed at new request queuing (in atmci_start_request()). + +Signed-off-by: Nicolas Ferre +Cc: Haavard Skinnemoen +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/atmel-mci.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/mmc/host/atmel-mci.c ++++ b/drivers/mmc/host/atmel-mci.c +@@ -1230,6 +1230,7 @@ static void atmci_tasklet_func(unsigned + } else { + data->bytes_xfered = data->blocks * data->blksz; + data->error = 0; ++ mci_writel(host, IDR, ATMCI_DATA_ERROR_FLAGS); + } + + if (!data->stop) { diff --git a/queue-2.6.32/revert-procfs-provide-stack-information-for-threads-and-its-fixup-commits.patch b/queue-2.6.32/revert-procfs-provide-stack-information-for-threads-and-its-fixup-commits.patch new file mode 100644 index 00000000000..bc711585f3b --- /dev/null +++ b/queue-2.6.32/revert-procfs-provide-stack-information-for-threads-and-its-fixup-commits.patch @@ -0,0 +1,179 @@ +From 34441427aab4bdb3069a4ffcda69a99357abcb2e Mon Sep 17 00:00:00 2001 +From: Robin Holt +Date: Tue, 11 May 2010 14:06:46 -0700 +Subject: revert "procfs: provide stack information for threads" and its fixup commits + +From: Robin Holt + +commit 34441427aab4bdb3069a4ffcda69a99357abcb2e upstream. + +Originally, commit d899bf7b ("procfs: provide stack information for +threads") attempted to introduce a new feature for showing where the +threadstack was located and how many pages are being utilized by the +stack. + +Commit c44972f1 ("procfs: disable per-task stack usage on NOMMU") was +applied to fix the NO_MMU case. + +Commit 89240ba0 ("x86, fs: Fix x86 procfs stack information for threads on +64-bit") was applied to fix a bug in ia32 executables being loaded. + +Commit 9ebd4eba7 ("procfs: fix /proc//stat stack pointer for kernel +threads") was applied to fix a bug which had kernel threads printing a +userland stack address. + +Commit 1306d603f ('proc: partially revert "procfs: provide stack +information for threads"') was then applied to revert the stack pages +being used to solve a significant performance regression. + +This patch nearly undoes the effect of all these patches. + +The reason for reverting these is it provides an unusable value in +field 28. For x86_64, a fork will result in the task->stack_start +value being updated to the current user top of stack and not the stack +start address. This unpredictability of the stack_start value makes +it worthless. That includes the intended use of showing how much stack +space a thread has. + +Other architectures will get different values. As an example, ia64 +gets 0. The do_fork() and copy_process() functions appear to treat the +stack_start and stack_size parameters as architecture specific. + +I only partially reverted c44972f1 ("procfs: disable per-task stack usage +on NOMMU") . If I had completely reverted it, I would have had to change +mm/Makefile only build pagewalk.o when CONFIG_PROC_PAGE_MONITOR is +configured. Since I could not test the builds without significant effort, +I decided to not change mm/Makefile. + +I only partially reverted 89240ba0 ("x86, fs: Fix x86 procfs stack +information for threads on 64-bit") . I left the KSTK_ESP() change in +place as that seemed worthwhile. + +Signed-off-by: Robin Holt +Cc: Stefani Seibold +Cc: KOSAKI Motohiro +Cc: Michal Simek +Cc: Ingo Molnar +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/filesystems/proc.txt | 3 +-- + fs/compat.c | 2 -- + fs/exec.c | 2 -- + fs/proc/array.c | 3 +-- + fs/proc/task_mmu.c | 19 ------------------- + include/linux/sched.h | 1 - + kernel/fork.c | 2 -- + 7 files changed, 2 insertions(+), 30 deletions(-) + +--- a/Documentation/filesystems/proc.txt ++++ b/Documentation/filesystems/proc.txt +@@ -309,7 +309,7 @@ address perms offset dev in + 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test + 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] + a7cb1000-a7cb2000 ---p 00000000 00:00 0 +-a7cb2000-a7eb2000 rw-p 00000000 00:00 0 [threadstack:001ff4b4] ++a7cb2000-a7eb2000 rw-p 00000000 00:00 0 + a7eb2000-a7eb3000 ---p 00000000 00:00 0 + a7eb3000-a7ed5000 rw-p 00000000 00:00 0 + a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 +@@ -345,7 +345,6 @@ is not associated with a file: + [stack] = the stack of the main process + [vdso] = the "virtual dynamic shared object", + the kernel system call handler +- [threadstack:xxxxxxxx] = the stack of the thread, xxxxxxxx is the stack size + + or if empty, the mapping is anonymous. + +--- a/fs/compat.c ++++ b/fs/compat.c +@@ -1532,8 +1532,6 @@ int compat_do_execve(char * filename, + if (retval < 0) + goto out; + +- current->stack_start = current->mm->start_stack; +- + /* execve succeeded */ + current->fs->in_exec = 0; + current->in_execve = 0; +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -1379,8 +1379,6 @@ int do_execve(char * filename, + if (retval < 0) + goto out; + +- current->stack_start = current->mm->start_stack; +- + /* execve succeeded */ + current->fs->in_exec = 0; + current->in_execve = 0; +--- a/fs/proc/array.c ++++ b/fs/proc/array.c +@@ -82,7 +82,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -571,7 +570,7 @@ static int do_task_stat(struct seq_file + rsslim, + mm ? mm->start_code : 0, + mm ? mm->end_code : 0, +- (permitted && mm) ? task->stack_start : 0, ++ (permitted && mm) ? mm->start_stack : 0, + esp, + eip, + /* The signal information here is obsolete. +--- a/fs/proc/task_mmu.c ++++ b/fs/proc/task_mmu.c +@@ -243,25 +243,6 @@ static void show_map_vma(struct seq_file + } else if (vma->vm_start <= mm->start_stack && + vma->vm_end >= mm->start_stack) { + name = "[stack]"; +- } else { +- unsigned long stack_start; +- struct proc_maps_private *pmp; +- +- pmp = m->private; +- stack_start = pmp->task->stack_start; +- +- if (vma->vm_start <= stack_start && +- vma->vm_end >= stack_start) { +- pad_len_spaces(m, len); +- seq_printf(m, +- "[threadstack:%08lx]", +-#ifdef CONFIG_STACK_GROWSUP +- vma->vm_end - stack_start +-#else +- stack_start - vma->vm_start +-#endif +- ); +- } + } + } else { + name = "[vdso]"; +--- a/include/linux/sched.h ++++ b/include/linux/sched.h +@@ -1541,7 +1541,6 @@ struct task_struct { + /* bitmask of trace recursion */ + unsigned long trace_recursion; + #endif /* CONFIG_TRACING */ +- unsigned long stack_start; + }; + + /* Future-safe accessor for struct task_struct's cpus_allowed. */ +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -1123,8 +1123,6 @@ static struct task_struct *copy_process( + + p->bts = NULL; + +- p->stack_start = stack_start; +- + /* Perform scheduler related setup. Assign this task to a CPU. */ + sched_fork(p, clone_flags); + diff --git a/queue-2.6.32/series b/queue-2.6.32/series new file mode 100644 index 00000000000..13404c8417d --- /dev/null +++ b/queue-2.6.32/series @@ -0,0 +1,10 @@ +ipv4-udp-fix-short-packet-and-bad-checksum-logging.patch +hp_accel-fix-race-in-device-removal.patch +fbdev-bfin-t350mcqb-fb-fix-fbmem-allocation-with-blanking-lines.patch +hugetlbfs-kill-applications-that-use-map_noreserve-with-sigbus-instead-of-oom-killer.patch +dma-mapping-fix-dma_sync_single_range_.patch +revert-procfs-provide-stack-information-for-threads-and-its-fixup-commits.patch +acpi-sleep-eliminate-duplicate-entries-in-acpisleep_dmi_table.patch +mmc-atmel-mci-fix-two-parameters-swapped.patch +mmc-atmel-mci-prevent-kernel-oops-while-removing-card.patch +mmc-atmel-mci-remove-data-error-interrupt-after-xfer.patch