--- /dev/null
+From b6ed5498601df40489606dbc14a9c7011c16630b Mon Sep 17 00:00:00 2001
+From: Cong Wang <cwang@twopensource.com>
+Date: Thu, 22 May 2014 11:57:17 -0700
+Subject: batman: fix a bogus warning from batadv_is_on_batman_iface()
+
+From: Cong Wang <cwang@twopensource.com>
+
+commit b6ed5498601df40489606dbc14a9c7011c16630b upstream.
+
+batman tries to search dev->iflink to check if it's a batman interface,
+but ->iflink could be 0, which is not a valid ifindex. It should just
+avoid iflink == 0 case.
+
+Reported-by: Jet Chen <jet.chen@intel.com>
+Tested-by: Jet Chen <jet.chen@intel.com>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: Steffen Klassert <steffen.klassert@secunet.com>
+Cc: Antonio Quartulli <antonio@open-mesh.com>
+Cc: Marek Lindner <mareklindner@neomailbox.ch>
+Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
+Signed-off-by: Cong Wang <cwang@twopensource.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/batman-adv/hard-interface.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/batman-adv/hard-interface.c
++++ b/net/batman-adv/hard-interface.c
+@@ -83,7 +83,7 @@ static bool batadv_is_on_batman_iface(co
+ return true;
+
+ /* no more parents..stop recursion */
+- if (net_dev->iflink == net_dev->ifindex)
++ if (net_dev->iflink == 0 || net_dev->iflink == net_dev->ifindex)
+ return false;
+
+ /* recurse over the parent device */
--- /dev/null
+From 92a56555bd576c61b27a5cab9f38a33a1e9a1df5 Mon Sep 17 00:00:00 2001
+From: David Jeffery <djeffery@redhat.com>
+Date: Tue, 5 Aug 2014 11:19:42 -0400
+Subject: nfs: Don't busy-wait on SIGKILL in __nfs_iocounter_wait
+
+From: David Jeffery <djeffery@redhat.com>
+
+commit 92a56555bd576c61b27a5cab9f38a33a1e9a1df5 upstream.
+
+If a SIGKILL is sent to a task waiting in __nfs_iocounter_wait,
+it will busy-wait or soft lockup in its while loop.
+nfs_wait_bit_killable won't sleep, and the loop won't exit on
+the error return.
+
+Stop the busy-wait by breaking out of the loop when
+nfs_wait_bit_killable returns an error.
+
+Signed-off-by: David Jeffery <djeffery@redhat.com>
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+[ kamal: backport to 3.13-stable: context ]
+Cc: Moritz Mühlenhoff <muehlenhoff@univention.de>
+Signed-off-by: Kamal Mostafa <kamal@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/pagelist.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/nfs/pagelist.c
++++ b/fs/nfs/pagelist.c
+@@ -113,7 +113,7 @@ __nfs_iocounter_wait(struct nfs_io_count
+ if (atomic_read(&c->io_count) == 0)
+ break;
+ ret = nfs_wait_bit_killable(&c->flags);
+- } while (atomic_read(&c->io_count) != 0);
++ } while (atomic_read(&c->io_count) != 0 && !ret);
+ finish_wait(wq, &q.wait);
+ return ret;
+ }
--- /dev/null
+From c1118b3602c2329671ad5ec8bdf8e374323d6343 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Mon, 22 Sep 2014 13:17:48 +0200
+Subject: x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit c1118b3602c2329671ad5ec8bdf8e374323d6343 upstream.
+
+On x86_64, kernel text mappings are mapped read-only with CONFIG_DEBUG_RODATA.
+In that case, KVM will fail to patch VMCALL instructions to VMMCALL
+as required on AMD processors.
+
+The failure mode is currently a divide-by-zero exception, which obviously
+is a KVM bug that has to be fixed. However, picking the right instruction
+between VMCALL and VMMCALL will be faster and will help if you cannot upgrade
+the hypervisor.
+
+Reported-by: Chris Webb <chris@arachsys.com>
+Tested-by: Chris Webb <chris@arachsys.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: x86@kernel.org
+Acked-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/cpufeature.h | 1 +
+ arch/x86/include/asm/kvm_para.h | 10 ++++++++--
+ arch/x86/kernel/cpu/amd.c | 7 +++++++
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -203,6 +203,7 @@
+ #define X86_FEATURE_DECODEASSISTS (8*32+12) /* AMD Decode Assists support */
+ #define X86_FEATURE_PAUSEFILTER (8*32+13) /* AMD filtered pause intercept */
+ #define X86_FEATURE_PFTHRESHOLD (8*32+14) /* AMD pause filter threshold */
++#define X86_FEATURE_VMMCALL (8*32+15) /* Prefer vmmcall to vmcall */
+
+
+ /* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
+--- a/arch/x86/include/asm/kvm_para.h
++++ b/arch/x86/include/asm/kvm_para.h
+@@ -2,6 +2,7 @@
+ #define _ASM_X86_KVM_PARA_H
+
+ #include <asm/processor.h>
++#include <asm/alternative.h>
+ #include <uapi/asm/kvm_para.h>
+
+ extern void kvmclock_init(void);
+@@ -16,10 +17,15 @@ static inline bool kvm_check_and_clear_g
+ }
+ #endif /* CONFIG_KVM_GUEST */
+
+-/* This instruction is vmcall. On non-VT architectures, it will generate a
+- * trap that we will then rewrite to the appropriate instruction.
++#ifdef CONFIG_DEBUG_RODATA
++#define KVM_HYPERCALL \
++ ALTERNATIVE(".byte 0x0f,0x01,0xc1", ".byte 0x0f,0x01,0xd9", X86_FEATURE_VMMCALL)
++#else
++/* On AMD processors, vmcall will generate a trap that we will
++ * then rewrite to the appropriate instruction.
+ */
+ #define KVM_HYPERCALL ".byte 0x0f,0x01,0xc1"
++#endif
+
+ /* For KVM hypercalls, a three-byte sequence of either the vmcall or the vmmcall
+ * instruction. The hypervisor may replace it with something else but only the
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -508,6 +508,13 @@ static void early_init_amd(struct cpuinf
+ }
+ #endif
+
++ /*
++ * This is only needed to tell the kernel whether to use VMCALL
++ * and VMMCALL. VMMCALL is never executed except under virt, so
++ * we can set it unconditionally.
++ */
++ set_cpu_cap(c, X86_FEATURE_VMMCALL);
++
+ /* F16h erratum 793, CVE-2013-6885 */
+ if (c->x86 == 0x16 && c->x86_model <= 0xf) {
+ u64 val;