From: Greg Kroah-Hartman Date: Tue, 3 Aug 2010 19:50:07 +0000 (-0700) Subject: queue-2.6.32 X-Git-Tag: v2.6.27.50~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac4644a1a6aa3de7e74c1b309ab77eab62db0e97;p=thirdparty%2Fkernel%2Fstable-queue.git queue-2.6.32 .32 patches --- diff --git a/queue-2.6.32/acl-trouble-after-upgrading-ubuntu.patch b/queue-2.6.32/acl-trouble-after-upgrading-ubuntu.patch new file mode 100644 index 00000000000..826ab92c133 --- /dev/null +++ b/queue-2.6.32/acl-trouble-after-upgrading-ubuntu.patch @@ -0,0 +1,34 @@ +From d327cf7449e6fd5cbac784c641770e9366faa386 Mon Sep 17 00:00:00 2001 +From: J. Bruce Fields +Date: Thu, 3 Dec 2009 08:10:17 -0500 +Subject: Re: acl trouble after upgrading ubuntu + +From: J. Bruce Fields + +commit d327cf7449e6fd5cbac784c641770e9366faa386 upstream. + +Subject: nfs: fix acl decoding + +Commit 28f566942c6b1d929f5e240e69e7081b77b238d3 "NFS: use dynamically +computed compound_hdr.replen for xdr_inline_pages offset" accidentally +changed the amount of space to allow for the acl reply, resulting in an +IO error on attempts to get an acl. + +Reported-by: Paul Rudin +Cc: Benny Halevy +Signed-off-by: J. Bruce Fields +Signed-off-by: Trond Myklebust +Cc: Jeremy Kerr +Signed-off-by: Greg Kroah-Hartman + +--- a/fs/nfs/nfs4xdr.c ++++ b/fs/nfs/nfs4xdr.c +@@ -2096,7 +2096,7 @@ nfs4_xdr_enc_getacl(struct rpc_rqst *req, __be32 *p, + encode_compound_hdr(&xdr, req, &hdr); + encode_sequence(&xdr, &args->seq_args, &hdr); + encode_putfh(&xdr, args->fh, &hdr); +- replen = hdr.replen + nfs4_fattr_bitmap_maxsz + 1; ++ replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1; + encode_getattr_two(&xdr, FATTR4_WORD0_ACL, 0, &hdr); + + xdr_inline_pages(&req->rq_rcv_buf, replen << 2, diff --git a/queue-2.6.32/comedi-uncripple-8255-based-dio-subdevices.patch b/queue-2.6.32/comedi-uncripple-8255-based-dio-subdevices.patch new file mode 100644 index 00000000000..63fa2f7a4b6 --- /dev/null +++ b/queue-2.6.32/comedi-uncripple-8255-based-dio-subdevices.patch @@ -0,0 +1,71 @@ +From abbotti@mev.co.uk Tue Aug 3 12:41:11 2010 +From: Ian Abbott +Date: Fri, 30 Jul 2010 14:59:37 +0100 +Subject: comedi: Uncripple 8255-based DIO subdevices +To: +Cc: Ian Abbott +Message-ID: <1280498377-9445-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.32/mm-fix-ia64-crash-when-gcore-reads-gate-area.patch b/queue-2.6.32/mm-fix-ia64-crash-when-gcore-reads-gate-area.patch new file mode 100644 index 00000000000..18725743abe --- /dev/null +++ b/queue-2.6.32/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 +@@ -1282,10 +1282,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.32/sched-cgroup-implement-different-treatment-for-idle-shares.patch b/queue-2.6.32/sched-cgroup-implement-different-treatment-for-idle-shares.patch new file mode 100644 index 00000000000..fb8e7fbd8f5 --- /dev/null +++ b/queue-2.6.32/sched-cgroup-implement-different-treatment-for-idle-shares.patch @@ -0,0 +1,66 @@ +From cd8ad40de36c2fe75f3b731bd70198b385895246 Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Thu, 3 Dec 2009 18:00:07 +0100 +Subject: sched: cgroup: Implement different treatment for idle shares + +From: Peter Zijlstra + +commit cd8ad40de36c2fe75f3b731bd70198b385895246 upstream. + +When setting the weight for a per-cpu task-group, we have to put in a +phantom weight when there is no work on that cpu, otherwise we'll not +service that cpu when new work gets placed there until we again update +the per-cpu weights. + +We used to add these phantom weights to the total, so that the idle +per-cpu shares don't get inflated, this however causes the non-idle +parts to get deflated, causing unexpected weight distibutions. + +Reverse this, so that the non-idle shares are correct but the idle +shares are inflated. + +Reported-by: Yasunori Goto +Tested-by: Yasunori Goto +Signed-off-by: Peter Zijlstra +LKML-Reference: <1257934048.23203.76.camel@twins> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -1623,7 +1623,7 @@ static void update_group_shares_cpu(stru + */ + static int tg_shares_up(struct task_group *tg, void *data) + { +- unsigned long weight, rq_weight = 0, shares = 0; ++ unsigned long weight, rq_weight = 0, sum_weight = 0, shares = 0; + unsigned long *usd_rq_weight; + struct sched_domain *sd = data; + unsigned long flags; +@@ -1639,6 +1639,7 @@ static int tg_shares_up(struct task_grou + weight = tg->cfs_rq[i]->load.weight; + usd_rq_weight[i] = weight; + ++ rq_weight += weight; + /* + * If there are currently no tasks on the cpu pretend there + * is one of average load so that when a new task gets to +@@ -1647,10 +1648,13 @@ static int tg_shares_up(struct task_grou + if (!weight) + weight = NICE_0_LOAD; + +- rq_weight += weight; ++ sum_weight += weight; + shares += tg->cfs_rq[i]->shares; + } + ++ if (!rq_weight) ++ rq_weight = sum_weight; ++ + if ((!shares && rq_weight) || shares > tg->shares) + shares = tg->shares; +