--- /dev/null
+From 2060c44576c79086ff24718878d7edaa7384a985 Mon Sep 17 00:00:00 2001
+From: Alexey Starikovskiy <astarikovskiy@suse.de>
+Date: Fri, 16 Apr 2010 15:36:40 -0400
+Subject: ACPI: EC: Limit burst to 64 bits
+
+From: Alexey Starikovskiy <astarikovskiy@suse.de>
+
+commit 2060c44576c79086ff24718878d7edaa7384a985 upstream.
+
+access_bit_width field is u8 in ACPICA, thus 256 value written to it
+becomes 0, causing divide by zero later.
+
+Proper fix would be to remove access_bit_width at all, just because
+we already have access_byte_width, which is access_bit_width / 8.
+Limit access width to 64 bit for now.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=15749
+fixes regression caused by the fix for:
+https://bugzilla.kernel.org/show_bug.cgi?id=14667
+
+Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/acpica/exprep.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+--- a/drivers/acpi/acpica/exprep.c
++++ b/drivers/acpi/acpica/exprep.c
+@@ -471,13 +471,18 @@ acpi_status acpi_ex_prep_field_value(str
+ /* allow full data read from EC address space */
+ if (obj_desc->field.region_obj->region.space_id ==
+ ACPI_ADR_SPACE_EC) {
+- if (obj_desc->common_field.bit_length > 8)
+- obj_desc->common_field.access_bit_width =
+- ACPI_ROUND_UP(obj_desc->common_field.
+- bit_length, 8);
++ if (obj_desc->common_field.bit_length > 8) {
++ unsigned width =
++ ACPI_ROUND_BITS_UP_TO_BYTES(
++ obj_desc->common_field.bit_length);
++ // access_bit_width is u8, don't overflow it
++ if (width > 8)
++ width = 8;
+ obj_desc->common_field.access_byte_width =
+- ACPI_DIV_8(obj_desc->common_field.
+- access_bit_width);
++ width;
++ obj_desc->common_field.access_bit_width =
++ 8 * width;
++ }
+ }
+
+ ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
--- /dev/null
+From mathieu.desnoyers@efficios.com Wed Apr 21 15:39:34 2010
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Tue, 20 Apr 2010 10:33:50 -0400
+Subject: lockdep: fix incorrect percpu usage
+To: Greg KH <greg@kroah.com>
+Cc: Tejun Heo <tj@kernel.org>, Randy Dunlap <randy.dunlap@oracle.com>, Greg Kroah-Hartman <gregkh@suse.de>, Peter Zijlstra <peterz@infradead.org>, stable <stable@kernel.org>, Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, Eric Dumazet <dada1@cosmosbay.com>, Ingo Molnar <mingo@elte.hu>, Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org>
+Message-ID: <20100420143350.GA14622@Krystal>
+Content-Disposition: inline
+
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+The mainline kernel as of 2.6.34-rc5 is not affected by this problem because
+commit 10fad5e46f6c7bdfb01b1a012380a38e3c6ab346 fixed it by refactoring.
+
+lockdep fix incorrect percpu usage
+
+Should use per_cpu_ptr() to obfuscate the per cpu pointers (RELOC_HIDE is needed
+for per cpu pointers).
+
+git blame points to commit:
+
+lockdep.c: commit 8e18257d29238311e82085152741f0c3aa18b74d
+
+But it's really just moving the code around. But it's enough to say that the
+problems appeared before Jul 19 01:48:54 2007, which brings us back to 2.6.23.
+
+It should be applied to stable 2.6.23.x to 2.6.33.x (or whichever of these
+stable branches are still maintained).
+
+(tested on 2.6.33.1 x86_64)
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+CC: Randy Dunlap <randy.dunlap@oracle.com>
+CC: Eric Dumazet <dada1@cosmosbay.com>
+CC: Rusty Russell <rusty@rustcorp.com.au>
+CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
+CC: Tejun Heo <tj@kernel.org>
+CC: Ingo Molnar <mingo@elte.hu>
+CC: Andrew Morton <akpm@linux-foundation.org>
+CC: Linus Torvalds <torvalds@linux-foundation.org>
+CC: Greg Kroah-Hartman <gregkh@suse.de>
+CC: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/lockdep.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/kernel/lockdep.c
++++ b/kernel/lockdep.c
+@@ -600,9 +600,9 @@ static int static_obj(void *obj)
+ * percpu var?
+ */
+ for_each_possible_cpu(i) {
+- start = (unsigned long) &__per_cpu_start + per_cpu_offset(i);
+- end = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM
+- + per_cpu_offset(i);
++ start = (unsigned long) per_cpu_ptr(&__per_cpu_start, i);
++ end = (unsigned long) per_cpu_ptr(&__per_cpu_start
++ + PERCPU_ENOUGH_ROOM, i);
+
+ if ((addr >= start) && (addr < end))
+ return 1;
--- /dev/null
+From neilb@suse.de Wed Apr 21 15:45:49 2010
+From: Neil Brown <neilb@suse.de>
+Date: Wed, 31 Mar 2010 12:07:16 +1100
+Subject: md: deal with merge_bvec_fn in component devices better.
+To: stable@kernel.org
+Message-ID: <20100331120716.14054609@notabene.brown>
+
+From: NeilBrown <neilb@suse.de>
+
+commit 627a2d3c29427637f4c5d31ccc7fcbd8d312cd71 upstream.
+
+If a component device has a merge_bvec_fn then as we never call it
+we must ensure we never need to. Currently this is done by setting
+max_sector to 1 PAGE, however this does not stop a bio being created
+with several sub-page iovecs that would violate the merge_bvec_fn.
+
+So instead set max_phys_segments to 1 and set the segment boundary to the
+same as a page boundary to ensure there is only ever one single-page
+segment of IO requested at a time.
+
+This can particularly be an issue when 'xen' is used as it is
+known to submit multiple small buffers in a single bio.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/linear.c | 12 +++++++-----
+ drivers/md/multipath.c | 20 ++++++++++++--------
+ drivers/md/raid0.c | 13 +++++++------
+ drivers/md/raid10.c | 28 +++++++++++++++++-----------
+ 4 files changed, 43 insertions(+), 30 deletions(-)
+
+--- a/drivers/md/linear.c
++++ b/drivers/md/linear.c
+@@ -172,12 +172,14 @@ static linear_conf_t *linear_conf(mddev_
+ disk_stack_limits(mddev->gendisk, rdev->bdev,
+ rdev->data_offset << 9);
+ /* as we don't honour merge_bvec_fn, we must never risk
+- * violating it, so limit ->max_sector to one PAGE, as
+- * a one page request is never in violation.
++ * violating it, so limit max_phys_segments to 1 lying within
++ * a single page.
+ */
+- if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+- queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
++ if (rdev->bdev->bd_disk->queue->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+
+ conf->array_sectors += rdev->sectors;
+ cnt++;
+--- a/drivers/md/multipath.c
++++ b/drivers/md/multipath.c
+@@ -301,14 +301,16 @@ static int multipath_add_disk(mddev_t *m
+ rdev->data_offset << 9);
+
+ /* as we don't honour merge_bvec_fn, we must never risk
+- * violating it, so limit ->max_sector to one PAGE, as
+- * a one page request is never in violation.
++ * violating it, so limit ->max_phys_segments to one, lying
++ * within a single page.
+ * (Note: it is very unlikely that a device with
+ * merge_bvec_fn will be involved in multipath.)
+ */
+- if (q->merge_bvec_fn &&
+- queue_max_sectors(q) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
++ if (q->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+
+ conf->working_disks++;
+ mddev->degraded--;
+@@ -476,9 +478,11 @@ static int multipath_run (mddev_t *mddev
+ /* as we don't honour merge_bvec_fn, we must never risk
+ * violating it, not that we ever expect a device with
+ * a merge_bvec_fn to be involved in multipath */
+- if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+- queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
++ if (rdev->bdev->bd_disk->queue->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+
+ if (!test_bit(Faulty, &rdev->flags))
+ conf->working_disks++;
+--- a/drivers/md/raid0.c
++++ b/drivers/md/raid0.c
+@@ -176,14 +176,15 @@ static int create_strip_zones(mddev_t *m
+ disk_stack_limits(mddev->gendisk, rdev1->bdev,
+ rdev1->data_offset << 9);
+ /* as we don't honour merge_bvec_fn, we must never risk
+- * violating it, so limit ->max_sector to one PAGE, as
+- * a one page request is never in violation.
++ * violating it, so limit ->max_phys_segments to 1, lying within
++ * a single page.
+ */
+
+- if (rdev1->bdev->bd_disk->queue->merge_bvec_fn &&
+- queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
+-
++ if (rdev1->bdev->bd_disk->queue->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+ if (!smallest || (rdev1->sectors < smallest->sectors))
+ smallest = rdev1;
+ cnt++;
+--- a/drivers/md/raid10.c
++++ b/drivers/md/raid10.c
+@@ -1155,13 +1155,17 @@ static int raid10_add_disk(mddev_t *mdde
+
+ disk_stack_limits(mddev->gendisk, rdev->bdev,
+ rdev->data_offset << 9);
+- /* as we don't honour merge_bvec_fn, we must never risk
+- * violating it, so limit ->max_sector to one PAGE, as
+- * a one page request is never in violation.
++ /* as we don't honour merge_bvec_fn, we must
++ * never risk violating it, so limit
++ * ->max_phys_segments to one lying with a single
++ * page, as a one page request is never in
++ * violation.
+ */
+- if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+- queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
++ if (rdev->bdev->bd_disk->queue->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+
+ p->head_position = 0;
+ rdev->raid_disk = mirror;
+@@ -2255,12 +2259,14 @@ static int run(mddev_t *mddev)
+ disk_stack_limits(mddev->gendisk, rdev->bdev,
+ rdev->data_offset << 9);
+ /* as we don't honour merge_bvec_fn, we must never risk
+- * violating it, so limit ->max_sector to one PAGE, as
+- * a one page request is never in violation.
++ * violating it, so limit max_phys_segments to 1 lying
++ * within a single page.
+ */
+- if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+- queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
+- blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
++ if (rdev->bdev->bd_disk->queue->merge_bvec_fn) {
++ blk_queue_max_phys_segments(mddev->queue, 1);
++ blk_queue_segment_boundary(mddev->queue,
++ PAGE_CACHE_SIZE - 1);
++ }
+
+ disk->head_position = 0;
+ }
--- /dev/null
+From mathieu.desnoyers@efficios.com Wed Apr 21 15:42:43 2010
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Tue, 20 Apr 2010 10:38:10 -0400
+Subject: module: fix __module_ref_addr()
+To: Greg KH <greg@kroah.com>
+Cc: Steven Rostedt <rostedt@goodmis.org>, Randy Dunlap <randy.dunlap@oracle.com>, Greg Kroah-Hartman <gregkh@suse.de>, Peter Zijlstra <a.p.zijlstra@chello.nl>, stable <stable@kernel.org>, Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org, Eric Dumazet <dada1@cosmosbay.com>, Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@elte.hu>, Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org>
+Message-ID: <20100420143810.GC14622@Krystal>
+Content-Disposition: inline
+
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+The __module_ref_addr() problem disappears in 2.6.34-rc kernels because these
+percpu accesses were re-factored.
+
+__module_ref_addr() should use per_cpu_ptr() to obfuscate the pointer
+(RELOC_HIDE is needed for per cpu pointers).
+
+This non-standard per-cpu pointer use has been introduced by commit
+720eba31f47aeade8ec130ca7f4353223c49170f
+
+It causes a NULL pointer exception on some configurations when CONFIG_TRACING is
+enabled on 2.6.33. This patch fixes the problem (acknowledged by Randy who
+reported the bug).
+
+It did not appear to hurt previously because most of the accesses were done
+through local_inc, which probably obfuscated the access enough that no compiler
+optimizations were done. But with local_read() done when CONFIG_TRACING is
+active, this becomes a problem. Non-CONFIG_TRACING is probably affected as well
+(module.c contains local_set and local_read that use __module_ref_addr()), but I
+guess nobody noticed because we've been lucky enough that the compiler did not
+generate the inappropriate optimization pattern there.
+
+This patch should be queued for the 2.6.29.x through 2.6.33.x stable branches.
+(tested on 2.6.33.1 x86_64)
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
+CC: Eric Dumazet <dada1@cosmosbay.com>
+CC: Rusty Russell <rusty@rustcorp.com.au>
+CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
+CC: Tejun Heo <tj@kernel.org>
+CC: Ingo Molnar <mingo@elte.hu>
+CC: Andrew Morton <akpm@linux-foundation.org>
+CC: Linus Torvalds <torvalds@linux-foundation.org>
+CC: Greg Kroah-Hartman <gregkh@suse.de>
+CC: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/module.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/module.h
++++ b/include/linux/module.h
+@@ -457,7 +457,7 @@ void symbol_put_addr(void *addr);
+ static inline local_t *__module_ref_addr(struct module *mod, int cpu)
+ {
+ #ifdef CONFIG_SMP
+- return (local_t *) (mod->refptr + per_cpu_offset(cpu));
++ return (local_t *) per_cpu_ptr(mod->refptr, cpu);
+ #else
+ return &mod->ref;
+ #endif
--- /dev/null
+From mathieu.desnoyers@efficios.com Wed Apr 21 15:38:07 2010
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Tue, 20 Apr 2010 10:34:57 -0400
+Subject: modules: fix incorrect percpu usage
+To: Greg KH <greg@kroah.com>
+Cc: Steven Rostedt <rostedt@goodmis.org>, Randy Dunlap <randy.dunlap@oracle.com>, Greg Kroah-Hartman <gregkh@suse.de>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Eric Dumazet <dada1@cosmosbay.com>, Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@elte.hu>, Linus Torvalds <torvalds@linux-foundation.org>, stable <stable@kernel.org>
+Message-ID: <20100420143457.GB14622@Krystal>
+Content-Disposition: inline
+
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+Mainline does not need this fix, as commit
+259354deaaf03d49a02dbb9975d6ec2a54675672 fixed the problem by refactoring.
+
+Should use per_cpu_ptr() to obfuscate the per cpu pointers (RELOC_HIDE is needed
+for per cpu pointers).
+
+Introduced by commit:
+
+module.c: commit 6b588c18f8dacfa6d7957c33c5ff832096e752d3
+
+This patch should be queued for the stable branch, for kernels 2.6.29.x to
+2.6.33.x. (tested on 2.6.33.1 x86_64)
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+CC: Randy Dunlap <randy.dunlap@oracle.com>
+CC: Eric Dumazet <dada1@cosmosbay.com>
+CC: Rusty Russell <rusty@rustcorp.com.au>
+CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
+CC: Tejun Heo <tj@kernel.org>
+CC: Ingo Molnar <mingo@elte.hu>
+CC: Andrew Morton <akpm@linux-foundation.org>
+CC: Linus Torvalds <torvalds@linux-foundation.org>
+CC: Greg Kroah-Hartman <gregkh@suse.de>
+CC: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/module.c
++++ b/kernel/module.c
+@@ -405,7 +405,7 @@ static void percpu_modcopy(void *pcpudes
+ int cpu;
+
+ for_each_possible_cpu(cpu)
+- memcpy(pcpudest + per_cpu_offset(cpu), from, size);
++ memcpy(per_cpu_ptr(pcpudest, cpu), from, size);
+ }
+
+ #else /* ... !CONFIG_SMP */
--- /dev/null
+From dc83d6e27fa80babe31c80aa8568f125f72edf57 Mon Sep 17 00:00:00 2001
+From: J. Bruce Fields <bfields@citi.umich.edu>
+Date: Tue, 20 Oct 2009 18:51:34 -0400
+Subject: nfsd4: don't try to map gid's in generic rpc code
+
+From: J. Bruce Fields <bfields@citi.umich.edu>
+
+commit dc83d6e27fa80babe31c80aa8568f125f72edf57 upstream.
+
+For nfsd we provide users the option of mapping uid's to server-side
+supplementary group lists. That makes sense for nfsd, but not
+necessarily for other rpc users (such as the callback client).
+
+So move that lookup to svcauth_unix_set_client, which is a
+program-specific method.
+
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+--- a/net/sunrpc/svcauth_unix.c
++++ b/net/sunrpc/svcauth_unix.c
+@@ -655,23 +655,25 @@ static struct unix_gid *unix_gid_lookup(uid_t uid)
+ return NULL;
+ }
+
+-static int unix_gid_find(uid_t uid, struct group_info **gip,
+- struct svc_rqst *rqstp)
++static struct group_info *unix_gid_find(uid_t uid, struct svc_rqst *rqstp)
+ {
+- struct unix_gid *ug = unix_gid_lookup(uid);
++ struct unix_gid *ug;
++ struct group_info *gi;
++ int ret;
++
++ ug = unix_gid_lookup(uid);
+ if (!ug)
+- return -EAGAIN;
+- switch (cache_check(&unix_gid_cache, &ug->h, &rqstp->rq_chandle)) {
++ return ERR_PTR(-EAGAIN);
++ ret = cache_check(&unix_gid_cache, &ug->h, &rqstp->rq_chandle);
++ switch (ret) {
+ case -ENOENT:
+- *gip = NULL;
+- return 0;
++ return ERR_PTR(-ENOENT);
+ case 0:
+- *gip = ug->gi;
+- get_group_info(*gip);
++ gi = get_group_info(ug->gi);
+ cache_put(&ug->h, &unix_gid_cache);
+- return 0;
++ return gi;
+ default:
+- return -EAGAIN;
++ return ERR_PTR(-EAGAIN);
+ }
+ }
+
+@@ -681,6 +683,8 @@ svcauth_unix_set_client(struct svc_rqst *rqstp)
+ struct sockaddr_in *sin;
+ struct sockaddr_in6 *sin6, sin6_storage;
+ struct ip_map *ipm;
++ struct group_info *gi;
++ struct svc_cred *cred = &rqstp->rq_cred;
+
+ switch (rqstp->rq_addr.ss_family) {
+ case AF_INET:
+@@ -722,6 +726,17 @@ svcauth_unix_set_client(struct svc_rqst *rqstp)
+ ip_map_cached_put(rqstp, ipm);
+ break;
+ }
++
++ gi = unix_gid_find(cred->cr_uid, rqstp);
++ switch (PTR_ERR(gi)) {
++ case -EAGAIN:
++ return SVC_DROP;
++ case -ENOENT:
++ break;
++ default:
++ put_group_info(cred->cr_group_info);
++ cred->cr_group_info = gi;
++ }
+ return SVC_OK;
+ }
+
+@@ -818,19 +833,11 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
+ slen = svc_getnl(argv); /* gids length */
+ if (slen > 16 || (len -= (slen + 2)*4) < 0)
+ goto badcred;
+- if (unix_gid_find(cred->cr_uid, &cred->cr_group_info, rqstp)
+- == -EAGAIN)
++ cred->cr_group_info = groups_alloc(slen);
++ if (cred->cr_group_info == NULL)
+ return SVC_DROP;
+- if (cred->cr_group_info == NULL) {
+- cred->cr_group_info = groups_alloc(slen);
+- if (cred->cr_group_info == NULL)
+- return SVC_DROP;
+- for (i = 0; i < slen; i++)
+- GROUP_AT(cred->cr_group_info, i) = svc_getnl(argv);
+- } else {
+- for (i = 0; i < slen ; i++)
+- svc_getnl(argv);
+- }
++ for (i = 0; i < slen; i++)
++ GROUP_AT(cred->cr_group_info, i) = svc_getnl(argv);
+ if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
+ *authp = rpc_autherr_badverf;
+ return SVC_DENIED;
--- /dev/null
+From 5b72d74ce2fccca2a301de60f31b16ddf5c93984 Mon Sep 17 00:00:00 2001
+From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
+Date: Sat, 27 Feb 2010 07:07:59 +0000
+Subject: powerpc: Fix SMP build with disabled CPU hotplugging.
+
+From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
+
+commit 5b72d74ce2fccca2a301de60f31b16ddf5c93984 upstream.
+
+Compiling 2.6.33 with SMP enabled and HOTPLUG_CPU disabled gives me the
+following link errors:
+
+ LD init/built-in.o
+ LD .tmp_vmlinux1
+arch/powerpc/platforms/built-in.o: In function `.smp_xics_setup_cpu':
+smp.c:(.devinit.text+0x88): undefined reference to `.set_cpu_current_state'
+smp.c:(.devinit.text+0x94): undefined reference to `.set_default_offline_state'
+arch/powerpc/platforms/built-in.o: In function `.smp_pSeries_kick_cpu':
+smp.c:(.devinit.text+0x13c): undefined reference to `.set_preferred_offline_state'
+smp.c:(.devinit.text+0x148): undefined reference to `.get_cpu_current_state'
+smp.c:(.devinit.text+0x1a8): undefined reference to `.get_cpu_current_state'
+make: *** [.tmp_vmlinux1] Error 1
+
+The following change fixes that for me and seems to work as expected.
+
+Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/platforms/pseries/offline_states.h | 22 +++++++++++++++++++++-
+ 1 file changed, 21 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/platforms/pseries/offline_states.h
++++ b/arch/powerpc/platforms/pseries/offline_states.h
+@@ -9,10 +9,30 @@ enum cpu_state_vals {
+ CPU_MAX_OFFLINE_STATES
+ };
+
++#ifdef CONFIG_HOTPLUG_CPU
+ extern enum cpu_state_vals get_cpu_current_state(int cpu);
+ extern void set_cpu_current_state(int cpu, enum cpu_state_vals state);
+-extern enum cpu_state_vals get_preferred_offline_state(int cpu);
+ extern void set_preferred_offline_state(int cpu, enum cpu_state_vals state);
+ extern void set_default_offline_state(int cpu);
++#else
++static inline enum cpu_state_vals get_cpu_current_state(int cpu)
++{
++ return CPU_STATE_ONLINE;
++}
++
++static inline void set_cpu_current_state(int cpu, enum cpu_state_vals state)
++{
++}
++
++static inline void set_preferred_offline_state(int cpu, enum cpu_state_vals state)
++{
++}
++
++static inline void set_default_offline_state(int cpu)
++{
++}
++#endif
++
++extern enum cpu_state_vals get_preferred_offline_state(int cpu);
+ extern int start_secondary(void);
+ #endif
xfs-check-for-more-work-before-sleeping-in-xfssyncd.patch
acpi-ec-allow-multibyte-access-to-ec.patch
md-raid5-allow-for-more-than-2-31-chunks.patch
+acpi-ec-limit-burst-to-64-bits.patch
+modules-fix-incorrect-percpu-usage.patch
+lockdep-fix-incorrect-percpu-usage.patch
+module-fix-__module_ref_addr.patch
+md-deal-with-merge_bvec_fn-in-component-devices-better.patch
+powerpc-fix-smp-build-with-disabled-cpu-hotplugging.patch
+nfsd4-don-t-try-to-map-gid-s-in-generic-rpc-code.patch