--- /dev/null
+From 14cb0deb66fcfca8fdbef75da8c84b5405a8c767 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 6 Jul 2010 14:03:22 +0300
+Subject: arm/imx/gpio: add spinlock protection
+
+From: Baruch Siach <baruch@tkos.co.il>
+
+commit 14cb0deb66fcfca8fdbef75da8c84b5405a8c767 upstream.
+
+The GPIO registers need protection from concurrent access for operations that
+are not atomic.
+
+Cc: Juergen Beisert <j.beisert@pengutronix.de>
+Cc: Daniel Mack <daniel@caiaq.de>
+Reported-by: rpkamiak@rockwellcollins.com
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/plat-mxc/gpio.c | 8 ++++++++
+ arch/arm/plat-mxc/include/mach/gpio.h | 1 +
+ 2 files changed, 9 insertions(+)
+
+--- a/arch/arm/plat-mxc/gpio.c
++++ b/arch/arm/plat-mxc/gpio.c
+@@ -223,13 +223,16 @@ static void _set_gpio_direction(struct g
+ struct mxc_gpio_port *port =
+ container_of(chip, struct mxc_gpio_port, chip);
+ u32 l;
++ unsigned long flags;
+
++ spin_lock_irqsave(&port->lock, flags);
+ l = __raw_readl(port->base + GPIO_GDIR);
+ if (dir)
+ l |= 1 << offset;
+ else
+ l &= ~(1 << offset);
+ __raw_writel(l, port->base + GPIO_GDIR);
++ spin_unlock_irqrestore(&port->lock, flags);
+ }
+
+ static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+@@ -238,9 +241,12 @@ static void mxc_gpio_set(struct gpio_chi
+ container_of(chip, struct mxc_gpio_port, chip);
+ void __iomem *reg = port->base + GPIO_DR;
+ u32 l;
++ unsigned long flags;
+
++ spin_lock_irqsave(&port->lock, flags);
+ l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset);
+ __raw_writel(l, reg);
++ spin_unlock_irqrestore(&port->lock, flags);
+ }
+
+ static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset)
+@@ -294,6 +300,8 @@ int __init mxc_gpio_init(struct mxc_gpio
+ port[i].chip.base = i * 32;
+ port[i].chip.ngpio = 32;
+
++ spin_lock_init(&port[i].lock);
++
+ /* its a serious configuration bug when it fails */
+ BUG_ON( gpiochip_add(&port[i].chip) < 0 );
+
+--- a/arch/arm/plat-mxc/include/mach/gpio.h
++++ b/arch/arm/plat-mxc/include/mach/gpio.h
+@@ -36,6 +36,7 @@ struct mxc_gpio_port {
+ int virtual_irq_start;
+ struct gpio_chip chip;
+ u32 both_edges;
++ spinlock_t lock;
+ };
+
+ int mxc_gpio_init(struct mxc_gpio_port*, int);
--- /dev/null
+From stable-bounces@linux.kernel.org Tue Aug 3 16:23:06 2010
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+To: Greg KH <gregkh@suse.de>, stable@kernel.org
+Date: Tue, 3 Aug 2010 17:22:16 -0400
+Message-Id: <1280870536-21281-1-git-send-email-Trond.Myklebust@netapp.com>
+Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
+Subject: NFS: kswapd must not block in nfs_release_page
+
+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 <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nfs/file.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/fs/nfs/file.c
++++ b/fs/nfs/file.c
+@@ -27,6 +27,8 @@
+ #include <linux/slab.h>
+ #include <linux/pagemap.h>
+ #include <linux/aio.h>
++#include <linux/gfp.h>
++#include <linux/swap.h>
+
+ #include <asm/uaccess.h>
+ #include <asm/system.h>
+@@ -484,11 +486,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;
--- /dev/null
+From 4b4fd27c0b5ec638a1f06ced9226fd95229dbbf0 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Mon, 2 Aug 2010 22:46:41 +0200
+Subject: PARISC: led.c - fix potential stack overflow in led_proc_write()
+
+From: Helge Deller <deller@gmx.de>
+
+commit 4b4fd27c0b5ec638a1f06ced9226fd95229dbbf0 upstream.
+
+avoid potential stack overflow by correctly checking count parameter
+
+Reported-by: Ilja <ilja@netric.org>
+Signed-off-by: Helge Deller <deller@gmx.de>
+Acked-by: Kyle McMartin <kyle@mcmartin.ca>
+Cc: James E.J. Bottomley <jejb@parisc-linux.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/parisc/led.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/parisc/led.c
++++ b/drivers/parisc/led.c
+@@ -182,16 +182,18 @@ static int led_proc_read(char *page, cha
+ static int led_proc_write(struct file *file, const char *buf,
+ unsigned long count, void *data)
+ {
+- char *cur, lbuf[count + 1];
++ char *cur, lbuf[32];
+ int d;
+
+ if (!capable(CAP_SYS_ADMIN))
+ return -EACCES;
+
+- memset(lbuf, 0, count + 1);
++ if (count >= sizeof(lbuf))
++ count = sizeof(lbuf)-1;
+
+ if (copy_from_user(lbuf, buf, count))
+ return -EFAULT;
++ lbuf[count] = 0;
+
+ cur = lbuf;
+
mm-fix-ia64-crash-when-gcore-reads-gate-area.patch
acl-trouble-after-upgrading-ubuntu.patch
comedi-uncripple-8255-based-dio-subdevices.patch
+nfs-kswapd-must-not-block-in-nfs_release_page.patch
+parisc-led.c-fix-potential-stack-overflow-in-led_proc_write.patch
+arm-imx-gpio-add-spinlock-protection.patch