From: Greg Kroah-Hartman Date: Tue, 3 Aug 2010 19:49:29 +0000 (-0700) Subject: .34 patches X-Git-Tag: v2.6.27.50~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b6aa9ce25e1d177e37400cd0be384dee08cb5d8;p=thirdparty%2Fkernel%2Fstable-queue.git .34 patches --- diff --git a/queue-2.6.34/comedi-uncripple-8255-based-dio-subdevices.patch b/queue-2.6.34/comedi-uncripple-8255-based-dio-subdevices.patch new file mode 100644 index 00000000000..eaeba51808a --- /dev/null +++ b/queue-2.6.34/comedi-uncripple-8255-based-dio-subdevices.patch @@ -0,0 +1,71 @@ +From abbotti@mev.co.uk Tue Aug 3 12:41:35 2010 +From: Ian Abbott +Date: Fri, 30 Jul 2010 14:42:28 +0100 +Subject: comedi: Uncripple 8255-based DIO subdevices +To: +Cc: Ian Abbott +Message-ID: <1280497348-5885-1-git-send-email-abbotti@mev.co.uk> + + +(Note: upstream comedi configuration has been overhauled, so this patch +does not apply there.) + +Several comedi drivers call subdev_8255_init() (declared in +"drivers/staging/comedi/drivers/8255.h") to set up one or more DIO +subdevices. This should be provided by the 8255.ko module, but unless +the CONFIG_COMEDI_8255 or CONFIG_COMEDI_8255_MODULE macro is defined, +the 8255.h header uses a dummy inline version of the function instead. +This means the comedi devices end up with an "unused" subdevice with 0 +channels instead of a "DIO" subdevice with 24 channels! + +This patch provides a non-interactive COMEDI_8255 option and selects it +whenever the COMEDI_PCI_DRIVERS or COMEDI_PCMCIA_DRIVERS options are +selected. + +Signed-off-by: Ian Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/Kconfig | 5 +++++ + drivers/staging/comedi/drivers/Makefile | 4 +++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/staging/comedi/Kconfig ++++ b/drivers/staging/comedi/Kconfig +@@ -16,6 +16,7 @@ config COMEDI_DEBUG + config COMEDI_PCI_DRIVERS + tristate "Comedi PCI drivers" + depends on COMEDI && PCI ++ select COMEDI_8255 + default N + ---help--- + Enable lots of comedi PCI drivers to be built +@@ -23,6 +24,7 @@ config COMEDI_PCI_DRIVERS + config COMEDI_PCMCIA_DRIVERS + tristate "Comedi PCMCIA drivers" + depends on COMEDI && PCMCIA && PCCARD ++ select COMEDI_8255 + default N + ---help--- + Enable lots of comedi PCMCIA and PCCARD drivers to be built +@@ -33,3 +35,6 @@ config COMEDI_USB_DRIVERS + default N + ---help--- + Enable lots of comedi USB drivers to be built ++ ++config COMEDI_8255 ++ tristate +--- a/drivers/staging/comedi/drivers/Makefile ++++ b/drivers/staging/comedi/drivers/Makefile +@@ -8,8 +8,10 @@ obj-$(CONFIG_COMEDI) += comedi_test.o + obj-$(CONFIG_COMEDI) += comedi_parport.o + obj-$(CONFIG_COMEDI) += pcm_common.o + ++# Comedi 8255 module ++obj-$(CONFIG_COMEDI_8255) += 8255.o ++ + # Comedi PCI drivers +-obj-$(CONFIG_COMEDI_PCI_DRIVERS) += 8255.o + obj-$(CONFIG_COMEDI_PCI_DRIVERS) += acl7225b.o + obj-$(CONFIG_COMEDI_PCI_DRIVERS) += addi_apci_035.o + obj-$(CONFIG_COMEDI_PCI_DRIVERS) += addi_apci_1032.o diff --git a/queue-2.6.34/mm-fix-ia64-crash-when-gcore-reads-gate-area.patch b/queue-2.6.34/mm-fix-ia64-crash-when-gcore-reads-gate-area.patch new file mode 100644 index 00000000000..a5112bc424a --- /dev/null +++ b/queue-2.6.34/mm-fix-ia64-crash-when-gcore-reads-gate-area.patch @@ -0,0 +1,63 @@ +From de51257aa301652876ab6e8f13ea4eadbe4a3846 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Fri, 30 Jul 2010 10:58:26 -0700 +Subject: mm: fix ia64 crash when gcore reads gate area + +From: Hugh Dickins + +commit de51257aa301652876ab6e8f13ea4eadbe4a3846 upstream. + +Debian's ia64 autobuilders have been seeing kernel freeze or reboot +when running the gdb testsuite (Debian bug 588574): dannf bisected to +2.6.32 62eede62dafb4a6633eae7ffbeb34c60dba5e7b1 "mm: ZERO_PAGE without +PTE_SPECIAL"; and reproduced it with gdb's gcore on a simple target. + +I'd missed updating the gate_vma handling in __get_user_pages(): that +happens to use vm_normal_page() (nowadays failing on the zero page), +yet reported success even when it failed to get a page - boom when +access_process_vm() tried to copy that to its intermediate buffer. + +Fix this, resisting cleanups: in particular, leave it for now reporting +success when not asked to get any pages - very probably safe to change, +but let's not risk it without testing exposure. + +Why did ia64 crash with 16kB pages, but succeed with 64kB pages? +Because setup_gate() pads each 64kB of its gate area with zero pages. + +Reported-by: Andreas Barth +Bisected-by: dann frazier +Signed-off-by: Hugh Dickins +Tested-by: dann frazier +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +--- a/mm/memory.c ++++ b/mm/memory.c +@@ -1385,10 +1385,20 @@ int __get_user_pages(struct task_struct + return i ? : -EFAULT; + } + if (pages) { +- struct page *page = vm_normal_page(gate_vma, start, *pte); ++ struct page *page; ++ ++ page = vm_normal_page(gate_vma, start, *pte); ++ if (!page) { ++ if (!(gup_flags & FOLL_DUMP) && ++ is_zero_pfn(pte_pfn(*pte))) ++ page = pte_page(*pte); ++ else { ++ pte_unmap(pte); ++ return i ? : -EFAULT; ++ } ++ } + pages[i] = page; +- if (page) +- get_page(page); ++ get_page(page); + } + pte_unmap(pte); + if (vmas) diff --git a/queue-2.6.34/nfs-kswapd-must-not-block-in-nfs_release_page.patch b/queue-2.6.34/nfs-kswapd-must-not-block-in-nfs_release_page.patch new file mode 100644 index 00000000000..fb0f491c899 --- /dev/null +++ b/queue-2.6.34/nfs-kswapd-must-not-block-in-nfs_release_page.patch @@ -0,0 +1,86 @@ +From b608b283a962caaa280756bc8563016a71712acf Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Fri, 30 Jul 2010 15:31:54 -0400 +Subject: NFS: kswapd must not block in nfs_release_page + +From: Trond Myklebust + +commit b608b283a962caaa280756bc8563016a71712acf upstream. + +See https://bugzilla.kernel.org/show_bug.cgi?id=16056 + +If other processes are blocked waiting for kswapd to free up some memory so +that they can make progress, then we cannot allow kswapd to block on those +processes. + +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/file.c | 13 +++++++++++-- + fs/nfs/write.c | 4 ++-- + include/linux/nfs_fs.h | 1 + + 3 files changed, 14 insertions(+), 4 deletions(-) + +--- a/fs/nfs/file.c ++++ b/fs/nfs/file.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -489,11 +490,19 @@ static void nfs_invalidate_page(struct p + */ + static int nfs_release_page(struct page *page, gfp_t gfp) + { ++ struct address_space *mapping = page->mapping; ++ + dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); + + /* Only do I/O if gfp is a superset of GFP_KERNEL */ +- if ((gfp & GFP_KERNEL) == GFP_KERNEL) +- nfs_wb_page(page->mapping->host, page); ++ if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) { ++ int how = FLUSH_SYNC; ++ ++ /* Don't let kswapd deadlock waiting for OOM RPC calls */ ++ if (current_is_kswapd()) ++ how = 0; ++ nfs_commit_inode(mapping->host, how); ++ } + /* If PagePrivate() is set, then the page is not freeable */ + if (PagePrivate(page)) + return 0; +--- a/fs/nfs/write.c ++++ b/fs/nfs/write.c +@@ -1379,7 +1379,7 @@ static const struct rpc_call_ops nfs_com + .rpc_release = nfs_commit_release, + }; + +-static int nfs_commit_inode(struct inode *inode, int how) ++int nfs_commit_inode(struct inode *inode, int how) + { + LIST_HEAD(head); + int may_wait = how & FLUSH_SYNC; +@@ -1443,7 +1443,7 @@ out_mark_dirty: + return ret; + } + #else +-static int nfs_commit_inode(struct inode *inode, int how) ++int nfs_commit_inode(struct inode *inode, int how) + { + return 0; + } +--- a/include/linux/nfs_fs.h ++++ b/include/linux/nfs_fs.h +@@ -479,6 +479,7 @@ extern int nfs_wb_all(struct inode *inod + extern int nfs_wb_page(struct inode *inode, struct page* page); + extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); + #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) ++extern int nfs_commit_inode(struct inode *, int); + extern struct nfs_write_data *nfs_commitdata_alloc(void); + extern void nfs_commit_free(struct nfs_write_data *wdata); + #endif