From: Greg Kroah-Hartman Date: Mon, 4 May 2009 22:15:38 +0000 (-0700) Subject: more .27 patches X-Git-Tag: v2.6.27.23~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24899d1f38404e2309697071e70e46db8197781a;p=thirdparty%2Fkernel%2Fstable-queue.git more .27 patches --- diff --git a/queue-2.6.27/kbuild-fix-module.markers-permission-error-under-cygwin.patch b/queue-2.6.27/kbuild-fix-module.markers-permission-error-under-cygwin.patch new file mode 100644 index 00000000000..e2a45387499 --- /dev/null +++ b/queue-2.6.27/kbuild-fix-module.markers-permission-error-under-cygwin.patch @@ -0,0 +1,49 @@ +From 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185 Mon Sep 17 00:00:00 2001 +From: Cedric Hombourger +Date: Sat, 25 Apr 2009 09:38:21 +0200 +Subject: kbuild: fix Module.markers permission error under cygwin + +From: Cedric Hombourger + +commit 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185 upstream. + +While building the kernel, we end-up calling modpost with -K and -M +options for the same file (Modules.markers). This is resulting in +modpost's main function calling read_markers() and then write_markers() on +the same file. + +We then have read_markers() mmap'ing the file, and writer_markers() +opening that same file for writing. + +The issue is that read_markers() exits without munmap'ing the file and is +as a matter holding a reference on Modules.markers. When write_markers() +is opening that very same file for writing, we still have a reference on +it and cygwin (Windows?) is then making fopen() fail with EPERM. + +Calling release_file() before exiting read_markers() clears that reference +(and memory leak) and fopen() then succeeds. + +Tested on both cygwin (1.3.22) and Linux. Also ran modpost within +valgrind on Linux to make sure that the munmap'ed file was not accessed +after read_markers() + +Signed-off-by: Cedric Hombourger +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Sam Ravnborg +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/mod/modpost.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/scripts/mod/modpost.c ++++ b/scripts/mod/modpost.c +@@ -1997,6 +1997,7 @@ static void read_markers(const char *fna + if (!mod->skip) + add_marker(mod, marker, fmt); + } ++ release_file(file, size); + return; + fail: + fatal("parse error in markers list file\n"); diff --git a/queue-2.6.27/pagemap-require-aligned-length-non-null-reads-of-proc-pid-pagemap.patch b/queue-2.6.27/pagemap-require-aligned-length-non-null-reads-of-proc-pid-pagemap.patch new file mode 100644 index 00000000000..b9801537b64 --- /dev/null +++ b/queue-2.6.27/pagemap-require-aligned-length-non-null-reads-of-proc-pid-pagemap.patch @@ -0,0 +1,42 @@ +From 0816178638c15ce5472d39d771a96860dff4141a Mon Sep 17 00:00:00 2001 +From: Vitaly Mayatskikh +Date: Thu, 30 Apr 2009 15:08:18 -0700 +Subject: pagemap: require aligned-length, non-null reads of /proc/pid/pagemap + +From: Vitaly Mayatskikh + +commit 0816178638c15ce5472d39d771a96860dff4141a upstream. + +The intention of commit aae8679b0ebcaa92f99c1c3cb0cd651594a43915 +("pagemap: fix bug in add_to_pagemap, require aligned-length reads of +/proc/pid/pagemap") was to force reads of /proc/pid/pagemap to be a +multiple of 8 bytes, but now it allows to read 0 bytes, which actually +puts some data to user's buffer. According to POSIX, if count is zero, +read() should return zero and has no other results. + +Signed-off-by: Vitaly Mayatskikh +Cc: Thomas Tuttle +Acked-by: Matt Mackall +Cc: Alexey Dobriyan +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/proc/task_mmu.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/fs/proc/task_mmu.c ++++ b/fs/proc/task_mmu.c +@@ -665,6 +665,10 @@ static ssize_t pagemap_read(struct file + goto out_task; + + ret = 0; ++ ++ if (!count) ++ goto out_task; ++ + mm = get_task_mm(task); + if (!mm) + goto out_task; diff --git a/queue-2.6.27/pci-quirk-disable-msi-on-via-vt3364-chipsets.patch b/queue-2.6.27/pci-quirk-disable-msi-on-via-vt3364-chipsets.patch new file mode 100644 index 00000000000..5449d1a8d7c --- /dev/null +++ b/queue-2.6.27/pci-quirk-disable-msi-on-via-vt3364-chipsets.patch @@ -0,0 +1,33 @@ +From 162dedd39dcc6eca3fc0d29cf19658c6c13b840e Mon Sep 17 00:00:00 2001 +From: Thomas Renninger +Date: Fri, 3 Apr 2009 06:34:00 -0700 +Subject: PCI quirk: disable MSI on VIA VT3364 chipsets + +From: Thomas Renninger + +commit 162dedd39dcc6eca3fc0d29cf19658c6c13b840e upstream. + +Without this patch, Broadcom BCM5906 Ethernet controllers set up via MSI +cause the machine to hang. Tejun agreed that the best is to blacklist +the whole chipset and after adding it, seeing the other VIA quirks +disabling MSI, this very much looks like the right way. + +Cc: +Signed-off-by: Thomas Renninger +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -1832,6 +1832,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi); + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi); + + /* Disable MSI on chipsets that are known to not support it */ + static void __devinit quirk_disable_msi(struct pci_dev *dev) diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 5957dc7b44d..e886eb9e05f 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -4,3 +4,7 @@ usb-unusual-device-support-for-gold-mp3-player-energy.patch forcedeth-fix-resume-from-hibernation-regression.patch b43-poison-rx-buffers.patch b43-refresh-rx-poison-on-buffer-recycling.patch +kbuild-fix-module.markers-permission-error-under-cygwin.patch +pagemap-require-aligned-length-non-null-reads-of-proc-pid-pagemap.patch +pci-quirk-disable-msi-on-via-vt3364-chipsets.patch +x86-pci-don-t-call-e820_all_mapped-with-1-in-the-mmconfig-case.patch diff --git a/queue-2.6.27/x86-pci-don-t-call-e820_all_mapped-with-1-in-the-mmconfig-case.patch b/queue-2.6.27/x86-pci-don-t-call-e820_all_mapped-with-1-in-the-mmconfig-case.patch new file mode 100644 index 00000000000..b294802542f --- /dev/null +++ b/queue-2.6.27/x86-pci-don-t-call-e820_all_mapped-with-1-in-the-mmconfig-case.patch @@ -0,0 +1,50 @@ +From 044cd80942e47b9de0915b627902adf05c52377f Mon Sep 17 00:00:00 2001 +From: Yinghai Lu +Date: Sat, 18 Apr 2009 01:43:46 -0700 +Subject: x86/PCI: don't call e820_all_mapped with -1 in the mmconfig case + +From: Yinghai Lu + +commit 044cd80942e47b9de0915b627902adf05c52377f upstream. + +e820_all_mapped need end is (addr + size) instead of (addr + size - 1) + +Cc: stable@kernel.org +Acked-by: Ingo Molnar +Signed-off-by: Yinghai Lu +Signed-off-by: Jesse Barnes +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/pci/mmconfig-shared.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/x86/pci/mmconfig-shared.c ++++ b/arch/x86/pci/mmconfig-shared.c +@@ -255,7 +255,7 @@ static acpi_status __init check_mcfg_res + if (!fixmem32) + return AE_OK; + if ((mcfg_res->start >= fixmem32->address) && +- (mcfg_res->end < (fixmem32->address + ++ (mcfg_res->end <= (fixmem32->address + + fixmem32->address_length))) { + mcfg_res->flags = 1; + return AE_CTRL_TERMINATE; +@@ -272,7 +272,7 @@ static acpi_status __init check_mcfg_res + return AE_OK; + + if ((mcfg_res->start >= address.minimum) && +- (mcfg_res->end < (address.minimum + address.address_length))) { ++ (mcfg_res->end <= (address.minimum + address.address_length))) { + mcfg_res->flags = 1; + return AE_CTRL_TERMINATE; + } +@@ -319,7 +319,7 @@ static int __init is_mmconf_reserved(che + u64 old_size = size; + int valid = 0; + +- while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) { ++ while (!is_reserved(addr, addr + size, E820_RESERVED)) { + size >>= 1; + if (size < (16UL<<20)) + break;