--- /dev/null
+From dc295880c6752076f8b94ba3885d0bfff09e3e82 Mon Sep 17 00:00:00 2001
+From: Jan Willeke <willeke@de.ibm.com>
+Date: Tue, 22 Jul 2014 16:50:57 +0200
+Subject: s390/seccomp: fix error return for filtered system calls
+
+From: Jan Willeke <willeke@de.ibm.com>
+
+commit dc295880c6752076f8b94ba3885d0bfff09e3e82 upstream.
+
+The syscall_set_return_value function of s390 negates the error argument
+before storing the value to the return register gpr2. This is incorrect,
+the seccomp code already passes the negative error value.
+Store the unmodified error value to gpr2.
+
+Signed-off-by: Jan Willeke <willeke@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/include/asm/syscall.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/include/asm/syscall.h
++++ b/arch/s390/include/asm/syscall.h
+@@ -54,7 +54,7 @@ static inline void syscall_set_return_va
+ struct pt_regs *regs,
+ int error, long val)
+ {
+- regs->gprs[2] = error ? -error : val;
++ regs->gprs[2] = error ? error : val;
+ }
+
+ static inline void syscall_get_arguments(struct task_struct *task,
scsi-fix-race-between-simultaneous-decrements-of-host_failed.patch
fix-reconnect-to-not-defer-smb3-session-reconnect-long-after-socket-reconnect.patch
xen-acpi-allow-xen-acpi-processor-driver-to-load-on-xen-4.7.patch
+tmpfs-don-t-undo-fallocate-past-its-last-page.patch
+tmpfs-fix-regression-hang-in-fallocate-undo.patch
+s390-seccomp-fix-error-return-for-filtered-system-calls.patch
--- /dev/null
+From b9b4bb26af017dbe930cd4df7f9b2fc3a0497bfe Mon Sep 17 00:00:00 2001
+From: Anthony Romano <anthony.romano@coreos.com>
+Date: Fri, 24 Jun 2016 14:48:43 -0700
+Subject: tmpfs: don't undo fallocate past its last page
+
+From: Anthony Romano <anthony.romano@coreos.com>
+
+commit b9b4bb26af017dbe930cd4df7f9b2fc3a0497bfe upstream.
+
+When fallocate is interrupted it will undo a range that extends one byte
+past its range of allocated pages. This can corrupt an in-use page by
+zeroing out its first byte. Instead, undo using the inclusive byte
+range.
+
+Fixes: 1635f6a74152f1d ("tmpfs: undo fallocation on failure")
+Link: http://lkml.kernel.org/r/1462713387-16724-1-git-send-email-anthony.romano@coreos.com
+Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
+Cc: Vlastimil Babka <vbabka@suse.cz>
+Cc: Hugh Dickins <hughd@google.com>
+Cc: Brandon Philips <brandon@ifup.co>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/shmem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -1895,7 +1895,7 @@ static long shmem_fallocate(struct file
+ /* Remove the !PageUptodate pages we added */
+ shmem_undo_range(inode,
+ (loff_t)start << PAGE_CACHE_SHIFT,
+- (loff_t)index << PAGE_CACHE_SHIFT, true);
++ ((loff_t)index << PAGE_CACHE_SHIFT) - 1, true);
+ goto undone;
+ }
+
--- /dev/null
+From 7f556567036cb7f89aabe2f0954b08566b4efb53 Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Sun, 10 Jul 2016 16:46:32 -0700
+Subject: tmpfs: fix regression hang in fallocate undo
+
+From: Hugh Dickins <hughd@google.com>
+
+commit 7f556567036cb7f89aabe2f0954b08566b4efb53 upstream.
+
+The well-spotted fallocate undo fix is good in most cases, but not when
+fallocate failed on the very first page. index 0 then passes lend -1
+to shmem_undo_range(), and that has two bad effects: (a) that it will
+undo every fallocation throughout the file, unrestricted by the current
+range; but more importantly (b) it can cause the undo to hang, because
+lend -1 is treated as truncation, which makes it keep on retrying until
+every page has gone, but those already fully instantiated will never go
+away. Big thank you to xfstests generic/269 which demonstrates this.
+
+Fixes: b9b4bb26af01 ("tmpfs: don't undo fallocate past its last page")
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/shmem.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -1893,9 +1893,11 @@ static long shmem_fallocate(struct file
+ NULL);
+ if (error) {
+ /* Remove the !PageUptodate pages we added */
+- shmem_undo_range(inode,
+- (loff_t)start << PAGE_CACHE_SHIFT,
+- ((loff_t)index << PAGE_CACHE_SHIFT) - 1, true);
++ if (index > start) {
++ shmem_undo_range(inode,
++ (loff_t)start << PAGE_CACHE_SHIFT,
++ ((loff_t)index << PAGE_CACHE_SHIFT) - 1, true);
++ }
+ goto undone;
+ }
+