+++ /dev/null
-From 84fe6826c28f69d8708bd575faed7f75e6b6f57f Mon Sep 17 00:00:00 2001
-From: Steve Capper <steve.capper@linaro.org>
-Date: Tue, 25 Feb 2014 11:38:53 +0000
-Subject: arm64: mm: Add double logical invert to pte accessors
-
-From: Steve Capper <steve.capper@linaro.org>
-
-commit 84fe6826c28f69d8708bd575faed7f75e6b6f57f upstream.
-
-Page table entries on ARM64 are 64 bits, and some pte functions such as
-pte_dirty return a bitwise-and of a flag with the pte value. If the
-flag to be tested resides in the upper 32 bits of the pte, then we run
-into the danger of the result being dropped if downcast.
-
-For example:
- gather_stats(page, md, pte_dirty(*pte), 1);
-where pte_dirty(*pte) is downcast to an int.
-
-This patch adds a double logical invert to all the pte_ accessors to
-ensure predictable downcasting.
-
-Signed-off-by: Steve Capper <steve.capper@linaro.org>
-Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
-index b524dcd17243..aa3917c8b623 100644
---- a/arch/arm64/include/asm/pgtable.h
-+++ b/arch/arm64/include/asm/pgtable.h
-@@ -136,11 +136,11 @@ extern struct page *empty_zero_page;
- /*
- * The following only work if pte_present(). Undefined behaviour otherwise.
- */
--#define pte_present(pte) (pte_val(pte) & (PTE_VALID | PTE_PROT_NONE))
--#define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY)
--#define pte_young(pte) (pte_val(pte) & PTE_AF)
--#define pte_special(pte) (pte_val(pte) & PTE_SPECIAL)
--#define pte_write(pte) (pte_val(pte) & PTE_WRITE)
-+#define pte_present(pte) (!!(pte_val(pte) & (PTE_VALID | PTE_PROT_NONE)))
-+#define pte_dirty(pte) (!!(pte_val(pte) & PTE_DIRTY))
-+#define pte_young(pte) (!!(pte_val(pte) & PTE_AF))
-+#define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL))
-+#define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE))
- #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN))
-
- #define pte_valid_user(pte) \
--- /dev/null
+From a1989b330093578ea5470bea0a00f940c444c466 Mon Sep 17 00:00:00 2001
+From: Hannes Reinecke <hare@suse.de>
+Date: Wed, 26 Feb 2014 10:07:04 +0100
+Subject: dm mpath: fix stalls when handling invalid ioctls
+
+From: Hannes Reinecke <hare@suse.de>
+
+commit a1989b330093578ea5470bea0a00f940c444c466 upstream.
+
+An invalid ioctl will never be valid, irrespective of whether multipath
+has active paths or not. So for invalid ioctls we do not have to wait
+for multipath to activate any paths, but can rather return an error
+code immediately. This fix resolves numerous instances of:
+
+ udevd[]: worker [] unexpectedly returned with status 0x0100
+
+that have been seen during testing.
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-mpath.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -1541,8 +1541,11 @@ static int multipath_ioctl(struct dm_tar
+ /*
+ * Only pass ioctls through if the device sizes match exactly.
+ */
+- if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT)
+- r = scsi_verify_blk_ioctl(NULL, cmd);
++ if (!bdev || ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) {
++ int err = scsi_verify_blk_ioctl(NULL, cmd);
++ if (err)
++ r = err;
++ }
+
+ return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
+ }
--- /dev/null
+From e9baa9d9d520fb0e24cca671e430689de2d4a4b2 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Thu, 13 Feb 2014 10:39:01 +0100
+Subject: dma: ste_dma40: don't dereference free:d descriptor
+
+From: Linus Walleij <linus.walleij@linaro.org>
+
+commit e9baa9d9d520fb0e24cca671e430689de2d4a4b2 upstream.
+
+It appears that in the DMA40 driver the DMA tasklet will very
+often dereference memory for a descriptor just free:d from the
+DMA40 slab. Nothing happens because no other part of the driver
+has yet had a chance to claim this memory, but it's really
+nasty to dereference free:d memory, so let's check the flag
+before the descriptor is free and store it in a bool variable.
+
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/ste_dma40.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/dma/ste_dma40.c
++++ b/drivers/dma/ste_dma40.c
+@@ -1409,6 +1409,7 @@ static void dma_tasklet(unsigned long da
+ struct d40_chan *d40c = (struct d40_chan *) data;
+ struct d40_desc *d40d;
+ unsigned long flags;
++ bool callback_active;
+ dma_async_tx_callback callback;
+ void *callback_param;
+
+@@ -1432,6 +1433,7 @@ static void dma_tasklet(unsigned long da
+ }
+
+ /* Callback to client */
++ callback_active = !!(d40d->txd.flags & DMA_PREP_INTERRUPT);
+ callback = d40d->txd.callback;
+ callback_param = d40d->txd.callback_param;
+
+@@ -1456,7 +1458,7 @@ static void dma_tasklet(unsigned long da
+
+ spin_unlock_irqrestore(&d40c->lock, flags);
+
+- if (callback && (d40d->txd.flags & DMA_PREP_INTERRUPT))
++ if (callback_active && callback)
+ callback(callback_param);
+
+ return;
perf-fix-hotplug-splat.patch
selinux-bigendian-problems-with-filename-trans-rules.patch
quota-fix-race-between-dqput-and-dquot_scan_active.patch
-arm64-mm-add-double-logical-invert-to-pte-accessors.patch
+dma-ste_dma40-don-t-dereference-free-d-descriptor.patch
+dm-mpath-fix-stalls-when-handling-invalid-ioctls.patch