diff options
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/patches/4.9.22/patch-realtime | 5861 |
1 files changed, 4020 insertions, 1841 deletions
diff --git a/target/linux/patches/4.9.22/patch-realtime b/target/linux/patches/4.9.22/patch-realtime index abc03f9f5..271c2db5a 100644 --- a/target/linux/patches/4.9.22/patch-realtime +++ b/target/linux/patches/4.9.22/patch-realtime @@ -1,6 +1,6 @@ -diff -Nur linux-4.9.6.orig/arch/arm/include/asm/irq.h linux-4.9.6/arch/arm/include/asm/irq.h ---- linux-4.9.6.orig/arch/arm/include/asm/irq.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/include/asm/irq.h 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/include/asm/irq.h linux-4.9.22/arch/arm/include/asm/irq.h +--- linux-4.9.22.orig/arch/arm/include/asm/irq.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/include/asm/irq.h 2017-04-18 17:19:16.618770722 +0200 @@ -22,6 +22,8 @@ #endif @@ -10,9 +10,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/include/asm/irq.h linux-4.9.6/arch/arm/inclu struct irqaction; struct pt_regs; extern void migrate_irqs(void); -diff -Nur linux-4.9.6.orig/arch/arm/include/asm/switch_to.h linux-4.9.6/arch/arm/include/asm/switch_to.h ---- linux-4.9.6.orig/arch/arm/include/asm/switch_to.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/include/asm/switch_to.h 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/include/asm/switch_to.h linux-4.9.22/arch/arm/include/asm/switch_to.h +--- linux-4.9.22.orig/arch/arm/include/asm/switch_to.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/include/asm/switch_to.h 2017-04-18 17:19:16.618770722 +0200 @@ -3,6 +3,13 @@ #include <linux/thread_info.h> @@ -35,9 +35,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/include/asm/switch_to.h linux-4.9.6/arch/arm last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ } while (0) -diff -Nur linux-4.9.6.orig/arch/arm/include/asm/thread_info.h linux-4.9.6/arch/arm/include/asm/thread_info.h ---- linux-4.9.6.orig/arch/arm/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/include/asm/thread_info.h 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/include/asm/thread_info.h linux-4.9.22/arch/arm/include/asm/thread_info.h +--- linux-4.9.22.orig/arch/arm/include/asm/thread_info.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/include/asm/thread_info.h 2017-04-18 17:19:16.618770722 +0200 @@ -49,6 +49,7 @@ struct thread_info { unsigned long flags; /* low level flags */ @@ -74,9 +74,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/include/asm/thread_info.h linux-4.9.6/arch/a #endif /* __KERNEL__ */ #endif /* __ASM_ARM_THREAD_INFO_H */ -diff -Nur linux-4.9.6.orig/arch/arm/Kconfig linux-4.9.6/arch/arm/Kconfig ---- linux-4.9.6.orig/arch/arm/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/Kconfig 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/Kconfig linux-4.9.22/arch/arm/Kconfig +--- linux-4.9.22.orig/arch/arm/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/Kconfig 2017-04-18 17:19:16.618770722 +0200 @@ -36,7 +36,7 @@ select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT) select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6 @@ -94,9 +94,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/Kconfig linux-4.9.6/arch/arm/Kconfig select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE) select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS -diff -Nur linux-4.9.6.orig/arch/arm/kernel/asm-offsets.c linux-4.9.6/arch/arm/kernel/asm-offsets.c ---- linux-4.9.6.orig/arch/arm/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/asm-offsets.c 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/asm-offsets.c linux-4.9.22/arch/arm/kernel/asm-offsets.c +--- linux-4.9.22.orig/arch/arm/kernel/asm-offsets.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/asm-offsets.c 2017-04-18 17:19:16.618770722 +0200 @@ -65,6 +65,7 @@ BLANK(); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); @@ -105,9 +105,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/asm-offsets.c linux-4.9.6/arch/arm/ke DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-armv.S linux-4.9.6/arch/arm/kernel/entry-armv.S ---- linux-4.9.6.orig/arch/arm/kernel/entry-armv.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/entry-armv.S 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/entry-armv.S linux-4.9.22/arch/arm/kernel/entry-armv.S +--- linux-4.9.22.orig/arch/arm/kernel/entry-armv.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/entry-armv.S 2017-04-18 17:19:16.622770857 +0200 @@ -220,11 +220,18 @@ #ifdef CONFIG_PREEMPT @@ -145,9 +145,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-armv.S linux-4.9.6/arch/arm/ker #endif __und_fault: -diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-common.S linux-4.9.6/arch/arm/kernel/entry-common.S ---- linux-4.9.6.orig/arch/arm/kernel/entry-common.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/entry-common.S 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/entry-common.S linux-4.9.22/arch/arm/kernel/entry-common.S +--- linux-4.9.22.orig/arch/arm/kernel/entry-common.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/entry-common.S 2017-04-18 17:19:16.622770857 +0200 @@ -36,7 +36,9 @@ UNWIND(.cantunwind ) disable_irq_notrace @ disable interrupts @@ -172,9 +172,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-common.S linux-4.9.6/arch/arm/k UNWIND(.fnend ) ENDPROC(ret_fast_syscall) -diff -Nur linux-4.9.6.orig/arch/arm/kernel/patch.c linux-4.9.6/arch/arm/kernel/patch.c ---- linux-4.9.6.orig/arch/arm/kernel/patch.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/patch.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/patch.c linux-4.9.22/arch/arm/kernel/patch.c +--- linux-4.9.22.orig/arch/arm/kernel/patch.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/patch.c 2017-04-18 17:19:16.622770857 +0200 @@ -15,7 +15,7 @@ unsigned int insn; }; @@ -202,9 +202,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/patch.c linux-4.9.6/arch/arm/kernel/p else __release(&patch_lock); } -diff -Nur linux-4.9.6.orig/arch/arm/kernel/process.c linux-4.9.6/arch/arm/kernel/process.c ---- linux-4.9.6.orig/arch/arm/kernel/process.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/process.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/process.c linux-4.9.22/arch/arm/kernel/process.c +--- linux-4.9.22.orig/arch/arm/kernel/process.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/process.c 2017-04-18 17:19:16.622770857 +0200 @@ -322,6 +322,30 @@ } @@ -236,9 +236,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/process.c linux-4.9.6/arch/arm/kernel #ifdef CONFIG_KUSER_HELPERS /* * The vectors page is always readable from user space for the -diff -Nur linux-4.9.6.orig/arch/arm/kernel/signal.c linux-4.9.6/arch/arm/kernel/signal.c ---- linux-4.9.6.orig/arch/arm/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/signal.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/signal.c linux-4.9.22/arch/arm/kernel/signal.c +--- linux-4.9.22.orig/arch/arm/kernel/signal.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/signal.c 2017-04-18 17:19:16.622770857 +0200 @@ -572,7 +572,8 @@ */ trace_hardirqs_off(); @@ -249,9 +249,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/signal.c linux-4.9.6/arch/arm/kernel/ schedule(); } else { if (unlikely(!user_mode(regs))) -diff -Nur linux-4.9.6.orig/arch/arm/kernel/smp.c linux-4.9.6/arch/arm/kernel/smp.c ---- linux-4.9.6.orig/arch/arm/kernel/smp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/smp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/smp.c linux-4.9.22/arch/arm/kernel/smp.c +--- linux-4.9.22.orig/arch/arm/kernel/smp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/smp.c 2017-04-18 17:19:16.622770857 +0200 @@ -234,8 +234,6 @@ flush_cache_louis(); local_flush_tlb_all(); @@ -271,9 +271,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/smp.c linux-4.9.6/arch/arm/kernel/smp pr_notice("CPU%u: shutdown\n", cpu); /* -diff -Nur linux-4.9.6.orig/arch/arm/kernel/unwind.c linux-4.9.6/arch/arm/kernel/unwind.c ---- linux-4.9.6.orig/arch/arm/kernel/unwind.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kernel/unwind.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kernel/unwind.c linux-4.9.22/arch/arm/kernel/unwind.c +--- linux-4.9.22.orig/arch/arm/kernel/unwind.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kernel/unwind.c 2017-04-18 17:19:16.622770857 +0200 @@ -93,7 +93,7 @@ static const struct unwind_idx *__origin_unwind_idx; extern const struct unwind_idx __stop_unwind_idx[]; @@ -325,9 +325,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kernel/unwind.c linux-4.9.6/arch/arm/kernel/ kfree(tab); } -diff -Nur linux-4.9.6.orig/arch/arm/kvm/arm.c linux-4.9.6/arch/arm/kvm/arm.c ---- linux-4.9.6.orig/arch/arm/kvm/arm.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/kvm/arm.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/kvm/arm.c linux-4.9.22/arch/arm/kvm/arm.c +--- linux-4.9.22.orig/arch/arm/kvm/arm.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/kvm/arm.c 2017-04-18 17:19:16.622770857 +0200 @@ -619,7 +619,7 @@ * involves poking the GIC, which must be done in a * non-preemptible context. @@ -355,9 +355,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/kvm/arm.c linux-4.9.6/arch/arm/kvm/arm.c ret = handle_exit(vcpu, run, ret); } -diff -Nur linux-4.9.6.orig/arch/arm/mach-exynos/platsmp.c linux-4.9.6/arch/arm/mach-exynos/platsmp.c ---- linux-4.9.6.orig/arch/arm/mach-exynos/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-exynos/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-exynos/platsmp.c linux-4.9.22/arch/arm/mach-exynos/platsmp.c +--- linux-4.9.22.orig/arch/arm/mach-exynos/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-exynos/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -229,7 +229,7 @@ return (void __iomem *)(S5P_VA_SCU); } @@ -405,9 +405,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-exynos/platsmp.c linux-4.9.6/arch/arm/m return pen_release != -1 ? ret : 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mach-hisi/platmcpm.c linux-4.9.6/arch/arm/mach-hisi/platmcpm.c ---- linux-4.9.6.orig/arch/arm/mach-hisi/platmcpm.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-hisi/platmcpm.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-hisi/platmcpm.c linux-4.9.22/arch/arm/mach-hisi/platmcpm.c +--- linux-4.9.22.orig/arch/arm/mach-hisi/platmcpm.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-hisi/platmcpm.c 2017-04-18 17:19:16.622770857 +0200 @@ -61,7 +61,7 @@ static void __iomem *sysctrl, *fabric; @@ -493,9 +493,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-hisi/platmcpm.c linux-4.9.6/arch/arm/ma return 0; } #endif -diff -Nur linux-4.9.6.orig/arch/arm/mach-omap2/omap-smp.c linux-4.9.6/arch/arm/mach-omap2/omap-smp.c ---- linux-4.9.6.orig/arch/arm/mach-omap2/omap-smp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-omap2/omap-smp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-omap2/omap-smp.c linux-4.9.22/arch/arm/mach-omap2/omap-smp.c +--- linux-4.9.22.orig/arch/arm/mach-omap2/omap-smp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-omap2/omap-smp.c 2017-04-18 17:19:16.622770857 +0200 @@ -64,7 +64,7 @@ .startup_addr = omap5_secondary_startup, }; @@ -534,9 +534,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-omap2/omap-smp.c linux-4.9.6/arch/arm/m return 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mach-prima2/platsmp.c linux-4.9.6/arch/arm/mach-prima2/platsmp.c ---- linux-4.9.6.orig/arch/arm/mach-prima2/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-prima2/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-prima2/platsmp.c linux-4.9.22/arch/arm/mach-prima2/platsmp.c +--- linux-4.9.22.orig/arch/arm/mach-prima2/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-prima2/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -22,7 +22,7 @@ static void __iomem *clk_base; @@ -575,9 +575,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-prima2/platsmp.c linux-4.9.6/arch/arm/m return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mach-qcom/platsmp.c linux-4.9.6/arch/arm/mach-qcom/platsmp.c ---- linux-4.9.6.orig/arch/arm/mach-qcom/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-qcom/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-qcom/platsmp.c linux-4.9.22/arch/arm/mach-qcom/platsmp.c +--- linux-4.9.22.orig/arch/arm/mach-qcom/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-qcom/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -46,7 +46,7 @@ extern void secondary_startup_arm(void); @@ -616,9 +616,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-qcom/platsmp.c linux-4.9.6/arch/arm/mac return ret; } -diff -Nur linux-4.9.6.orig/arch/arm/mach-spear/platsmp.c linux-4.9.6/arch/arm/mach-spear/platsmp.c ---- linux-4.9.6.orig/arch/arm/mach-spear/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-spear/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-spear/platsmp.c linux-4.9.22/arch/arm/mach-spear/platsmp.c +--- linux-4.9.22.orig/arch/arm/mach-spear/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-spear/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -32,7 +32,7 @@ sync_cache_w(&pen_release); } @@ -657,9 +657,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-spear/platsmp.c linux-4.9.6/arch/arm/ma return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mach-sti/platsmp.c linux-4.9.6/arch/arm/mach-sti/platsmp.c ---- linux-4.9.6.orig/arch/arm/mach-sti/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mach-sti/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mach-sti/platsmp.c linux-4.9.22/arch/arm/mach-sti/platsmp.c +--- linux-4.9.22.orig/arch/arm/mach-sti/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mach-sti/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -35,7 +35,7 @@ sync_cache_w(&pen_release); } @@ -698,9 +698,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mach-sti/platsmp.c linux-4.9.6/arch/arm/mach return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mm/fault.c linux-4.9.6/arch/arm/mm/fault.c ---- linux-4.9.6.orig/arch/arm/mm/fault.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mm/fault.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mm/fault.c linux-4.9.22/arch/arm/mm/fault.c +--- linux-4.9.22.orig/arch/arm/mm/fault.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mm/fault.c 2017-04-18 17:19:16.622770857 +0200 @@ -430,6 +430,9 @@ if (addr < TASK_SIZE) return do_page_fault(addr, fsr, regs); @@ -721,9 +721,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mm/fault.c linux-4.9.6/arch/arm/mm/fault.c do_bad_area(addr, fsr, regs); return 0; } -diff -Nur linux-4.9.6.orig/arch/arm/mm/highmem.c linux-4.9.6/arch/arm/mm/highmem.c ---- linux-4.9.6.orig/arch/arm/mm/highmem.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/mm/highmem.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/mm/highmem.c linux-4.9.22/arch/arm/mm/highmem.c +--- linux-4.9.22.orig/arch/arm/mm/highmem.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/mm/highmem.c 2017-04-18 17:19:16.622770857 +0200 @@ -34,6 +34,11 @@ return *ptep; } @@ -854,9 +854,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/mm/highmem.c linux-4.9.6/arch/arm/mm/highmem + } +} +#endif -diff -Nur linux-4.9.6.orig/arch/arm/plat-versatile/platsmp.c linux-4.9.6/arch/arm/plat-versatile/platsmp.c ---- linux-4.9.6.orig/arch/arm/plat-versatile/platsmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm/plat-versatile/platsmp.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm/plat-versatile/platsmp.c linux-4.9.22/arch/arm/plat-versatile/platsmp.c +--- linux-4.9.22.orig/arch/arm/plat-versatile/platsmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm/plat-versatile/platsmp.c 2017-04-18 17:19:16.622770857 +0200 @@ -32,7 +32,7 @@ sync_cache_w(&pen_release); } @@ -895,9 +895,9 @@ diff -Nur linux-4.9.6.orig/arch/arm/plat-versatile/platsmp.c linux-4.9.6/arch/ar return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.9.6.orig/arch/arm64/include/asm/thread_info.h linux-4.9.6/arch/arm64/include/asm/thread_info.h ---- linux-4.9.6.orig/arch/arm64/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm64/include/asm/thread_info.h 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm64/include/asm/thread_info.h linux-4.9.22/arch/arm64/include/asm/thread_info.h +--- linux-4.9.22.orig/arch/arm64/include/asm/thread_info.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm64/include/asm/thread_info.h 2017-04-18 17:19:16.622770857 +0200 @@ -49,6 +49,7 @@ mm_segment_t addr_limit; /* address limit */ struct task_struct *task; /* main task structure */ @@ -933,9 +933,9 @@ diff -Nur linux-4.9.6.orig/arch/arm64/include/asm/thread_info.h linux-4.9.6/arch #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ -diff -Nur linux-4.9.6.orig/arch/arm64/Kconfig linux-4.9.6/arch/arm64/Kconfig ---- linux-4.9.6.orig/arch/arm64/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm64/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm64/Kconfig linux-4.9.22/arch/arm64/Kconfig +--- linux-4.9.22.orig/arch/arm64/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm64/Kconfig 2017-04-18 17:19:16.622770857 +0200 @@ -91,6 +91,7 @@ select HAVE_PERF_EVENTS select HAVE_PERF_REGS @@ -944,7 +944,7 @@ diff -Nur linux-4.9.6.orig/arch/arm64/Kconfig linux-4.9.6/arch/arm64/Kconfig select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RCU_TABLE_FREE select HAVE_SYSCALL_TRACEPOINTS -@@ -694,7 +695,7 @@ +@@ -704,7 +705,7 @@ config XEN bool "Xen guest support on ARM64" @@ -953,9 +953,9 @@ diff -Nur linux-4.9.6.orig/arch/arm64/Kconfig linux-4.9.6/arch/arm64/Kconfig select SWIOTLB_XEN select PARAVIRT help -diff -Nur linux-4.9.6.orig/arch/arm64/kernel/asm-offsets.c linux-4.9.6/arch/arm64/kernel/asm-offsets.c ---- linux-4.9.6.orig/arch/arm64/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm64/kernel/asm-offsets.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm64/kernel/asm-offsets.c linux-4.9.22/arch/arm64/kernel/asm-offsets.c +--- linux-4.9.22.orig/arch/arm64/kernel/asm-offsets.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm64/kernel/asm-offsets.c 2017-04-18 17:19:16.622770857 +0200 @@ -38,6 +38,7 @@ BLANK(); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); @@ -964,9 +964,9 @@ diff -Nur linux-4.9.6.orig/arch/arm64/kernel/asm-offsets.c linux-4.9.6/arch/arm6 DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.9.6.orig/arch/arm64/kernel/entry.S linux-4.9.6/arch/arm64/kernel/entry.S ---- linux-4.9.6.orig/arch/arm64/kernel/entry.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm64/kernel/entry.S 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm64/kernel/entry.S linux-4.9.22/arch/arm64/kernel/entry.S +--- linux-4.9.22.orig/arch/arm64/kernel/entry.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm64/kernel/entry.S 2017-04-18 17:19:16.622770857 +0200 @@ -428,11 +428,16 @@ #ifdef CONFIG_PREEMPT @@ -995,9 +995,9 @@ diff -Nur linux-4.9.6.orig/arch/arm64/kernel/entry.S linux-4.9.6/arch/arm64/kern ret x24 #endif -diff -Nur linux-4.9.6.orig/arch/arm64/kernel/signal.c linux-4.9.6/arch/arm64/kernel/signal.c ---- linux-4.9.6.orig/arch/arm64/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/arm64/kernel/signal.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/arm64/kernel/signal.c linux-4.9.22/arch/arm64/kernel/signal.c +--- linux-4.9.22.orig/arch/arm64/kernel/signal.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/arm64/kernel/signal.c 2017-04-18 17:19:16.622770857 +0200 @@ -409,7 +409,7 @@ */ trace_hardirqs_off(); @@ -1007,9 +1007,9 @@ diff -Nur linux-4.9.6.orig/arch/arm64/kernel/signal.c linux-4.9.6/arch/arm64/ker schedule(); } else { local_irq_enable(); -diff -Nur linux-4.9.6.orig/arch/Kconfig linux-4.9.6/arch/Kconfig ---- linux-4.9.6.orig/arch/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/Kconfig 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/arch/Kconfig linux-4.9.22/arch/Kconfig +--- linux-4.9.22.orig/arch/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/Kconfig 2017-04-18 17:19:16.618770722 +0200 @@ -9,6 +9,7 @@ tristate "OProfile system profiling" depends on PROFILING @@ -1026,9 +1026,9 @@ diff -Nur linux-4.9.6.orig/arch/Kconfig linux-4.9.6/arch/Kconfig help This option enables a transparent branch optimization that makes certain almost-always-true or almost-always-false branch -diff -Nur linux-4.9.6.orig/arch/mips/Kconfig linux-4.9.6/arch/mips/Kconfig ---- linux-4.9.6.orig/arch/mips/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/mips/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/mips/Kconfig linux-4.9.22/arch/mips/Kconfig +--- linux-4.9.22.orig/arch/mips/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/mips/Kconfig 2017-04-18 17:19:16.622770857 +0200 @@ -2514,7 +2514,7 @@ # config HIGHMEM @@ -1038,9 +1038,9 @@ diff -Nur linux-4.9.6.orig/arch/mips/Kconfig linux-4.9.6/arch/mips/Kconfig config CPU_SUPPORTS_HIGHMEM bool -diff -Nur linux-4.9.6.orig/arch/powerpc/include/asm/thread_info.h linux-4.9.6/arch/powerpc/include/asm/thread_info.h ---- linux-4.9.6.orig/arch/powerpc/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/include/asm/thread_info.h 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/include/asm/thread_info.h linux-4.9.22/arch/powerpc/include/asm/thread_info.h +--- linux-4.9.22.orig/arch/powerpc/include/asm/thread_info.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/include/asm/thread_info.h 2017-04-18 17:19:16.626771037 +0200 @@ -43,6 +43,8 @@ int cpu; /* cpu we're on */ int preempt_count; /* 0 => preemptable, @@ -1087,9 +1087,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/include/asm/thread_info.h linux-4.9.6/ar /* Bits in local_flags */ /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ -diff -Nur linux-4.9.6.orig/arch/powerpc/Kconfig linux-4.9.6/arch/powerpc/Kconfig ---- linux-4.9.6.orig/arch/powerpc/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/Kconfig linux-4.9.22/arch/powerpc/Kconfig +--- linux-4.9.22.orig/arch/powerpc/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/Kconfig 2017-04-18 17:19:16.626771037 +0200 @@ -52,10 +52,11 @@ config RWSEM_GENERIC_SPINLOCK @@ -1120,9 +1120,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/Kconfig linux-4.9.6/arch/powerpc/Kconfig source kernel/Kconfig.hz source kernel/Kconfig.preempt -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/asm-offsets.c linux-4.9.6/arch/powerpc/kernel/asm-offsets.c ---- linux-4.9.6.orig/arch/powerpc/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/asm-offsets.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/asm-offsets.c linux-4.9.22/arch/powerpc/kernel/asm-offsets.c +--- linux-4.9.22.orig/arch/powerpc/kernel/asm-offsets.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/asm-offsets.c 2017-04-18 17:19:16.626771037 +0200 @@ -156,6 +156,7 @@ DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); @@ -1131,9 +1131,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/asm-offsets.c linux-4.9.6/arch/po DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_32.S linux-4.9.6/arch/powerpc/kernel/entry_32.S ---- linux-4.9.6.orig/arch/powerpc/kernel/entry_32.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/entry_32.S 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/entry_32.S linux-4.9.22/arch/powerpc/kernel/entry_32.S +--- linux-4.9.22.orig/arch/powerpc/kernel/entry_32.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/entry_32.S 2017-04-18 17:19:16.626771037 +0200 @@ -835,7 +835,14 @@ cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ bne restore @@ -1182,9 +1182,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_32.S linux-4.9.6/arch/power bne- do_resched andi. r0,r9,_TIF_USER_WORK_MASK beq restore_user -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_64.S linux-4.9.6/arch/powerpc/kernel/entry_64.S ---- linux-4.9.6.orig/arch/powerpc/kernel/entry_64.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/entry_64.S 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/entry_64.S linux-4.9.22/arch/powerpc/kernel/entry_64.S +--- linux-4.9.22.orig/arch/powerpc/kernel/entry_64.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/entry_64.S 2017-04-18 17:19:16.626771037 +0200 @@ -656,7 +656,7 @@ bl restore_math b restore @@ -1223,9 +1223,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_64.S linux-4.9.6/arch/power bne 1b /* -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/irq.c linux-4.9.6/arch/powerpc/kernel/irq.c ---- linux-4.9.6.orig/arch/powerpc/kernel/irq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/irq.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/irq.c linux-4.9.22/arch/powerpc/kernel/irq.c +--- linux-4.9.22.orig/arch/powerpc/kernel/irq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/irq.c 2017-04-18 17:19:16.626771037 +0200 @@ -638,6 +638,7 @@ } } @@ -1242,9 +1242,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/irq.c linux-4.9.6/arch/powerpc/ke irq_hw_number_t virq_to_hw(unsigned int virq) { -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_32.S linux-4.9.6/arch/powerpc/kernel/misc_32.S ---- linux-4.9.6.orig/arch/powerpc/kernel/misc_32.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/misc_32.S 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/misc_32.S linux-4.9.22/arch/powerpc/kernel/misc_32.S +--- linux-4.9.22.orig/arch/powerpc/kernel/misc_32.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/misc_32.S 2017-04-18 17:19:16.626771037 +0200 @@ -41,6 +41,7 @@ * We store the saved ksp_limit in the unused part * of the STACK_FRAME_OVERHEAD @@ -1261,9 +1261,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_32.S linux-4.9.6/arch/powerp /* * void call_do_irq(struct pt_regs *regs, struct thread_info *irqtp); -diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_64.S linux-4.9.6/arch/powerpc/kernel/misc_64.S ---- linux-4.9.6.orig/arch/powerpc/kernel/misc_64.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kernel/misc_64.S 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kernel/misc_64.S linux-4.9.22/arch/powerpc/kernel/misc_64.S +--- linux-4.9.22.orig/arch/powerpc/kernel/misc_64.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kernel/misc_64.S 2017-04-18 17:19:16.626771037 +0200 @@ -31,6 +31,7 @@ .text @@ -1280,9 +1280,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_64.S linux-4.9.6/arch/powerp _GLOBAL(call_do_irq) mflr r0 -diff -Nur linux-4.9.6.orig/arch/powerpc/kvm/Kconfig linux-4.9.6/arch/powerpc/kvm/Kconfig ---- linux-4.9.6.orig/arch/powerpc/kvm/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/kvm/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/kvm/Kconfig linux-4.9.22/arch/powerpc/kvm/Kconfig +--- linux-4.9.22.orig/arch/powerpc/kvm/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/kvm/Kconfig 2017-04-18 17:19:16.626771037 +0200 @@ -175,6 +175,7 @@ config KVM_MPIC bool "KVM in-kernel MPIC emulation" @@ -1291,9 +1291,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/kvm/Kconfig linux-4.9.6/arch/powerpc/kvm select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQFD select HAVE_KVM_IRQ_ROUTING -diff -Nur linux-4.9.6.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.9.6/arch/powerpc/platforms/ps3/device-init.c ---- linux-4.9.6.orig/arch/powerpc/platforms/ps3/device-init.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/powerpc/platforms/ps3/device-init.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.9.22/arch/powerpc/platforms/ps3/device-init.c +--- linux-4.9.22.orig/arch/powerpc/platforms/ps3/device-init.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/powerpc/platforms/ps3/device-init.c 2017-04-18 17:19:16.626771037 +0200 @@ -752,7 +752,7 @@ } pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op); @@ -1303,9 +1303,9 @@ diff -Nur linux-4.9.6.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.9.6/ dev->done.done || kthread_should_stop()); if (kthread_should_stop()) res = -EINTR; -diff -Nur linux-4.9.6.orig/arch/sh/kernel/irq.c linux-4.9.6/arch/sh/kernel/irq.c ---- linux-4.9.6.orig/arch/sh/kernel/irq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/sh/kernel/irq.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/sh/kernel/irq.c linux-4.9.22/arch/sh/kernel/irq.c +--- linux-4.9.22.orig/arch/sh/kernel/irq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/sh/kernel/irq.c 2017-04-18 17:19:16.626771037 +0200 @@ -147,6 +147,7 @@ hardirq_ctx[cpu] = NULL; } @@ -1322,9 +1322,9 @@ diff -Nur linux-4.9.6.orig/arch/sh/kernel/irq.c linux-4.9.6/arch/sh/kernel/irq.c #else static inline void handle_one_irq(unsigned int irq) { -diff -Nur linux-4.9.6.orig/arch/sparc/Kconfig linux-4.9.6/arch/sparc/Kconfig ---- linux-4.9.6.orig/arch/sparc/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/sparc/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/sparc/Kconfig linux-4.9.22/arch/sparc/Kconfig +--- linux-4.9.22.orig/arch/sparc/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/sparc/Kconfig 2017-04-18 17:19:16.626771037 +0200 @@ -194,12 +194,10 @@ source kernel/Kconfig.hz @@ -1340,9 +1340,9 @@ diff -Nur linux-4.9.6.orig/arch/sparc/Kconfig linux-4.9.6/arch/sparc/Kconfig config GENERIC_HWEIGHT bool -diff -Nur linux-4.9.6.orig/arch/sparc/kernel/irq_64.c linux-4.9.6/arch/sparc/kernel/irq_64.c ---- linux-4.9.6.orig/arch/sparc/kernel/irq_64.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/sparc/kernel/irq_64.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/sparc/kernel/irq_64.c linux-4.9.22/arch/sparc/kernel/irq_64.c +--- linux-4.9.22.orig/arch/sparc/kernel/irq_64.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/sparc/kernel/irq_64.c 2017-04-18 17:19:16.626771037 +0200 @@ -854,6 +854,7 @@ set_irq_regs(old_regs); } @@ -1359,9 +1359,9 @@ diff -Nur linux-4.9.6.orig/arch/sparc/kernel/irq_64.c linux-4.9.6/arch/sparc/ker #ifdef CONFIG_HOTPLUG_CPU void fixup_irqs(void) -diff -Nur linux-4.9.6.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.9.6/arch/x86/crypto/aesni-intel_glue.c ---- linux-4.9.6.orig/arch/x86/crypto/aesni-intel_glue.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/crypto/aesni-intel_glue.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.9.22/arch/x86/crypto/aesni-intel_glue.c +--- linux-4.9.22.orig/arch/x86/crypto/aesni-intel_glue.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/crypto/aesni-intel_glue.c 2017-04-18 17:19:16.626771037 +0200 @@ -372,14 +372,14 @@ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -1454,9 +1454,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.9.6/arch/x return err; } -diff -Nur linux-4.9.6.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.9.6/arch/x86/crypto/cast5_avx_glue.c ---- linux-4.9.6.orig/arch/x86/crypto/cast5_avx_glue.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/crypto/cast5_avx_glue.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.9.22/arch/x86/crypto/cast5_avx_glue.c +--- linux-4.9.22.orig/arch/x86/crypto/cast5_avx_glue.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/crypto/cast5_avx_glue.c 2017-04-18 17:19:16.626771037 +0200 @@ -59,7 +59,7 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk, bool enc) @@ -1536,9 +1536,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.9.6/arch/x86 if (walk.nbytes) { ctr_crypt_final(desc, &walk); err = blkcipher_walk_done(desc, &walk, 0); -diff -Nur linux-4.9.6.orig/arch/x86/crypto/glue_helper.c linux-4.9.6/arch/x86/crypto/glue_helper.c ---- linux-4.9.6.orig/arch/x86/crypto/glue_helper.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/crypto/glue_helper.c 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/crypto/glue_helper.c linux-4.9.22/arch/x86/crypto/glue_helper.c +--- linux-4.9.22.orig/arch/x86/crypto/glue_helper.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/crypto/glue_helper.c 2017-04-18 17:19:16.626771037 +0200 @@ -39,7 +39,7 @@ void *ctx = crypto_blkcipher_ctx(desc->tfm); const unsigned int bsize = 128 / 8; @@ -1654,9 +1654,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/crypto/glue_helper.c linux-4.9.6/arch/x86/cr return err; } EXPORT_SYMBOL_GPL(glue_xts_crypt_128bit); -diff -Nur linux-4.9.6.orig/arch/x86/entry/common.c linux-4.9.6/arch/x86/entry/common.c ---- linux-4.9.6.orig/arch/x86/entry/common.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/entry/common.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/entry/common.c linux-4.9.22/arch/x86/entry/common.c +--- linux-4.9.22.orig/arch/x86/entry/common.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/entry/common.c 2017-04-18 17:19:16.626771037 +0200 @@ -129,7 +129,7 @@ #define EXIT_TO_USERMODE_LOOP_FLAGS \ @@ -1684,9 +1684,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/entry/common.c linux-4.9.6/arch/x86/entry/co if (cached_flags & _TIF_UPROBE) uprobe_notify_resume(regs); -diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_32.S linux-4.9.6/arch/x86/entry/entry_32.S ---- linux-4.9.6.orig/arch/x86/entry/entry_32.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/entry/entry_32.S 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/entry/entry_32.S linux-4.9.22/arch/x86/entry/entry_32.S +--- linux-4.9.22.orig/arch/x86/entry/entry_32.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/entry/entry_32.S 2017-04-18 17:19:16.626771037 +0200 @@ -308,8 +308,25 @@ ENTRY(resume_kernel) DISABLE_INTERRUPTS(CLBR_ANY) @@ -1713,9 +1713,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_32.S linux-4.9.6/arch/x86/entry/ testl $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ? jz restore_all call preempt_schedule_irq -diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_64.S linux-4.9.6/arch/x86/entry/entry_64.S ---- linux-4.9.6.orig/arch/x86/entry/entry_64.S 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/entry/entry_64.S 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/entry/entry_64.S linux-4.9.22/arch/x86/entry/entry_64.S +--- linux-4.9.22.orig/arch/x86/entry/entry_64.S 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/entry/entry_64.S 2017-04-18 17:19:16.626771037 +0200 @@ -546,7 +546,23 @@ bt $9, EFLAGS(%rsp) /* were interrupts off? */ jnc 1f @@ -1756,9 +1756,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_64.S linux-4.9.6/arch/x86/entry/ #ifdef CONFIG_XEN idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0 -diff -Nur linux-4.9.6.orig/arch/x86/include/asm/preempt.h linux-4.9.6/arch/x86/include/asm/preempt.h ---- linux-4.9.6.orig/arch/x86/include/asm/preempt.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/include/asm/preempt.h 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/include/asm/preempt.h linux-4.9.22/arch/x86/include/asm/preempt.h +--- linux-4.9.22.orig/arch/x86/include/asm/preempt.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/include/asm/preempt.h 2017-04-18 17:19:16.630771208 +0200 @@ -79,17 +79,46 @@ * a decrement which hits zero means we have no preempt_count and should * reschedule. @@ -1807,9 +1807,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/include/asm/preempt.h linux-4.9.6/arch/x86/i } #ifdef CONFIG_PREEMPT -diff -Nur linux-4.9.6.orig/arch/x86/include/asm/signal.h linux-4.9.6/arch/x86/include/asm/signal.h ---- linux-4.9.6.orig/arch/x86/include/asm/signal.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/include/asm/signal.h 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/include/asm/signal.h linux-4.9.22/arch/x86/include/asm/signal.h +--- linux-4.9.22.orig/arch/x86/include/asm/signal.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/include/asm/signal.h 2017-04-18 17:19:16.630771208 +0200 @@ -27,6 +27,19 @@ #define SA_IA32_ABI 0x02000000u #define SA_X32_ABI 0x01000000u @@ -1830,9 +1830,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/include/asm/signal.h linux-4.9.6/arch/x86/in #ifndef CONFIG_COMPAT typedef sigset_t compat_sigset_t; #endif -diff -Nur linux-4.9.6.orig/arch/x86/include/asm/stackprotector.h linux-4.9.6/arch/x86/include/asm/stackprotector.h ---- linux-4.9.6.orig/arch/x86/include/asm/stackprotector.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/include/asm/stackprotector.h 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/include/asm/stackprotector.h linux-4.9.22/arch/x86/include/asm/stackprotector.h +--- linux-4.9.22.orig/arch/x86/include/asm/stackprotector.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/include/asm/stackprotector.h 2017-04-18 17:19:16.630771208 +0200 @@ -59,7 +59,7 @@ */ static __always_inline void boot_init_stack_canary(void) @@ -1858,9 +1858,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/include/asm/stackprotector.h linux-4.9.6/arc tsc = rdtsc(); canary += tsc + (tsc << 32UL); -diff -Nur linux-4.9.6.orig/arch/x86/include/asm/thread_info.h linux-4.9.6/arch/x86/include/asm/thread_info.h ---- linux-4.9.6.orig/arch/x86/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/include/asm/thread_info.h 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/include/asm/thread_info.h linux-4.9.22/arch/x86/include/asm/thread_info.h +--- linux-4.9.22.orig/arch/x86/include/asm/thread_info.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/include/asm/thread_info.h 2017-04-18 17:19:16.630771208 +0200 @@ -54,11 +54,14 @@ struct thread_info { @@ -1912,9 +1912,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/include/asm/thread_info.h linux-4.9.6/arch/x #define STACK_WARN (THREAD_SIZE/8) /* -diff -Nur linux-4.9.6.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.9.6/arch/x86/include/asm/uv/uv_bau.h ---- linux-4.9.6.orig/arch/x86/include/asm/uv/uv_bau.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/include/asm/uv/uv_bau.h 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.9.22/arch/x86/include/asm/uv/uv_bau.h +--- linux-4.9.22.orig/arch/x86/include/asm/uv/uv_bau.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/include/asm/uv/uv_bau.h 2017-04-18 17:19:16.630771208 +0200 @@ -624,9 +624,9 @@ cycles_t send_message; cycles_t period_end; @@ -1948,9 +1948,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.9.6/arch/x86 return 1; } -diff -Nur linux-4.9.6.orig/arch/x86/Kconfig linux-4.9.6/arch/x86/Kconfig ---- linux-4.9.6.orig/arch/x86/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/Kconfig 2017-01-28 13:59:09.895654805 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/Kconfig linux-4.9.22/arch/x86/Kconfig +--- linux-4.9.22.orig/arch/x86/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/Kconfig 2017-04-18 17:19:16.626771037 +0200 @@ -17,6 +17,7 @@ ### Arch settings config X86 @@ -1981,9 +1981,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/Kconfig linux-4.9.6/arch/x86/Kconfig ---help--- Enable maximum number of CPUS and NUMA Nodes for this architecture. If unsure, say N. -diff -Nur linux-4.9.6.orig/arch/x86/kernel/acpi/boot.c linux-4.9.6/arch/x86/kernel/acpi/boot.c ---- linux-4.9.6.orig/arch/x86/kernel/acpi/boot.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/acpi/boot.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/acpi/boot.c linux-4.9.22/arch/x86/kernel/acpi/boot.c +--- linux-4.9.22.orig/arch/x86/kernel/acpi/boot.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/acpi/boot.c 2017-04-18 17:19:16.630771208 +0200 @@ -87,7 +87,9 @@ * ->ioapic_mutex * ->ioapic_lock @@ -1994,9 +1994,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/acpi/boot.c linux-4.9.6/arch/x86/kern /* -------------------------------------------------------------------------- Boot-time Configuration -diff -Nur linux-4.9.6.orig/arch/x86/kernel/apic/io_apic.c linux-4.9.6/arch/x86/kernel/apic/io_apic.c ---- linux-4.9.6.orig/arch/x86/kernel/apic/io_apic.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/apic/io_apic.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/apic/io_apic.c linux-4.9.22/arch/x86/kernel/apic/io_apic.c +--- linux-4.9.22.orig/arch/x86/kernel/apic/io_apic.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/apic/io_apic.c 2017-04-18 17:19:16.630771208 +0200 @@ -1712,7 +1712,8 @@ static inline bool ioapic_irqd_mask(struct irq_data *data) { @@ -2007,9 +2007,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/apic/io_apic.c linux-4.9.6/arch/x86/k mask_ioapic_irq(data); return true; } -diff -Nur linux-4.9.6.orig/arch/x86/kernel/asm-offsets.c linux-4.9.6/arch/x86/kernel/asm-offsets.c ---- linux-4.9.6.orig/arch/x86/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/asm-offsets.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/asm-offsets.c linux-4.9.22/arch/x86/kernel/asm-offsets.c +--- linux-4.9.22.orig/arch/x86/kernel/asm-offsets.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/asm-offsets.c 2017-04-18 17:19:16.630771208 +0200 @@ -36,6 +36,7 @@ BLANK(); @@ -2024,9 +2024,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/asm-offsets.c linux-4.9.6/arch/x86/ke DEFINE(PTREGS_SIZE, sizeof(struct pt_regs)); + DEFINE(_PREEMPT_ENABLED, PREEMPT_ENABLED); } -diff -Nur linux-4.9.6.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.9.6/arch/x86/kernel/cpu/mcheck/mce.c ---- linux-4.9.6.orig/arch/x86/kernel/cpu/mcheck/mce.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/cpu/mcheck/mce.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.9.22/arch/x86/kernel/cpu/mcheck/mce.c +--- linux-4.9.22.orig/arch/x86/kernel/cpu/mcheck/mce.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/cpu/mcheck/mce.c 2017-04-18 17:19:16.630771208 +0200 @@ -41,6 +41,8 @@ #include <linux/debugfs.h> #include <linux/irq_work.h> @@ -2268,9 +2268,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.9.6/arch/x86 if (!zalloc_cpumask_var(&mce_device_initialized, GFP_KERNEL)) { err = -ENOMEM; goto err_out; -diff -Nur linux-4.9.6.orig/arch/x86/kernel/irq_32.c linux-4.9.6/arch/x86/kernel/irq_32.c ---- linux-4.9.6.orig/arch/x86/kernel/irq_32.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/irq_32.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/irq_32.c linux-4.9.22/arch/x86/kernel/irq_32.c +--- linux-4.9.22.orig/arch/x86/kernel/irq_32.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/irq_32.c 2017-04-18 17:19:16.630771208 +0200 @@ -127,6 +127,7 @@ cpu, per_cpu(hardirq_stack, cpu), per_cpu(softirq_stack, cpu)); } @@ -2287,9 +2287,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/irq_32.c linux-4.9.6/arch/x86/kernel/ bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) { -diff -Nur linux-4.9.6.orig/arch/x86/kernel/process_32.c linux-4.9.6/arch/x86/kernel/process_32.c ---- linux-4.9.6.orig/arch/x86/kernel/process_32.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kernel/process_32.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kernel/process_32.c linux-4.9.22/arch/x86/kernel/process_32.c +--- linux-4.9.22.orig/arch/x86/kernel/process_32.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kernel/process_32.c 2017-04-18 17:19:16.630771208 +0200 @@ -35,6 +35,7 @@ #include <linux/uaccess.h> #include <linux/io.h> @@ -2343,9 +2343,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kernel/process_32.c linux-4.9.6/arch/x86/ker /* * Leave lazy mode, flushing any hypercalls made here. * This must be done before restoring TLS segments so -diff -Nur linux-4.9.6.orig/arch/x86/kvm/lapic.c linux-4.9.6/arch/x86/kvm/lapic.c ---- linux-4.9.6.orig/arch/x86/kvm/lapic.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kvm/lapic.c 2017-01-28 13:59:09.899654958 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/kvm/lapic.c linux-4.9.22/arch/x86/kvm/lapic.c +--- linux-4.9.22.orig/arch/x86/kvm/lapic.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kvm/lapic.c 2017-04-18 17:19:16.630771208 +0200 @@ -1939,6 +1939,7 @@ hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); @@ -2354,10 +2354,10 @@ diff -Nur linux-4.9.6.orig/arch/x86/kvm/lapic.c linux-4.9.6/arch/x86/kvm/lapic.c /* * APIC is created enabled. This will prevent kvm_lapic_set_base from -diff -Nur linux-4.9.6.orig/arch/x86/kvm/x86.c linux-4.9.6/arch/x86/kvm/x86.c ---- linux-4.9.6.orig/arch/x86/kvm/x86.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/kvm/x86.c 2017-01-28 13:59:09.903655111 +0100 -@@ -5932,6 +5932,13 @@ +diff -Nur linux-4.9.22.orig/arch/x86/kvm/x86.c linux-4.9.22/arch/x86/kvm/x86.c +--- linux-4.9.22.orig/arch/x86/kvm/x86.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/kvm/x86.c 2017-04-18 17:19:16.630771208 +0200 +@@ -5933,6 +5933,13 @@ goto out; } @@ -2371,9 +2371,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/kvm/x86.c linux-4.9.6/arch/x86/kvm/x86.c r = kvm_mmu_module_init(); if (r) goto out_free_percpu; -diff -Nur linux-4.9.6.orig/arch/x86/mm/highmem_32.c linux-4.9.6/arch/x86/mm/highmem_32.c ---- linux-4.9.6.orig/arch/x86/mm/highmem_32.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/mm/highmem_32.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/mm/highmem_32.c linux-4.9.22/arch/x86/mm/highmem_32.c +--- linux-4.9.22.orig/arch/x86/mm/highmem_32.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/mm/highmem_32.c 2017-04-18 17:19:16.630771208 +0200 @@ -32,10 +32,11 @@ */ void *kmap_atomic_prot(struct page *page, pgprot_t prot) @@ -2418,9 +2418,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/mm/highmem_32.c linux-4.9.6/arch/x86/mm/high } EXPORT_SYMBOL(__kunmap_atomic); -diff -Nur linux-4.9.6.orig/arch/x86/mm/iomap_32.c linux-4.9.6/arch/x86/mm/iomap_32.c ---- linux-4.9.6.orig/arch/x86/mm/iomap_32.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/mm/iomap_32.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/mm/iomap_32.c linux-4.9.22/arch/x86/mm/iomap_32.c +--- linux-4.9.22.orig/arch/x86/mm/iomap_32.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/mm/iomap_32.c 2017-04-18 17:19:16.630771208 +0200 @@ -56,6 +56,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot) @@ -2453,9 +2453,28 @@ diff -Nur linux-4.9.6.orig/arch/x86/mm/iomap_32.c linux-4.9.6/arch/x86/mm/iomap_ kpte_clear_flush(kmap_pte-idx, vaddr); kmap_atomic_idx_pop(); } -diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/tlb_uv.c linux-4.9.6/arch/x86/platform/uv/tlb_uv.c ---- linux-4.9.6.orig/arch/x86/platform/uv/tlb_uv.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/platform/uv/tlb_uv.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/mm/pageattr.c linux-4.9.22/arch/x86/mm/pageattr.c +--- linux-4.9.22.orig/arch/x86/mm/pageattr.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/mm/pageattr.c 2017-04-18 17:19:16.634771367 +0200 +@@ -214,7 +214,15 @@ + int in_flags, struct page **pages) + { + unsigned int i, level; ++#ifdef CONFIG_PREEMPT ++ /* ++ * Avoid wbinvd() because it causes latencies on all CPUs, ++ * regardless of any CPU isolation that may be in effect. ++ */ ++ unsigned long do_wbinvd = 0; ++#else + unsigned long do_wbinvd = cache && numpages >= 1024; /* 4M threshold */ ++#endif + + BUG_ON(irqs_disabled()); + +diff -Nur linux-4.9.22.orig/arch/x86/platform/uv/tlb_uv.c linux-4.9.22/arch/x86/platform/uv/tlb_uv.c +--- linux-4.9.22.orig/arch/x86/platform/uv/tlb_uv.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/platform/uv/tlb_uv.c 2017-04-18 17:19:16.634771367 +0200 @@ -748,9 +748,9 @@ quiesce_local_uvhub(hmaster); @@ -2542,9 +2561,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/tlb_uv.c linux-4.9.6/arch/x86/pl } } -diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/uv_time.c linux-4.9.6/arch/x86/platform/uv/uv_time.c ---- linux-4.9.6.orig/arch/x86/platform/uv/uv_time.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/arch/x86/platform/uv/uv_time.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/arch/x86/platform/uv/uv_time.c linux-4.9.22/arch/x86/platform/uv/uv_time.c +--- linux-4.9.22.orig/arch/x86/platform/uv/uv_time.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/arch/x86/platform/uv/uv_time.c 2017-04-18 17:19:16.634771367 +0200 @@ -57,7 +57,7 @@ /* There is one of these allocated per node */ @@ -2625,9 +2644,9 @@ diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/uv_time.c linux-4.9.6/arch/x86/p } /* -diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c ---- linux-4.9.6.orig/block/blk-core.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/blk-core.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/blk-core.c linux-4.9.22/block/blk-core.c +--- linux-4.9.22.orig/block/blk-core.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/blk-core.c 2017-04-18 17:19:16.634771367 +0200 @@ -125,6 +125,9 @@ INIT_LIST_HEAD(&rq->queuelist); @@ -2674,7 +2693,7 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c /* * Init percpu_ref in atomic mode so that it's faster to shutdown. -@@ -3177,7 +3180,7 @@ +@@ -3200,7 +3203,7 @@ blk_run_queue_async(q); else __blk_run_queue(q); @@ -2683,7 +2702,7 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c } static void flush_plug_callbacks(struct blk_plug *plug, bool from_schedule) -@@ -3225,7 +3228,6 @@ +@@ -3248,7 +3251,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) { struct request_queue *q; @@ -2691,7 +2710,7 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c struct request *rq; LIST_HEAD(list); unsigned int depth; -@@ -3245,11 +3247,6 @@ +@@ -3268,11 +3270,6 @@ q = NULL; depth = 0; @@ -2703,7 +2722,7 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c while (!list_empty(&list)) { rq = list_entry_rq(list.next); list_del_init(&rq->queuelist); -@@ -3262,7 +3259,7 @@ +@@ -3285,7 +3282,7 @@ queue_unplugged(q, depth, from_schedule); q = rq->q; depth = 0; @@ -2712,7 +2731,7 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c } /* -@@ -3289,8 +3286,6 @@ +@@ -3312,8 +3309,6 @@ */ if (q) queue_unplugged(q, depth, from_schedule); @@ -2721,9 +2740,9 @@ diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c } void blk_finish_plug(struct blk_plug *plug) -diff -Nur linux-4.9.6.orig/block/blk-ioc.c linux-4.9.6/block/blk-ioc.c ---- linux-4.9.6.orig/block/blk-ioc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/blk-ioc.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/blk-ioc.c linux-4.9.22/block/blk-ioc.c +--- linux-4.9.22.orig/block/blk-ioc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/blk-ioc.c 2017-04-18 17:19:16.634771367 +0200 @@ -7,6 +7,7 @@ #include <linux/bio.h> #include <linux/blkdev.h> @@ -2750,9 +2769,9 @@ diff -Nur linux-4.9.6.orig/block/blk-ioc.c linux-4.9.6/block/blk-ioc.c goto retry; } } -diff -Nur linux-4.9.6.orig/block/blk-mq.c linux-4.9.6/block/blk-mq.c ---- linux-4.9.6.orig/block/blk-mq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/blk-mq.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/blk-mq.c linux-4.9.22/block/blk-mq.c +--- linux-4.9.22.orig/block/blk-mq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/blk-mq.c 2017-04-18 17:19:16.634771367 +0200 @@ -72,7 +72,7 @@ static void blk_mq_freeze_queue_wait(struct request_queue *q) @@ -2843,7 +2862,7 @@ diff -Nur linux-4.9.6.orig/block/blk-mq.c linux-4.9.6/block/blk-mq.c } static void __blk_mq_complete_request(struct request *rq) -@@ -915,14 +935,14 @@ +@@ -906,14 +926,14 @@ return; if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) { @@ -2861,9 +2880,9 @@ diff -Nur linux-4.9.6.orig/block/blk-mq.c linux-4.9.6/block/blk-mq.c } kblockd_schedule_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work); -diff -Nur linux-4.9.6.orig/block/blk-mq.h linux-4.9.6/block/blk-mq.h ---- linux-4.9.6.orig/block/blk-mq.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/blk-mq.h 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/blk-mq.h linux-4.9.22/block/blk-mq.h +--- linux-4.9.22.orig/block/blk-mq.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/blk-mq.h 2017-04-18 17:19:16.634771367 +0200 @@ -72,12 +72,12 @@ */ static inline struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q) @@ -2879,9 +2898,9 @@ diff -Nur linux-4.9.6.orig/block/blk-mq.h linux-4.9.6/block/blk-mq.h } struct blk_mq_alloc_data { -diff -Nur linux-4.9.6.orig/block/blk-softirq.c linux-4.9.6/block/blk-softirq.c ---- linux-4.9.6.orig/block/blk-softirq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/blk-softirq.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/blk-softirq.c linux-4.9.22/block/blk-softirq.c +--- linux-4.9.22.orig/block/blk-softirq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/blk-softirq.c 2017-04-18 17:19:16.634771367 +0200 @@ -51,6 +51,7 @@ raise_softirq_irqoff(BLOCK_SOFTIRQ); @@ -2906,9 +2925,9 @@ diff -Nur linux-4.9.6.orig/block/blk-softirq.c linux-4.9.6/block/blk-softirq.c } /** -diff -Nur linux-4.9.6.orig/block/bounce.c linux-4.9.6/block/bounce.c ---- linux-4.9.6.orig/block/bounce.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/block/bounce.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/block/bounce.c linux-4.9.22/block/bounce.c +--- linux-4.9.22.orig/block/bounce.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/block/bounce.c 2017-04-18 17:19:16.634771367 +0200 @@ -55,11 +55,11 @@ unsigned long flags; unsigned char *vto; @@ -2923,10 +2942,10 @@ diff -Nur linux-4.9.6.orig/block/bounce.c linux-4.9.6/block/bounce.c } #else /* CONFIG_HIGHMEM */ -diff -Nur linux-4.9.6.orig/crypto/algapi.c linux-4.9.6/crypto/algapi.c ---- linux-4.9.6.orig/crypto/algapi.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/crypto/algapi.c 2017-01-28 13:59:09.903655111 +0100 -@@ -718,13 +718,13 @@ +diff -Nur linux-4.9.22.orig/crypto/algapi.c linux-4.9.22/crypto/algapi.c +--- linux-4.9.22.orig/crypto/algapi.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/crypto/algapi.c 2017-04-18 17:19:16.634771367 +0200 +@@ -719,13 +719,13 @@ int crypto_register_notifier(struct notifier_block *nb) { @@ -2942,9 +2961,9 @@ diff -Nur linux-4.9.6.orig/crypto/algapi.c linux-4.9.6/crypto/algapi.c } EXPORT_SYMBOL_GPL(crypto_unregister_notifier); -diff -Nur linux-4.9.6.orig/crypto/api.c linux-4.9.6/crypto/api.c ---- linux-4.9.6.orig/crypto/api.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/crypto/api.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/crypto/api.c linux-4.9.22/crypto/api.c +--- linux-4.9.22.orig/crypto/api.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/crypto/api.c 2017-04-18 17:19:16.634771367 +0200 @@ -31,7 +31,7 @@ DECLARE_RWSEM(crypto_alg_sem); EXPORT_SYMBOL_GPL(crypto_alg_sem); @@ -2967,9 +2986,9 @@ diff -Nur linux-4.9.6.orig/crypto/api.c linux-4.9.6/crypto/api.c } return ok; -diff -Nur linux-4.9.6.orig/crypto/internal.h linux-4.9.6/crypto/internal.h ---- linux-4.9.6.orig/crypto/internal.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/crypto/internal.h 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/crypto/internal.h linux-4.9.22/crypto/internal.h +--- linux-4.9.22.orig/crypto/internal.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/crypto/internal.h 2017-04-18 17:19:16.634771367 +0200 @@ -47,7 +47,7 @@ extern struct list_head crypto_alg_list; @@ -2988,9 +3007,9 @@ diff -Nur linux-4.9.6.orig/crypto/internal.h linux-4.9.6/crypto/internal.h } #endif /* _CRYPTO_INTERNAL_H */ -diff -Nur linux-4.9.6.orig/Documentation/sysrq.txt linux-4.9.6/Documentation/sysrq.txt ---- linux-4.9.6.orig/Documentation/sysrq.txt 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/Documentation/sysrq.txt 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/Documentation/sysrq.txt linux-4.9.22/Documentation/sysrq.txt +--- linux-4.9.22.orig/Documentation/sysrq.txt 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/Documentation/sysrq.txt 2017-04-18 17:19:16.618770722 +0200 @@ -59,10 +59,17 @@ On other - If you know of the key combos for other architectures, please let me know so I can add them to this section. @@ -3011,9 +3030,9 @@ diff -Nur linux-4.9.6.orig/Documentation/sysrq.txt linux-4.9.6/Documentation/sys * What are the 'command' keys? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'b' - Will immediately reboot the system without syncing or unmounting -diff -Nur linux-4.9.6.orig/Documentation/trace/histograms.txt linux-4.9.6/Documentation/trace/histograms.txt ---- linux-4.9.6.orig/Documentation/trace/histograms.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/Documentation/trace/histograms.txt 2017-01-28 13:59:09.887654498 +0100 +diff -Nur linux-4.9.22.orig/Documentation/trace/histograms.txt linux-4.9.22/Documentation/trace/histograms.txt +--- linux-4.9.22.orig/Documentation/trace/histograms.txt 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/Documentation/trace/histograms.txt 2017-04-18 17:19:16.618770722 +0200 @@ -0,0 +1,186 @@ + Using the Linux Kernel Latency Histograms + @@ -3201,9 +3220,9 @@ diff -Nur linux-4.9.6.orig/Documentation/trace/histograms.txt linux-4.9.6/Docume +is provided. + +These data are also reset when the wakeup histogram is reset. -diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/acglobal.h linux-4.9.6/drivers/acpi/acpica/acglobal.h ---- linux-4.9.6.orig/drivers/acpi/acpica/acglobal.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/acpi/acpica/acglobal.h 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/drivers/acpi/acpica/acglobal.h linux-4.9.22/drivers/acpi/acpica/acglobal.h +--- linux-4.9.22.orig/drivers/acpi/acpica/acglobal.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/acpi/acpica/acglobal.h 2017-04-18 17:19:16.634771367 +0200 @@ -116,7 +116,7 @@ * interrupt level */ @@ -3213,9 +3232,9 @@ diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/acglobal.h linux-4.9.6/drivers/ac ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock); /* Mutex for _OSI support */ -diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwregs.c linux-4.9.6/drivers/acpi/acpica/hwregs.c ---- linux-4.9.6.orig/drivers/acpi/acpica/hwregs.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/acpi/acpica/hwregs.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/drivers/acpi/acpica/hwregs.c linux-4.9.22/drivers/acpi/acpica/hwregs.c +--- linux-4.9.22.orig/drivers/acpi/acpica/hwregs.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/acpi/acpica/hwregs.c 2017-04-18 17:19:16.634771367 +0200 @@ -363,14 +363,14 @@ ACPI_BITMASK_ALL_FIXED_STATUS, ACPI_FORMAT_UINT64(acpi_gbl_xpm1a_status.address))); @@ -3233,9 +3252,9 @@ diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwregs.c linux-4.9.6/drivers/acpi if (ACPI_FAILURE(status)) { goto exit; -diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwxface.c linux-4.9.6/drivers/acpi/acpica/hwxface.c ---- linux-4.9.6.orig/drivers/acpi/acpica/hwxface.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/acpi/acpica/hwxface.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/drivers/acpi/acpica/hwxface.c linux-4.9.22/drivers/acpi/acpica/hwxface.c +--- linux-4.9.22.orig/drivers/acpi/acpica/hwxface.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/acpi/acpica/hwxface.c 2017-04-18 17:19:16.634771367 +0200 @@ -373,7 +373,7 @@ return_ACPI_STATUS(AE_BAD_PARAMETER); } @@ -3254,9 +3273,9 @@ diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwxface.c linux-4.9.6/drivers/acp return_ACPI_STATUS(status); } -diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/utmutex.c linux-4.9.6/drivers/acpi/acpica/utmutex.c ---- linux-4.9.6.orig/drivers/acpi/acpica/utmutex.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/acpi/acpica/utmutex.c 2017-01-28 13:59:09.903655111 +0100 +diff -Nur linux-4.9.22.orig/drivers/acpi/acpica/utmutex.c linux-4.9.22/drivers/acpi/acpica/utmutex.c +--- linux-4.9.22.orig/drivers/acpi/acpica/utmutex.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/acpi/acpica/utmutex.c 2017-04-18 17:19:16.634771367 +0200 @@ -88,7 +88,7 @@ return_ACPI_STATUS (status); } @@ -3275,9 +3294,9 @@ diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/utmutex.c linux-4.9.6/drivers/acp acpi_os_delete_lock(acpi_gbl_reference_count_lock); /* Delete the reader/writer lock */ -diff -Nur linux-4.9.6.orig/drivers/ata/libata-sff.c linux-4.9.6/drivers/ata/libata-sff.c ---- linux-4.9.6.orig/drivers/ata/libata-sff.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ata/libata-sff.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/ata/libata-sff.c linux-4.9.22/drivers/ata/libata-sff.c +--- linux-4.9.22.orig/drivers/ata/libata-sff.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ata/libata-sff.c 2017-04-18 17:19:16.634771367 +0200 @@ -678,9 +678,9 @@ unsigned long flags; unsigned int consumed; @@ -3326,9 +3345,9 @@ diff -Nur linux-4.9.6.orig/drivers/ata/libata-sff.c linux-4.9.6/drivers/ata/liba } else { buf = page_address(page); consumed = ap->ops->sff_data_xfer(dev, buf + offset, -diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.c linux-4.9.6/drivers/block/zram/zcomp.c ---- linux-4.9.6.orig/drivers/block/zram/zcomp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/block/zram/zcomp.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/block/zram/zcomp.c linux-4.9.22/drivers/block/zram/zcomp.c +--- linux-4.9.22.orig/drivers/block/zram/zcomp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/block/zram/zcomp.c 2017-04-18 17:19:16.634771367 +0200 @@ -118,12 +118,19 @@ struct zcomp_strm *zcomp_stream_get(struct zcomp *comp) @@ -3359,9 +3378,9 @@ diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.c linux-4.9.6/drivers/block/ *per_cpu_ptr(comp->stream, cpu) = zstrm; break; case CPU_DEAD: -diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.h linux-4.9.6/drivers/block/zram/zcomp.h ---- linux-4.9.6.orig/drivers/block/zram/zcomp.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/block/zram/zcomp.h 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/block/zram/zcomp.h linux-4.9.22/drivers/block/zram/zcomp.h +--- linux-4.9.22.orig/drivers/block/zram/zcomp.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/block/zram/zcomp.h 2017-04-18 17:19:16.634771367 +0200 @@ -14,6 +14,7 @@ /* compression/decompression buffer */ void *buffer; @@ -3370,9 +3389,9 @@ diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.h linux-4.9.6/drivers/block/ }; /* dynamic per-device compression frontend */ -diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.c linux-4.9.6/drivers/block/zram/zram_drv.c ---- linux-4.9.6.orig/drivers/block/zram/zram_drv.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/block/zram/zram_drv.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/block/zram/zram_drv.c linux-4.9.22/drivers/block/zram/zram_drv.c +--- linux-4.9.22.orig/drivers/block/zram/zram_drv.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/block/zram/zram_drv.c 2017-04-18 17:19:16.638771524 +0200 @@ -528,6 +528,8 @@ goto out_error; } @@ -3487,9 +3506,9 @@ diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.c linux-4.9.6/drivers/blo atomic64_inc(&zram->stats.notify_free); } -diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.h linux-4.9.6/drivers/block/zram/zram_drv.h ---- linux-4.9.6.orig/drivers/block/zram/zram_drv.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/block/zram/zram_drv.h 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/block/zram/zram_drv.h linux-4.9.22/drivers/block/zram/zram_drv.h +--- linux-4.9.22.orig/drivers/block/zram/zram_drv.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/block/zram/zram_drv.h 2017-04-18 17:19:16.638771524 +0200 @@ -73,6 +73,9 @@ struct zram_table_entry { unsigned long handle; @@ -3543,9 +3562,9 @@ diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.h linux-4.9.6/drivers/blo +#endif /* CONFIG_PREEMPT_RT_BASE */ + #endif -diff -Nur linux-4.9.6.orig/drivers/char/random.c linux-4.9.6/drivers/char/random.c ---- linux-4.9.6.orig/drivers/char/random.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/char/random.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/char/random.c linux-4.9.22/drivers/char/random.c +--- linux-4.9.22.orig/drivers/char/random.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/char/random.c 2017-04-18 17:19:16.638771524 +0200 @@ -1028,8 +1028,6 @@ } sample; long delta, delta2, delta3; @@ -3597,9 +3616,9 @@ diff -Nur linux-4.9.6.orig/drivers/char/random.c linux-4.9.6/drivers/char/random fast_mix(fast_pool); add_interrupt_bench(cycles); -diff -Nur linux-4.9.6.orig/drivers/clocksource/tcb_clksrc.c linux-4.9.6/drivers/clocksource/tcb_clksrc.c ---- linux-4.9.6.orig/drivers/clocksource/tcb_clksrc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/clocksource/tcb_clksrc.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/clocksource/tcb_clksrc.c linux-4.9.22/drivers/clocksource/tcb_clksrc.c +--- linux-4.9.22.orig/drivers/clocksource/tcb_clksrc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/clocksource/tcb_clksrc.c 2017-04-18 17:19:16.638771524 +0200 @@ -23,8 +23,7 @@ * this 32 bit free-running counter. the second channel is not used. * @@ -3757,9 +3776,9 @@ diff -Nur linux-4.9.6.orig/drivers/clocksource/tcb_clksrc.c linux-4.9.6/drivers/ if (ret) goto err_unregister_clksrc; -diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-pit.c linux-4.9.6/drivers/clocksource/timer-atmel-pit.c ---- linux-4.9.6.orig/drivers/clocksource/timer-atmel-pit.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/clocksource/timer-atmel-pit.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/clocksource/timer-atmel-pit.c linux-4.9.22/drivers/clocksource/timer-atmel-pit.c +--- linux-4.9.22.orig/drivers/clocksource/timer-atmel-pit.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/clocksource/timer-atmel-pit.c 2017-04-18 17:19:16.638771524 +0200 @@ -46,6 +46,7 @@ u32 cycle; u32 cnt; @@ -3814,9 +3833,9 @@ diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-pit.c linux-4.9.6/dri /* Set up and register clockevents */ data->clkevt.name = "pit"; data->clkevt.features = CLOCK_EVT_FEAT_PERIODIC; -diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-st.c linux-4.9.6/drivers/clocksource/timer-atmel-st.c ---- linux-4.9.6.orig/drivers/clocksource/timer-atmel-st.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/clocksource/timer-atmel-st.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/clocksource/timer-atmel-st.c linux-4.9.22/drivers/clocksource/timer-atmel-st.c +--- linux-4.9.22.orig/drivers/clocksource/timer-atmel-st.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/clocksource/timer-atmel-st.c 2017-04-18 17:19:16.638771524 +0200 @@ -115,18 +115,29 @@ last_crtr = read_CRTR(); } @@ -3897,9 +3916,9 @@ diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-st.c linux-4.9.6/driv sclk = of_clk_get(node, 0); if (IS_ERR(sclk)) { pr_err("Unable to get slow clock\n"); -diff -Nur linux-4.9.6.orig/drivers/connector/cn_proc.c linux-4.9.6/drivers/connector/cn_proc.c ---- linux-4.9.6.orig/drivers/connector/cn_proc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/connector/cn_proc.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/connector/cn_proc.c linux-4.9.22/drivers/connector/cn_proc.c +--- linux-4.9.22.orig/drivers/connector/cn_proc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/connector/cn_proc.c 2017-04-18 17:19:16.638771524 +0200 @@ -32,6 +32,7 @@ #include <linux/pid_namespace.h> @@ -3930,9 +3949,9 @@ diff -Nur linux-4.9.6.orig/drivers/connector/cn_proc.c linux-4.9.6/drivers/conne } void proc_fork_connector(struct task_struct *task) -diff -Nur linux-4.9.6.orig/drivers/cpufreq/Kconfig.x86 linux-4.9.6/drivers/cpufreq/Kconfig.x86 ---- linux-4.9.6.orig/drivers/cpufreq/Kconfig.x86 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/cpufreq/Kconfig.x86 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/cpufreq/Kconfig.x86 linux-4.9.22/drivers/cpufreq/Kconfig.x86 +--- linux-4.9.22.orig/drivers/cpufreq/Kconfig.x86 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/cpufreq/Kconfig.x86 2017-04-18 17:19:16.638771524 +0200 @@ -124,7 +124,7 @@ config X86_POWERNOW_K8 @@ -3942,9 +3961,9 @@ diff -Nur linux-4.9.6.orig/drivers/cpufreq/Kconfig.x86 linux-4.9.6/drivers/cpufr help This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors. Support for K10 and newer processors is now in acpi-cpufreq. -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.9.6/drivers/gpu/drm/i915/i915_gem_execbuffer.c ---- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.9.22/drivers/gpu/drm/i915/i915_gem_execbuffer.c +--- linux-4.9.22.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-04-18 17:19:16.638771524 +0200 @@ -1537,7 +1537,9 @@ if (ret) return ret; @@ -3955,9 +3974,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.9. i915_gem_execbuffer_move_to_active(vmas, params->request); -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.9.6/drivers/gpu/drm/i915/i915_gem_shrinker.c ---- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.9.22/drivers/gpu/drm/i915/i915_gem_shrinker.c +--- linux-4.9.22.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-04-18 17:19:16.638771524 +0200 @@ -40,7 +40,7 @@ if (!mutex_is_locked(mutex)) return false; @@ -3967,9 +3986,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.9.6/ return mutex->owner == task; #else /* Since UP may be pre-empted, we cannot assume that we own the lock */ -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.9.6/drivers/gpu/drm/i915/i915_irq.c ---- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_irq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/i915/i915_irq.c 2017-01-28 13:59:09.907655265 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.9.22/drivers/gpu/drm/i915/i915_irq.c +--- linux-4.9.22.orig/drivers/gpu/drm/i915/i915_irq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/i915/i915_irq.c 2017-04-18 17:19:16.638771524 +0200 @@ -812,6 +812,7 @@ spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); @@ -3986,10 +4005,10 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.9.6/drivers/g spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_display.c linux-4.9.6/drivers/gpu/drm/i915/intel_display.c ---- linux-4.9.6.orig/drivers/gpu/drm/i915/intel_display.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/i915/intel_display.c 2017-01-28 13:59:09.911655420 +0100 -@@ -12131,7 +12131,7 @@ +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/i915/intel_display.c linux-4.9.22/drivers/gpu/drm/i915/intel_display.c +--- linux-4.9.22.orig/drivers/gpu/drm/i915/intel_display.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/i915/intel_display.c 2017-04-18 17:19:16.642771680 +0200 +@@ -12141,7 +12141,7 @@ struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_flip_work *work; @@ -3998,9 +4017,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_display.c linux-4.9.6/driv if (crtc == NULL) return; -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.9.6/drivers/gpu/drm/i915/intel_sprite.c ---- linux-4.9.6.orig/drivers/gpu/drm/i915/intel_sprite.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/i915/intel_sprite.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.9.22/drivers/gpu/drm/i915/intel_sprite.c +--- linux-4.9.22.orig/drivers/gpu/drm/i915/intel_sprite.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/i915/intel_sprite.c 2017-04-18 17:19:16.642771680 +0200 @@ -35,6 +35,7 @@ #include <drm/drm_rect.h> #include <drm/drm_atomic.h> @@ -4050,9 +4069,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.9.6/drive if (crtc->debug.start_vbl_count && crtc->debug.start_vbl_count != end_vbl_count) { -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.9.6/drivers/gpu/drm/msm/msm_gem_shrinker.c ---- linux-4.9.6.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.9.22/drivers/gpu/drm/msm/msm_gem_shrinker.c +--- linux-4.9.22.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-04-18 17:19:16.642771680 +0200 @@ -23,7 +23,7 @@ if (!mutex_is_locked(mutex)) return false; @@ -4062,9 +4081,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.9.6/dr return mutex->owner == task; #else /* Since UP may be pre-empted, we cannot assume that we own the lock */ -diff -Nur linux-4.9.6.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.9.6/drivers/gpu/drm/radeon/radeon_display.c ---- linux-4.9.6.orig/drivers/gpu/drm/radeon/radeon_display.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/gpu/drm/radeon/radeon_display.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.9.22/drivers/gpu/drm/radeon/radeon_display.c +--- linux-4.9.22.orig/drivers/gpu/drm/radeon/radeon_display.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/gpu/drm/radeon/radeon_display.c 2017-04-18 17:19:16.642771680 +0200 @@ -1845,6 +1845,7 @@ struct radeon_device *rdev = dev->dev_private; @@ -4081,9 +4100,9 @@ diff -Nur linux-4.9.6.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.9.6/d /* Decode into vertical and horizontal scanout position. */ *vpos = position & 0x1fff; -diff -Nur linux-4.9.6.orig/drivers/hv/vmbus_drv.c linux-4.9.6/drivers/hv/vmbus_drv.c ---- linux-4.9.6.orig/drivers/hv/vmbus_drv.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/hv/vmbus_drv.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/hv/vmbus_drv.c linux-4.9.22/drivers/hv/vmbus_drv.c +--- linux-4.9.22.orig/drivers/hv/vmbus_drv.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/hv/vmbus_drv.c 2017-04-18 17:19:16.642771680 +0200 @@ -761,6 +761,8 @@ void *page_addr; struct hv_message *msg; @@ -4102,9 +4121,9 @@ diff -Nur linux-4.9.6.orig/drivers/hv/vmbus_drv.c linux-4.9.6/drivers/hv/vmbus_d } -diff -Nur linux-4.9.6.orig/drivers/ide/alim15x3.c linux-4.9.6/drivers/ide/alim15x3.c ---- linux-4.9.6.orig/drivers/ide/alim15x3.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/alim15x3.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/alim15x3.c linux-4.9.22/drivers/ide/alim15x3.c +--- linux-4.9.22.orig/drivers/ide/alim15x3.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/alim15x3.c 2017-04-18 17:19:16.642771680 +0200 @@ -234,7 +234,7 @@ isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); @@ -4123,9 +4142,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/alim15x3.c linux-4.9.6/drivers/ide/alim15 return 0; } -diff -Nur linux-4.9.6.orig/drivers/ide/hpt366.c linux-4.9.6/drivers/ide/hpt366.c ---- linux-4.9.6.orig/drivers/ide/hpt366.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/hpt366.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/hpt366.c linux-4.9.22/drivers/ide/hpt366.c +--- linux-4.9.22.orig/drivers/ide/hpt366.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/hpt366.c 2017-04-18 17:19:16.642771680 +0200 @@ -1236,7 +1236,7 @@ dma_old = inb(base + 2); @@ -4144,9 +4163,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/hpt366.c linux-4.9.6/drivers/ide/hpt366.c printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name, base, base + 7); -diff -Nur linux-4.9.6.orig/drivers/ide/ide-io.c linux-4.9.6/drivers/ide/ide-io.c ---- linux-4.9.6.orig/drivers/ide/ide-io.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/ide-io.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/ide-io.c linux-4.9.22/drivers/ide/ide-io.c +--- linux-4.9.22.orig/drivers/ide/ide-io.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/ide-io.c 2017-04-18 17:19:16.642771680 +0200 @@ -659,7 +659,7 @@ /* disable_irq_nosync ?? */ disable_irq(hwif->irq); @@ -4156,9 +4175,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/ide-io.c linux-4.9.6/drivers/ide/ide-io.c if (hwif->polling) { startstop = handler(drive); } else if (drive_is_ready(drive)) { -diff -Nur linux-4.9.6.orig/drivers/ide/ide-iops.c linux-4.9.6/drivers/ide/ide-iops.c ---- linux-4.9.6.orig/drivers/ide/ide-iops.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/ide-iops.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/ide-iops.c linux-4.9.22/drivers/ide/ide-iops.c +--- linux-4.9.22.orig/drivers/ide/ide-iops.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/ide-iops.c 2017-04-18 17:19:16.642771680 +0200 @@ -129,12 +129,12 @@ if ((stat & ATA_BUSY) == 0) break; @@ -4174,9 +4193,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/ide-iops.c linux-4.9.6/drivers/ide/ide-io } /* * Allow status to settle, then read it again. -diff -Nur linux-4.9.6.orig/drivers/ide/ide-io-std.c linux-4.9.6/drivers/ide/ide-io-std.c ---- linux-4.9.6.orig/drivers/ide/ide-io-std.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/ide-io-std.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/ide-io-std.c linux-4.9.22/drivers/ide/ide-io-std.c +--- linux-4.9.22.orig/drivers/ide/ide-io-std.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/ide-io-std.c 2017-04-18 17:19:16.642771680 +0200 @@ -175,7 +175,7 @@ unsigned long uninitialized_var(flags); @@ -4213,9 +4232,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/ide-io-std.c linux-4.9.6/drivers/ide/ide- if (((len + 1) & 3) < 2) return; -diff -Nur linux-4.9.6.orig/drivers/ide/ide-probe.c linux-4.9.6/drivers/ide/ide-probe.c ---- linux-4.9.6.orig/drivers/ide/ide-probe.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/ide-probe.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/ide-probe.c linux-4.9.22/drivers/ide/ide-probe.c +--- linux-4.9.22.orig/drivers/ide/ide-probe.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/ide-probe.c 2017-04-18 17:19:16.642771680 +0200 @@ -196,10 +196,10 @@ int bswap = 1; @@ -4229,9 +4248,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/ide-probe.c linux-4.9.6/drivers/ide/ide-p drive->dev_flags |= IDE_DFLAG_ID_READ; #ifdef DEBUG -diff -Nur linux-4.9.6.orig/drivers/ide/ide-taskfile.c linux-4.9.6/drivers/ide/ide-taskfile.c ---- linux-4.9.6.orig/drivers/ide/ide-taskfile.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/ide/ide-taskfile.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/ide/ide-taskfile.c linux-4.9.22/drivers/ide/ide-taskfile.c +--- linux-4.9.22.orig/drivers/ide/ide-taskfile.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/ide/ide-taskfile.c 2017-04-18 17:19:16.642771680 +0200 @@ -250,7 +250,7 @@ page_is_high = PageHighMem(page); @@ -4259,9 +4278,9 @@ diff -Nur linux-4.9.6.orig/drivers/ide/ide-taskfile.c linux-4.9.6/drivers/ide/id ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE); -diff -Nur linux-4.9.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux-4.9.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ---- linux-4.9.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-01-28 13:59:09.911655420 +0100 +diff -Nur linux-4.9.22.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux-4.9.22/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +--- linux-4.9.22.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-04-18 17:19:16.642771680 +0200 @@ -902,7 +902,7 @@ ipoib_dbg_mcast(priv, "restarting multicast task\n"); @@ -4280,9 +4299,9 @@ diff -Nur linux-4.9.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux- /* * make sure the in-flight joins have finished before we attempt -diff -Nur linux-4.9.6.orig/drivers/input/gameport/gameport.c linux-4.9.6/drivers/input/gameport/gameport.c ---- linux-4.9.6.orig/drivers/input/gameport/gameport.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/input/gameport/gameport.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/input/gameport/gameport.c linux-4.9.22/drivers/input/gameport/gameport.c +--- linux-4.9.22.orig/drivers/input/gameport/gameport.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/input/gameport/gameport.c 2017-04-18 17:19:16.642771680 +0200 @@ -91,13 +91,13 @@ tx = ~0; @@ -4328,9 +4347,9 @@ diff -Nur linux-4.9.6.orig/drivers/input/gameport/gameport.c linux-4.9.6/drivers udelay(i * 10); if (t2 - t1 < tx) tx = t2 - t1; } -diff -Nur linux-4.9.6.orig/drivers/iommu/amd_iommu.c linux-4.9.6/drivers/iommu/amd_iommu.c ---- linux-4.9.6.orig/drivers/iommu/amd_iommu.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/iommu/amd_iommu.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/iommu/amd_iommu.c linux-4.9.22/drivers/iommu/amd_iommu.c +--- linux-4.9.22.orig/drivers/iommu/amd_iommu.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/iommu/amd_iommu.c 2017-04-18 17:19:16.646771835 +0200 @@ -1923,10 +1923,10 @@ int ret; @@ -4359,9 +4378,9 @@ diff -Nur linux-4.9.6.orig/drivers/iommu/amd_iommu.c linux-4.9.6/drivers/iommu/a if (WARN_ON(!dev_data->domain)) return; -diff -Nur linux-4.9.6.orig/drivers/iommu/intel-iommu.c linux-4.9.6/drivers/iommu/intel-iommu.c ---- linux-4.9.6.orig/drivers/iommu/intel-iommu.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/iommu/intel-iommu.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/iommu/intel-iommu.c linux-4.9.22/drivers/iommu/intel-iommu.c +--- linux-4.9.22.orig/drivers/iommu/intel-iommu.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/iommu/intel-iommu.c 2017-04-18 17:19:16.646771835 +0200 @@ -479,7 +479,7 @@ struct deferred_flush_table *tables; }; @@ -4371,7 +4390,7 @@ diff -Nur linux-4.9.6.orig/drivers/iommu/intel-iommu.c linux-4.9.6/drivers/iommu /* bitmap for indexing intel_iommus */ static int g_num_of_iommus; -@@ -3715,10 +3715,8 @@ +@@ -3716,10 +3716,8 @@ struct intel_iommu *iommu; struct deferred_flush_entry *entry; struct deferred_flush_data *flush_data; @@ -4383,7 +4402,7 @@ diff -Nur linux-4.9.6.orig/drivers/iommu/intel-iommu.c linux-4.9.6/drivers/iommu /* Flush all CPUs' entries to avoid deferring too much. If * this becomes a bottleneck, can just flush us, and rely on -@@ -3751,8 +3749,6 @@ +@@ -3752,8 +3750,6 @@ } flush_data->size++; spin_unlock_irqrestore(&flush_data->lock, flags); @@ -4392,9 +4411,9 @@ diff -Nur linux-4.9.6.orig/drivers/iommu/intel-iommu.c linux-4.9.6/drivers/iommu } static void intel_unmap(struct device *dev, dma_addr_t dev_addr, size_t size) -diff -Nur linux-4.9.6.orig/drivers/iommu/iova.c linux-4.9.6/drivers/iommu/iova.c ---- linux-4.9.6.orig/drivers/iommu/iova.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/iommu/iova.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/iommu/iova.c linux-4.9.22/drivers/iommu/iova.c +--- linux-4.9.22.orig/drivers/iommu/iova.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/iommu/iova.c 2017-04-18 17:19:16.646771835 +0200 @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/smp.h> @@ -4448,9 +4467,9 @@ diff -Nur linux-4.9.6.orig/drivers/iommu/iova.c linux-4.9.6/drivers/iommu/iova.c return iova_pfn; } -diff -Nur linux-4.9.6.orig/drivers/leds/trigger/Kconfig linux-4.9.6/drivers/leds/trigger/Kconfig ---- linux-4.9.6.orig/drivers/leds/trigger/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/leds/trigger/Kconfig 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/leds/trigger/Kconfig linux-4.9.22/drivers/leds/trigger/Kconfig +--- linux-4.9.22.orig/drivers/leds/trigger/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/leds/trigger/Kconfig 2017-04-18 17:19:16.646771835 +0200 @@ -69,7 +69,7 @@ config LEDS_TRIGGER_CPU @@ -4460,9 +4479,9 @@ diff -Nur linux-4.9.6.orig/drivers/leds/trigger/Kconfig linux-4.9.6/drivers/leds help This allows LEDs to be controlled by active CPUs. This shows the active CPUs across an array of LEDs so you can see which -diff -Nur linux-4.9.6.orig/drivers/md/bcache/Kconfig linux-4.9.6/drivers/md/bcache/Kconfig ---- linux-4.9.6.orig/drivers/md/bcache/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/md/bcache/Kconfig 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/md/bcache/Kconfig linux-4.9.22/drivers/md/bcache/Kconfig +--- linux-4.9.22.orig/drivers/md/bcache/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/md/bcache/Kconfig 2017-04-18 17:19:16.646771835 +0200 @@ -1,6 +1,7 @@ config BCACHE @@ -4471,10 +4490,10 @@ diff -Nur linux-4.9.6.orig/drivers/md/bcache/Kconfig linux-4.9.6/drivers/md/bcac ---help--- Allows a block device to be used as cache for other devices; uses a btree for indexing and the layout is optimized for SSDs. -diff -Nur linux-4.9.6.orig/drivers/md/dm-rq.c linux-4.9.6/drivers/md/dm-rq.c ---- linux-4.9.6.orig/drivers/md/dm-rq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/md/dm-rq.c 2017-01-28 13:59:09.915655573 +0100 -@@ -838,7 +838,7 @@ +diff -Nur linux-4.9.22.orig/drivers/md/dm-rq.c linux-4.9.22/drivers/md/dm-rq.c +--- linux-4.9.22.orig/drivers/md/dm-rq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/md/dm-rq.c 2017-04-18 17:19:16.646771835 +0200 +@@ -842,7 +842,7 @@ /* Establish tio->ti before queuing work (map_tio_request) */ tio->ti = ti; kthread_queue_work(&md->kworker, &tio->work); @@ -4483,9 +4502,9 @@ diff -Nur linux-4.9.6.orig/drivers/md/dm-rq.c linux-4.9.6/drivers/md/dm-rq.c } } -diff -Nur linux-4.9.6.orig/drivers/md/raid5.c linux-4.9.6/drivers/md/raid5.c ---- linux-4.9.6.orig/drivers/md/raid5.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/md/raid5.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/md/raid5.c linux-4.9.22/drivers/md/raid5.c +--- linux-4.9.22.orig/drivers/md/raid5.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/md/raid5.c 2017-04-18 17:19:16.646771835 +0200 @@ -1928,8 +1928,9 @@ struct raid5_percpu *percpu; unsigned long cpu; @@ -4523,9 +4542,9 @@ diff -Nur linux-4.9.6.orig/drivers/md/raid5.c linux-4.9.6/drivers/md/raid5.c err = cpuhp_state_add_instance(CPUHP_MD_RAID5_PREPARE, &conf->node); if (!err) { conf->scribble_disks = max(conf->raid_disks, -diff -Nur linux-4.9.6.orig/drivers/md/raid5.h linux-4.9.6/drivers/md/raid5.h ---- linux-4.9.6.orig/drivers/md/raid5.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/md/raid5.h 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/md/raid5.h linux-4.9.22/drivers/md/raid5.h +--- linux-4.9.22.orig/drivers/md/raid5.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/md/raid5.h 2017-04-18 17:19:16.646771835 +0200 @@ -504,6 +504,7 @@ int recovery_disabled; /* per cpu variables */ @@ -4534,9 +4553,9 @@ diff -Nur linux-4.9.6.orig/drivers/md/raid5.h linux-4.9.6/drivers/md/raid5.h struct page *spare_page; /* Used when checking P/Q in raid6 */ struct flex_array *scribble; /* space for constructing buffer * lists and performing address -diff -Nur linux-4.9.6.orig/drivers/misc/Kconfig linux-4.9.6/drivers/misc/Kconfig ---- linux-4.9.6.orig/drivers/misc/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/misc/Kconfig 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/misc/Kconfig linux-4.9.22/drivers/misc/Kconfig +--- linux-4.9.22.orig/drivers/misc/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/misc/Kconfig 2017-04-18 17:19:16.646771835 +0200 @@ -54,6 +54,7 @@ config ATMEL_TCLIB bool "Atmel AT32/AT91 Timer/Counter Library" @@ -4571,9 +4590,9 @@ diff -Nur linux-4.9.6.orig/drivers/misc/Kconfig linux-4.9.6/drivers/misc/Kconfig config DUMMY_IRQ tristate "Dummy IRQ handler" default n -diff -Nur linux-4.9.6.orig/drivers/mmc/host/mmci.c linux-4.9.6/drivers/mmc/host/mmci.c ---- linux-4.9.6.orig/drivers/mmc/host/mmci.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/mmc/host/mmci.c 2017-01-28 13:59:09.915655573 +0100 +diff -Nur linux-4.9.22.orig/drivers/mmc/host/mmci.c linux-4.9.22/drivers/mmc/host/mmci.c +--- linux-4.9.22.orig/drivers/mmc/host/mmci.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/mmc/host/mmci.c 2017-04-18 17:19:16.646771835 +0200 @@ -1147,15 +1147,12 @@ struct sg_mapping_iter *sg_miter = &host->sg_miter; struct variant_data *variant = host->variant; @@ -4599,9 +4618,9 @@ diff -Nur linux-4.9.6.orig/drivers/mmc/host/mmci.c linux-4.9.6/drivers/mmc/host/ /* * If we have less than the fifo 'half-full' threshold to transfer, * trigger a PIO interrupt as soon as any data is available. -diff -Nur linux-4.9.6.orig/drivers/net/ethernet/3com/3c59x.c linux-4.9.6/drivers/net/ethernet/3com/3c59x.c ---- linux-4.9.6.orig/drivers/net/ethernet/3com/3c59x.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/net/ethernet/3com/3c59x.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/net/ethernet/3com/3c59x.c linux-4.9.22/drivers/net/ethernet/3com/3c59x.c +--- linux-4.9.22.orig/drivers/net/ethernet/3com/3c59x.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/net/ethernet/3com/3c59x.c 2017-04-18 17:19:16.646771835 +0200 @@ -842,9 +842,9 @@ { struct vortex_private *vp = netdev_priv(dev); @@ -4629,9 +4648,9 @@ diff -Nur linux-4.9.6.orig/drivers/net/ethernet/3com/3c59x.c linux-4.9.6/drivers } } -diff -Nur linux-4.9.6.orig/drivers/net/ethernet/realtek/8139too.c linux-4.9.6/drivers/net/ethernet/realtek/8139too.c ---- linux-4.9.6.orig/drivers/net/ethernet/realtek/8139too.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/net/ethernet/realtek/8139too.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/net/ethernet/realtek/8139too.c linux-4.9.22/drivers/net/ethernet/realtek/8139too.c +--- linux-4.9.22.orig/drivers/net/ethernet/realtek/8139too.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/net/ethernet/realtek/8139too.c 2017-04-18 17:19:16.650771990 +0200 @@ -2233,7 +2233,7 @@ struct rtl8139_private *tp = netdev_priv(dev); const int irq = tp->pci_dev->irq; @@ -4641,9 +4660,9 @@ diff -Nur linux-4.9.6.orig/drivers/net/ethernet/realtek/8139too.c linux-4.9.6/dr rtl8139_interrupt(irq, dev); enable_irq(irq); } -diff -Nur linux-4.9.6.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c linux-4.9.6/drivers/net/wireless/intersil/orinoco/orinoco_usb.c ---- linux-4.9.6.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c linux-4.9.22/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +--- linux-4.9.22.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-04-18 17:19:16.650771990 +0200 @@ -697,7 +697,7 @@ while (!ctx->done.done && msecs--) udelay(1000); @@ -4653,9 +4672,9 @@ diff -Nur linux-4.9.6.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c l ctx->done.done); } break; -diff -Nur linux-4.9.6.orig/drivers/pci/access.c linux-4.9.6/drivers/pci/access.c ---- linux-4.9.6.orig/drivers/pci/access.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/pci/access.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/pci/access.c linux-4.9.22/drivers/pci/access.c +--- linux-4.9.22.orig/drivers/pci/access.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/pci/access.c 2017-04-18 17:19:16.650771990 +0200 @@ -672,7 +672,7 @@ WARN_ON(!dev->block_cfg_access); @@ -4665,9 +4684,217 @@ diff -Nur linux-4.9.6.orig/drivers/pci/access.c linux-4.9.6/drivers/pci/access.c raw_spin_unlock_irqrestore(&pci_lock, flags); } EXPORT_SYMBOL_GPL(pci_cfg_access_unlock); -diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe.c linux-4.9.6/drivers/scsi/fcoe/fcoe.c ---- linux-4.9.6.orig/drivers/scsi/fcoe/fcoe.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/fcoe/fcoe.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/pinctrl/qcom/pinctrl-msm.c linux-4.9.22/drivers/pinctrl/qcom/pinctrl-msm.c +--- linux-4.9.22.orig/drivers/pinctrl/qcom/pinctrl-msm.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/pinctrl/qcom/pinctrl-msm.c 2017-04-18 17:19:16.650771990 +0200 +@@ -61,7 +61,7 @@ + struct notifier_block restart_nb; + int irq; + +- spinlock_t lock; ++ raw_spinlock_t lock; + + DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO); + DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO); +@@ -153,14 +153,14 @@ + if (WARN_ON(i == g->nfuncs)) + return -EINVAL; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->ctl_reg); + val &= ~mask; + val |= i << g->mux_bit; + writel(val, pctrl->regs + g->ctl_reg); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; + } +@@ -323,14 +323,14 @@ + break; + case PIN_CONFIG_OUTPUT: + /* set output value */ +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + val = readl(pctrl->regs + g->io_reg); + if (arg) + val |= BIT(g->out_bit); + else + val &= ~BIT(g->out_bit); + writel(val, pctrl->regs + g->io_reg); +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + /* enable output */ + arg = 1; +@@ -351,12 +351,12 @@ + return -EINVAL; + } + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + val = readl(pctrl->regs + g->ctl_reg); + val &= ~(mask << bit); + val |= arg << bit; + writel(val, pctrl->regs + g->ctl_reg); +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + } + + return 0; +@@ -384,13 +384,13 @@ + + g = &pctrl->soc->groups[offset]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->ctl_reg); + val &= ~BIT(g->oe_bit); + writel(val, pctrl->regs + g->ctl_reg); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; + } +@@ -404,7 +404,7 @@ + + g = &pctrl->soc->groups[offset]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->io_reg); + if (value) +@@ -417,7 +417,7 @@ + val |= BIT(g->oe_bit); + writel(val, pctrl->regs + g->ctl_reg); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; + } +@@ -443,7 +443,7 @@ + + g = &pctrl->soc->groups[offset]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->io_reg); + if (value) +@@ -452,7 +452,7 @@ + val &= ~BIT(g->out_bit); + writel(val, pctrl->regs + g->io_reg); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + } + + #ifdef CONFIG_DEBUG_FS +@@ -571,7 +571,7 @@ + + g = &pctrl->soc->groups[d->hwirq]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->intr_cfg_reg); + val &= ~BIT(g->intr_enable_bit); +@@ -579,7 +579,7 @@ + + clear_bit(d->hwirq, pctrl->enabled_irqs); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + } + + static void msm_gpio_irq_unmask(struct irq_data *d) +@@ -592,7 +592,7 @@ + + g = &pctrl->soc->groups[d->hwirq]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->intr_cfg_reg); + val |= BIT(g->intr_enable_bit); +@@ -600,7 +600,7 @@ + + set_bit(d->hwirq, pctrl->enabled_irqs); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + } + + static void msm_gpio_irq_ack(struct irq_data *d) +@@ -613,7 +613,7 @@ + + g = &pctrl->soc->groups[d->hwirq]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + val = readl(pctrl->regs + g->intr_status_reg); + if (g->intr_ack_high) +@@ -625,7 +625,7 @@ + if (test_bit(d->hwirq, pctrl->dual_edge_irqs)) + msm_gpio_update_dual_edge_pos(pctrl, g, d); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + } + + static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type) +@@ -638,7 +638,7 @@ + + g = &pctrl->soc->groups[d->hwirq]; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + /* + * For hw without possibility of detecting both edges +@@ -712,7 +712,7 @@ + if (test_bit(d->hwirq, pctrl->dual_edge_irqs)) + msm_gpio_update_dual_edge_pos(pctrl, g, d); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) + irq_set_handler_locked(d, handle_level_irq); +@@ -728,11 +728,11 @@ + struct msm_pinctrl *pctrl = gpiochip_get_data(gc); + unsigned long flags; + +- spin_lock_irqsave(&pctrl->lock, flags); ++ raw_spin_lock_irqsave(&pctrl->lock, flags); + + irq_set_irq_wake(pctrl->irq, on); + +- spin_unlock_irqrestore(&pctrl->lock, flags); ++ raw_spin_unlock_irqrestore(&pctrl->lock, flags); + + return 0; + } +@@ -878,7 +878,7 @@ + pctrl->soc = soc_data; + pctrl->chip = msm_gpio_template; + +- spin_lock_init(&pctrl->lock); ++ raw_spin_lock_init(&pctrl->lock); + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + pctrl->regs = devm_ioremap_resource(&pdev->dev, res); +diff -Nur linux-4.9.22.orig/drivers/scsi/fcoe/fcoe.c linux-4.9.22/drivers/scsi/fcoe/fcoe.c +--- linux-4.9.22.orig/drivers/scsi/fcoe/fcoe.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/fcoe/fcoe.c 2017-04-18 17:19:16.650771990 +0200 @@ -1455,11 +1455,11 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) { @@ -4722,9 +4949,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe.c linux-4.9.6/drivers/scsi/fco kfree_skb(skb); } -diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.9.6/drivers/scsi/fcoe/fcoe_ctlr.c ---- linux-4.9.6.orig/drivers/scsi/fcoe/fcoe_ctlr.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/fcoe/fcoe_ctlr.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.9.22/drivers/scsi/fcoe/fcoe_ctlr.c +--- linux-4.9.22.orig/drivers/scsi/fcoe/fcoe_ctlr.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/fcoe/fcoe_ctlr.c 2017-04-18 17:19:16.650771990 +0200 @@ -834,7 +834,7 @@ INIT_LIST_HEAD(&del_list); @@ -4743,9 +4970,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.9.6/drivers/scs list_for_each_entry_safe(fcf, next, &del_list, list) { /* Removes fcf from current list */ -diff -Nur linux-4.9.6.orig/drivers/scsi/libfc/fc_exch.c linux-4.9.6/drivers/scsi/libfc/fc_exch.c ---- linux-4.9.6.orig/drivers/scsi/libfc/fc_exch.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/libfc/fc_exch.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/scsi/libfc/fc_exch.c linux-4.9.22/drivers/scsi/libfc/fc_exch.c +--- linux-4.9.22.orig/drivers/scsi/libfc/fc_exch.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/libfc/fc_exch.c 2017-04-18 17:19:16.650771990 +0200 @@ -814,10 +814,10 @@ } memset(ep, 0, sizeof(*ep)); @@ -4759,9 +4986,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/libfc/fc_exch.c linux-4.9.6/drivers/scsi /* peek cache of free slot */ if (pool->left != FC_XID_UNKNOWN) { -diff -Nur linux-4.9.6.orig/drivers/scsi/libsas/sas_ata.c linux-4.9.6/drivers/scsi/libsas/sas_ata.c ---- linux-4.9.6.orig/drivers/scsi/libsas/sas_ata.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/libsas/sas_ata.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/scsi/libsas/sas_ata.c linux-4.9.22/drivers/scsi/libsas/sas_ata.c +--- linux-4.9.22.orig/drivers/scsi/libsas/sas_ata.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/libsas/sas_ata.c 2017-04-18 17:19:16.650771990 +0200 @@ -190,7 +190,7 @@ /* TODO: audit callers to ensure they are ready for qc_issue to * unconditionally re-enable interrupts @@ -4780,9 +5007,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/libsas/sas_ata.c linux-4.9.6/drivers/scs return ret; } -diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.9.6/drivers/scsi/qla2xxx/qla_inline.h ---- linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_inline.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/qla2xxx/qla_inline.h 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.9.22/drivers/scsi/qla2xxx/qla_inline.h +--- linux-4.9.22.orig/drivers/scsi/qla2xxx/qla_inline.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/qla2xxx/qla_inline.h 2017-04-18 17:19:16.650771990 +0200 @@ -59,12 +59,12 @@ { unsigned long flags; @@ -4798,9 +5025,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.9.6/drivers } static inline uint8_t * -diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.9.6/drivers/scsi/qla2xxx/qla_isr.c ---- linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_isr.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/scsi/qla2xxx/qla_isr.c 2017-01-28 13:59:09.919655726 +0100 +diff -Nur linux-4.9.22.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.9.22/drivers/scsi/qla2xxx/qla_isr.c +--- linux-4.9.22.orig/drivers/scsi/qla2xxx/qla_isr.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/scsi/qla2xxx/qla_isr.c 2017-04-18 17:19:16.650771990 +0200 @@ -3125,7 +3125,11 @@ * kref_put(). */ @@ -4813,9 +5040,9 @@ diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.9.6/drivers/sc } /* -diff -Nur linux-4.9.6.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.9.6/drivers/thermal/x86_pkg_temp_thermal.c ---- linux-4.9.6.orig/drivers/thermal/x86_pkg_temp_thermal.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/thermal/x86_pkg_temp_thermal.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.9.22/drivers/thermal/x86_pkg_temp_thermal.c +--- linux-4.9.22.orig/drivers/thermal/x86_pkg_temp_thermal.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/thermal/x86_pkg_temp_thermal.c 2017-04-18 17:19:16.650771990 +0200 @@ -29,6 +29,7 @@ #include <linux/pm.h> #include <linux/thermal.h> @@ -4918,9 +5145,9 @@ diff -Nur linux-4.9.6.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.9.6/dr for_each_online_cpu(i) cancel_delayed_work_sync( &per_cpu(pkg_temp_thermal_threshold_work, i)); -diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_core.c linux-4.9.6/drivers/tty/serial/8250/8250_core.c ---- linux-4.9.6.orig/drivers/tty/serial/8250/8250_core.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/tty/serial/8250/8250_core.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/tty/serial/8250/8250_core.c linux-4.9.22/drivers/tty/serial/8250/8250_core.c +--- linux-4.9.22.orig/drivers/tty/serial/8250/8250_core.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/tty/serial/8250/8250_core.c 2017-04-18 17:19:16.650771990 +0200 @@ -58,7 +58,16 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ @@ -4939,9 +5166,9 @@ diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_core.c linux-4.9.6/drive #include <asm/serial.h> /* -diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_port.c linux-4.9.6/drivers/tty/serial/8250/8250_port.c ---- linux-4.9.6.orig/drivers/tty/serial/8250/8250_port.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/tty/serial/8250/8250_port.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/tty/serial/8250/8250_port.c linux-4.9.22/drivers/tty/serial/8250/8250_port.c +--- linux-4.9.22.orig/drivers/tty/serial/8250/8250_port.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/tty/serial/8250/8250_port.c 2017-04-18 17:19:16.650771990 +0200 @@ -35,6 +35,7 @@ #include <linux/nmi.h> #include <linux/mutex.h> @@ -4962,9 +5189,9 @@ diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_port.c linux-4.9.6/drive locked = spin_trylock_irqsave(&port->lock, flags); else spin_lock_irqsave(&port->lock, flags); -diff -Nur linux-4.9.6.orig/drivers/tty/serial/amba-pl011.c linux-4.9.6/drivers/tty/serial/amba-pl011.c ---- linux-4.9.6.orig/drivers/tty/serial/amba-pl011.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/tty/serial/amba-pl011.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/tty/serial/amba-pl011.c linux-4.9.22/drivers/tty/serial/amba-pl011.c +--- linux-4.9.22.orig/drivers/tty/serial/amba-pl011.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/tty/serial/amba-pl011.c 2017-04-18 17:19:16.654772144 +0200 @@ -2194,13 +2194,19 @@ clk_enable(uap->clk); @@ -4998,9 +5225,9 @@ diff -Nur linux-4.9.6.orig/drivers/tty/serial/amba-pl011.c linux-4.9.6/drivers/t clk_disable(uap->clk); } -diff -Nur linux-4.9.6.orig/drivers/tty/serial/omap-serial.c linux-4.9.6/drivers/tty/serial/omap-serial.c ---- linux-4.9.6.orig/drivers/tty/serial/omap-serial.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/tty/serial/omap-serial.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/tty/serial/omap-serial.c linux-4.9.22/drivers/tty/serial/omap-serial.c +--- linux-4.9.22.orig/drivers/tty/serial/omap-serial.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/tty/serial/omap-serial.c 2017-04-18 17:19:16.654772144 +0200 @@ -1257,13 +1257,10 @@ pm_runtime_get_sync(up->dev); @@ -5028,10 +5255,10 @@ diff -Nur linux-4.9.6.orig/drivers/tty/serial/omap-serial.c linux-4.9.6/drivers/ } static int __init -diff -Nur linux-4.9.6.orig/drivers/usb/core/hcd.c linux-4.9.6/drivers/usb/core/hcd.c ---- linux-4.9.6.orig/drivers/usb/core/hcd.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/usb/core/hcd.c 2017-01-28 13:59:09.923655879 +0100 -@@ -1761,9 +1761,9 @@ +diff -Nur linux-4.9.22.orig/drivers/usb/core/hcd.c linux-4.9.22/drivers/usb/core/hcd.c +--- linux-4.9.22.orig/drivers/usb/core/hcd.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/usb/core/hcd.c 2017-04-18 17:19:16.654772144 +0200 +@@ -1764,9 +1764,9 @@ * and no one may trigger the above deadlock situation when * running complete() in tasklet. */ @@ -5043,9 +5270,9 @@ diff -Nur linux-4.9.6.orig/drivers/usb/core/hcd.c linux-4.9.6/drivers/usb/core/h usb_anchor_resume_wakeups(anchor); atomic_dec(&urb->use_count); -diff -Nur linux-4.9.6.orig/drivers/usb/gadget/function/f_fs.c linux-4.9.6/drivers/usb/gadget/function/f_fs.c ---- linux-4.9.6.orig/drivers/usb/gadget/function/f_fs.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/usb/gadget/function/f_fs.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/usb/gadget/function/f_fs.c linux-4.9.22/drivers/usb/gadget/function/f_fs.c +--- linux-4.9.22.orig/drivers/usb/gadget/function/f_fs.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/usb/gadget/function/f_fs.c 2017-04-18 17:19:16.654772144 +0200 @@ -1593,7 +1593,7 @@ pr_info("%s(): freeing\n", __func__); ffs_data_clear(ffs); @@ -5055,9 +5282,9 @@ diff -Nur linux-4.9.6.orig/drivers/usb/gadget/function/f_fs.c linux-4.9.6/driver kfree(ffs->dev_name); kfree(ffs); } -diff -Nur linux-4.9.6.orig/drivers/usb/gadget/legacy/inode.c linux-4.9.6/drivers/usb/gadget/legacy/inode.c ---- linux-4.9.6.orig/drivers/usb/gadget/legacy/inode.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/drivers/usb/gadget/legacy/inode.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/drivers/usb/gadget/legacy/inode.c linux-4.9.22/drivers/usb/gadget/legacy/inode.c +--- linux-4.9.22.orig/drivers/usb/gadget/legacy/inode.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/drivers/usb/gadget/legacy/inode.c 2017-04-18 17:19:16.654772144 +0200 @@ -346,7 +346,7 @@ spin_unlock_irq (&epdata->dev->lock); @@ -5076,9 +5303,9 @@ diff -Nur linux-4.9.6.orig/drivers/usb/gadget/legacy/inode.c linux-4.9.6/drivers if (epdata->status == -ECONNRESET) epdata->status = -EINTR; } else { -diff -Nur linux-4.9.6.orig/fs/aio.c linux-4.9.6/fs/aio.c ---- linux-4.9.6.orig/fs/aio.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/aio.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/fs/aio.c linux-4.9.22/fs/aio.c +--- linux-4.9.22.orig/fs/aio.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/aio.c 2017-04-18 17:19:16.654772144 +0200 @@ -40,6 +40,7 @@ #include <linux/ramfs.h> #include <linux/percpu-refcount.h> @@ -5154,9 +5381,9 @@ diff -Nur linux-4.9.6.orig/fs/aio.c linux-4.9.6/fs/aio.c static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) { unsigned i, new_nr; -diff -Nur linux-4.9.6.orig/fs/autofs4/autofs_i.h linux-4.9.6/fs/autofs4/autofs_i.h ---- linux-4.9.6.orig/fs/autofs4/autofs_i.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/autofs4/autofs_i.h 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/fs/autofs4/autofs_i.h linux-4.9.22/fs/autofs4/autofs_i.h +--- linux-4.9.22.orig/fs/autofs4/autofs_i.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/autofs4/autofs_i.h 2017-04-18 17:19:16.654772144 +0200 @@ -31,6 +31,7 @@ #include <linux/sched.h> #include <linux/mount.h> @@ -5165,9 +5392,9 @@ diff -Nur linux-4.9.6.orig/fs/autofs4/autofs_i.h linux-4.9.6/fs/autofs4/autofs_i #include <asm/current.h> #include <linux/uaccess.h> -diff -Nur linux-4.9.6.orig/fs/autofs4/expire.c linux-4.9.6/fs/autofs4/expire.c ---- linux-4.9.6.orig/fs/autofs4/expire.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/autofs4/expire.c 2017-01-28 13:59:09.923655879 +0100 +diff -Nur linux-4.9.22.orig/fs/autofs4/expire.c linux-4.9.22/fs/autofs4/expire.c +--- linux-4.9.22.orig/fs/autofs4/expire.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/autofs4/expire.c 2017-04-18 17:19:16.654772144 +0200 @@ -148,7 +148,7 @@ parent = p->d_parent; if (!spin_trylock(&parent->d_lock)) { @@ -5177,9 +5404,9 @@ diff -Nur linux-4.9.6.orig/fs/autofs4/expire.c linux-4.9.6/fs/autofs4/expire.c goto relock; } spin_unlock(&p->d_lock); -diff -Nur linux-4.9.6.orig/fs/buffer.c linux-4.9.6/fs/buffer.c ---- linux-4.9.6.orig/fs/buffer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/buffer.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/buffer.c linux-4.9.22/fs/buffer.c +--- linux-4.9.22.orig/fs/buffer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/buffer.c 2017-04-18 17:19:16.654772144 +0200 @@ -301,8 +301,7 @@ * decide that the page is now completely done. */ @@ -5247,9 +5474,9 @@ diff -Nur linux-4.9.6.orig/fs/buffer.c linux-4.9.6/fs/buffer.c preempt_disable(); __this_cpu_inc(bh_accounting.nr); recalc_bh_state(); -diff -Nur linux-4.9.6.orig/fs/cifs/readdir.c linux-4.9.6/fs/cifs/readdir.c ---- linux-4.9.6.orig/fs/cifs/readdir.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/cifs/readdir.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/cifs/readdir.c linux-4.9.22/fs/cifs/readdir.c +--- linux-4.9.22.orig/fs/cifs/readdir.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/cifs/readdir.c 2017-04-18 17:19:16.654772144 +0200 @@ -80,7 +80,7 @@ struct inode *inode; struct super_block *sb = parent->d_sb; @@ -5259,9 +5486,9 @@ diff -Nur linux-4.9.6.orig/fs/cifs/readdir.c linux-4.9.6/fs/cifs/readdir.c cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); -diff -Nur linux-4.9.6.orig/fs/dcache.c linux-4.9.6/fs/dcache.c ---- linux-4.9.6.orig/fs/dcache.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/dcache.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/dcache.c linux-4.9.22/fs/dcache.c +--- linux-4.9.22.orig/fs/dcache.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/dcache.c 2017-04-18 17:19:16.654772144 +0200 @@ -19,6 +19,7 @@ #include <linux/mm.h> #include <linux/fs.h> @@ -5367,9 +5594,9 @@ diff -Nur linux-4.9.6.orig/fs/dcache.c linux-4.9.6/fs/dcache.c dcache_init_early(); inode_init_early(); } -diff -Nur linux-4.9.6.orig/fs/eventpoll.c linux-4.9.6/fs/eventpoll.c ---- linux-4.9.6.orig/fs/eventpoll.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/eventpoll.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/eventpoll.c linux-4.9.22/fs/eventpoll.c +--- linux-4.9.22.orig/fs/eventpoll.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/eventpoll.c 2017-04-18 17:19:16.654772144 +0200 @@ -510,12 +510,12 @@ */ static void ep_poll_safewake(wait_queue_head_t *wq) @@ -5385,9 +5612,9 @@ diff -Nur linux-4.9.6.orig/fs/eventpoll.c linux-4.9.6/fs/eventpoll.c } static void ep_remove_wait_queue(struct eppoll_entry *pwq) -diff -Nur linux-4.9.6.orig/fs/exec.c linux-4.9.6/fs/exec.c ---- linux-4.9.6.orig/fs/exec.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/exec.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/exec.c linux-4.9.22/fs/exec.c +--- linux-4.9.22.orig/fs/exec.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/exec.c 2017-04-18 17:19:16.658772300 +0200 @@ -1017,12 +1017,14 @@ } } @@ -5403,9 +5630,9 @@ diff -Nur linux-4.9.6.orig/fs/exec.c linux-4.9.6/fs/exec.c task_unlock(tsk); if (old_mm) { up_read(&old_mm->mmap_sem); -diff -Nur linux-4.9.6.orig/fs/fuse/dir.c linux-4.9.6/fs/fuse/dir.c ---- linux-4.9.6.orig/fs/fuse/dir.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/fuse/dir.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/fuse/dir.c linux-4.9.22/fs/fuse/dir.c +--- linux-4.9.22.orig/fs/fuse/dir.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/fuse/dir.c 2017-04-18 17:19:16.658772300 +0200 @@ -1191,7 +1191,7 @@ struct inode *dir = d_inode(parent); struct fuse_conn *fc; @@ -5415,9 +5642,9 @@ diff -Nur linux-4.9.6.orig/fs/fuse/dir.c linux-4.9.6/fs/fuse/dir.c if (!o->nodeid) { /* -diff -Nur linux-4.9.6.orig/fs/jbd2/checkpoint.c linux-4.9.6/fs/jbd2/checkpoint.c ---- linux-4.9.6.orig/fs/jbd2/checkpoint.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/jbd2/checkpoint.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/jbd2/checkpoint.c linux-4.9.22/fs/jbd2/checkpoint.c +--- linux-4.9.22.orig/fs/jbd2/checkpoint.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/jbd2/checkpoint.c 2017-04-18 17:19:16.658772300 +0200 @@ -116,6 +116,8 @@ nblocks = jbd2_space_needed(journal); while (jbd2_log_space_left(journal) < nblocks) { @@ -5427,9 +5654,9 @@ diff -Nur linux-4.9.6.orig/fs/jbd2/checkpoint.c linux-4.9.6/fs/jbd2/checkpoint.c mutex_lock(&journal->j_checkpoint_mutex); /* -diff -Nur linux-4.9.6.orig/fs/locks.c linux-4.9.6/fs/locks.c ---- linux-4.9.6.orig/fs/locks.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/locks.c 2017-01-28 13:59:09.927656033 +0100 +diff -Nur linux-4.9.22.orig/fs/locks.c linux-4.9.22/fs/locks.c +--- linux-4.9.22.orig/fs/locks.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/locks.c 2017-04-18 17:19:16.658772300 +0200 @@ -935,7 +935,7 @@ return -ENOMEM; } @@ -5570,10 +5797,10 @@ diff -Nur linux-4.9.6.orig/fs/locks.c linux-4.9.6/fs/locks.c locks_dispose_list(&dispose); } -diff -Nur linux-4.9.6.orig/fs/namei.c linux-4.9.6/fs/namei.c ---- linux-4.9.6.orig/fs/namei.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/namei.c 2017-01-28 13:59:09.927656033 +0100 -@@ -1629,7 +1629,7 @@ +diff -Nur linux-4.9.22.orig/fs/namei.c linux-4.9.22/fs/namei.c +--- linux-4.9.22.orig/fs/namei.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/namei.c 2017-04-18 17:19:16.658772300 +0200 +@@ -1626,7 +1626,7 @@ { struct dentry *dentry = ERR_PTR(-ENOENT), *old; struct inode *inode = dir->d_inode; @@ -5582,7 +5809,7 @@ diff -Nur linux-4.9.6.orig/fs/namei.c linux-4.9.6/fs/namei.c inode_lock_shared(inode); /* Don't go there if it's already dead */ -@@ -3086,7 +3086,7 @@ +@@ -3083,7 +3083,7 @@ struct dentry *dentry; int error, create_error = 0; umode_t mode = op->mode; @@ -5591,9 +5818,9 @@ diff -Nur linux-4.9.6.orig/fs/namei.c linux-4.9.6/fs/namei.c if (unlikely(IS_DEADDIR(dir_inode))) return -ENOENT; -diff -Nur linux-4.9.6.orig/fs/namespace.c linux-4.9.6/fs/namespace.c ---- linux-4.9.6.orig/fs/namespace.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/namespace.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/namespace.c linux-4.9.22/fs/namespace.c +--- linux-4.9.22.orig/fs/namespace.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/namespace.c 2017-04-18 17:19:16.658772300 +0200 @@ -14,6 +14,7 @@ #include <linux/mnt_namespace.h> #include <linux/user_namespace.h> @@ -5616,9 +5843,9 @@ diff -Nur linux-4.9.6.orig/fs/namespace.c linux-4.9.6/fs/namespace.c /* * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will * be set to match its requirements. So we must not load that until -diff -Nur linux-4.9.6.orig/fs/nfs/delegation.c linux-4.9.6/fs/nfs/delegation.c ---- linux-4.9.6.orig/fs/nfs/delegation.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/delegation.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/delegation.c linux-4.9.22/fs/nfs/delegation.c +--- linux-4.9.22.orig/fs/nfs/delegation.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/delegation.c 2017-04-18 17:19:16.658772300 +0200 @@ -150,11 +150,11 @@ sp = state->owner; /* Block nfs4_proc_unlck */ @@ -5633,9 +5860,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/delegation.c linux-4.9.6/fs/nfs/delegation.c err = -EAGAIN; mutex_unlock(&sp->so_delegreturn_mutex); put_nfs_open_context(ctx); -diff -Nur linux-4.9.6.orig/fs/nfs/dir.c linux-4.9.6/fs/nfs/dir.c ---- linux-4.9.6.orig/fs/nfs/dir.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/dir.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/dir.c linux-4.9.22/fs/nfs/dir.c +--- linux-4.9.22.orig/fs/nfs/dir.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/dir.c 2017-04-18 17:19:16.658772300 +0200 @@ -485,7 +485,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) { @@ -5678,9 +5905,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/dir.c linux-4.9.6/fs/nfs/dir.c } else error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); trace_nfs_rmdir_exit(dir, dentry, error); -diff -Nur linux-4.9.6.orig/fs/nfs/inode.c linux-4.9.6/fs/nfs/inode.c ---- linux-4.9.6.orig/fs/nfs/inode.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/inode.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/inode.c linux-4.9.22/fs/nfs/inode.c +--- linux-4.9.22.orig/fs/nfs/inode.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/inode.c 2017-04-18 17:19:16.658772300 +0200 @@ -1957,7 +1957,11 @@ nfsi->nrequests = 0; nfsi->commit_info.ncommit = 0; @@ -5693,9 +5920,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/inode.c linux-4.9.6/fs/nfs/inode.c nfs4_init_once(nfsi); } -diff -Nur linux-4.9.6.orig/fs/nfs/nfs4_fs.h linux-4.9.6/fs/nfs/nfs4_fs.h ---- linux-4.9.6.orig/fs/nfs/nfs4_fs.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/nfs4_fs.h 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/nfs4_fs.h linux-4.9.22/fs/nfs/nfs4_fs.h +--- linux-4.9.22.orig/fs/nfs/nfs4_fs.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/nfs4_fs.h 2017-04-18 17:19:16.658772300 +0200 @@ -111,7 +111,7 @@ unsigned long so_flags; struct list_head so_states; @@ -5705,10 +5932,10 @@ diff -Nur linux-4.9.6.orig/fs/nfs/nfs4_fs.h linux-4.9.6/fs/nfs/nfs4_fs.h struct mutex so_delegreturn_mutex; }; -diff -Nur linux-4.9.6.orig/fs/nfs/nfs4proc.c linux-4.9.6/fs/nfs/nfs4proc.c ---- linux-4.9.6.orig/fs/nfs/nfs4proc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/nfs4proc.c 2017-01-28 13:59:09.931656187 +0100 -@@ -2697,7 +2697,7 @@ +diff -Nur linux-4.9.22.orig/fs/nfs/nfs4proc.c linux-4.9.22/fs/nfs/nfs4proc.c +--- linux-4.9.22.orig/fs/nfs/nfs4proc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/nfs4proc.c 2017-04-18 17:19:16.662772455 +0200 +@@ -2695,7 +2695,7 @@ unsigned int seq; int ret; @@ -5717,8 +5944,8 @@ diff -Nur linux-4.9.6.orig/fs/nfs/nfs4proc.c linux-4.9.6/fs/nfs/nfs4proc.c ret = _nfs4_proc_open(opendata); if (ret != 0) -@@ -2735,7 +2735,7 @@ - ctx->state = state; +@@ -2733,7 +2733,7 @@ + if (d_inode(dentry) == state->inode) { nfs_inode_attach_open_context(ctx); - if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq)) @@ -5726,9 +5953,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/nfs4proc.c linux-4.9.6/fs/nfs/nfs4proc.c nfs4_schedule_stateid_recovery(server, state); } out: -diff -Nur linux-4.9.6.orig/fs/nfs/nfs4state.c linux-4.9.6/fs/nfs/nfs4state.c ---- linux-4.9.6.orig/fs/nfs/nfs4state.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/nfs4state.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/nfs4state.c linux-4.9.22/fs/nfs/nfs4state.c +--- linux-4.9.22.orig/fs/nfs/nfs4state.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/nfs4state.c 2017-04-18 17:19:16.662772455 +0200 @@ -488,7 +488,7 @@ nfs4_init_seqid_counter(&sp->so_seqid); atomic_set(&sp->so_count, 1); @@ -5777,9 +6004,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/nfs4state.c linux-4.9.6/fs/nfs/nfs4state.c return status; } -diff -Nur linux-4.9.6.orig/fs/nfs/unlink.c linux-4.9.6/fs/nfs/unlink.c ---- linux-4.9.6.orig/fs/nfs/unlink.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/nfs/unlink.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/nfs/unlink.c linux-4.9.22/fs/nfs/unlink.c +--- linux-4.9.22.orig/fs/nfs/unlink.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/nfs/unlink.c 2017-04-18 17:19:16.662772455 +0200 @@ -12,7 +12,7 @@ #include <linux/sunrpc/clnt.h> #include <linux/nfs_fs.h> @@ -5859,9 +6086,9 @@ diff -Nur linux-4.9.6.orig/fs/nfs/unlink.c linux-4.9.6/fs/nfs/unlink.c status = -EBUSY; spin_lock(&dentry->d_lock); -diff -Nur linux-4.9.6.orig/fs/ntfs/aops.c linux-4.9.6/fs/ntfs/aops.c ---- linux-4.9.6.orig/fs/ntfs/aops.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/ntfs/aops.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/ntfs/aops.c linux-4.9.22/fs/ntfs/aops.c +--- linux-4.9.22.orig/fs/ntfs/aops.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/ntfs/aops.c 2017-04-18 17:19:16.662772455 +0200 @@ -92,13 +92,13 @@ ofs = 0; if (file_ofs < init_size) @@ -5925,9 +6152,9 @@ diff -Nur linux-4.9.6.orig/fs/ntfs/aops.c linux-4.9.6/fs/ntfs/aops.c } /** -diff -Nur linux-4.9.6.orig/fs/proc/base.c linux-4.9.6/fs/proc/base.c ---- linux-4.9.6.orig/fs/proc/base.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/proc/base.c 2017-01-28 13:59:09.931656187 +0100 +diff -Nur linux-4.9.22.orig/fs/proc/base.c linux-4.9.22/fs/proc/base.c +--- linux-4.9.22.orig/fs/proc/base.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/proc/base.c 2017-04-18 17:19:16.662772455 +0200 @@ -1834,7 +1834,7 @@ child = d_hash_and_lookup(dir, &qname); @@ -5937,9 +6164,9 @@ diff -Nur linux-4.9.6.orig/fs/proc/base.c linux-4.9.6/fs/proc/base.c child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) goto end_instantiate; -diff -Nur linux-4.9.6.orig/fs/proc/proc_sysctl.c linux-4.9.6/fs/proc/proc_sysctl.c ---- linux-4.9.6.orig/fs/proc/proc_sysctl.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/proc/proc_sysctl.c 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/fs/proc/proc_sysctl.c linux-4.9.22/fs/proc/proc_sysctl.c +--- linux-4.9.22.orig/fs/proc/proc_sysctl.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/proc/proc_sysctl.c 2017-04-18 17:19:16.662772455 +0200 @@ -632,7 +632,7 @@ child = d_lookup(dir, &qname); @@ -5949,9 +6176,9 @@ diff -Nur linux-4.9.6.orig/fs/proc/proc_sysctl.c linux-4.9.6/fs/proc/proc_sysctl child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) return false; -diff -Nur linux-4.9.6.orig/fs/timerfd.c linux-4.9.6/fs/timerfd.c ---- linux-4.9.6.orig/fs/timerfd.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/fs/timerfd.c 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/fs/timerfd.c linux-4.9.22/fs/timerfd.c +--- linux-4.9.22.orig/fs/timerfd.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/fs/timerfd.c 2017-04-18 17:19:16.662772455 +0200 @@ -460,7 +460,10 @@ break; } @@ -5964,9 +6191,9 @@ diff -Nur linux-4.9.6.orig/fs/timerfd.c linux-4.9.6/fs/timerfd.c } /* -diff -Nur linux-4.9.6.orig/include/acpi/platform/aclinux.h linux-4.9.6/include/acpi/platform/aclinux.h ---- linux-4.9.6.orig/include/acpi/platform/aclinux.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/acpi/platform/aclinux.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/acpi/platform/aclinux.h linux-4.9.22/include/acpi/platform/aclinux.h +--- linux-4.9.22.orig/include/acpi/platform/aclinux.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/acpi/platform/aclinux.h 2017-04-18 17:19:16.662772455 +0200 @@ -133,6 +133,7 @@ #define acpi_cache_t struct kmem_cache @@ -5996,9 +6223,9 @@ diff -Nur linux-4.9.6.orig/include/acpi/platform/aclinux.h linux-4.9.6/include/a /* * OSL interfaces used by debugger/disassembler */ -diff -Nur linux-4.9.6.orig/include/asm-generic/bug.h linux-4.9.6/include/asm-generic/bug.h ---- linux-4.9.6.orig/include/asm-generic/bug.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/asm-generic/bug.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/asm-generic/bug.h linux-4.9.22/include/asm-generic/bug.h +--- linux-4.9.22.orig/include/asm-generic/bug.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/asm-generic/bug.h 2017-04-18 17:19:16.662772455 +0200 @@ -215,6 +215,20 @@ # define WARN_ON_SMP(x) ({0;}) #endif @@ -6020,9 +6247,9 @@ diff -Nur linux-4.9.6.orig/include/asm-generic/bug.h linux-4.9.6/include/asm-gen #endif /* __ASSEMBLY__ */ #endif -diff -Nur linux-4.9.6.orig/include/linux/blkdev.h linux-4.9.6/include/linux/blkdev.h ---- linux-4.9.6.orig/include/linux/blkdev.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/blkdev.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/blkdev.h linux-4.9.22/include/linux/blkdev.h +--- linux-4.9.22.orig/include/linux/blkdev.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/blkdev.h 2017-04-18 17:19:16.662772455 +0200 @@ -89,6 +89,7 @@ struct list_head queuelist; union { @@ -6040,9 +6267,9 @@ diff -Nur linux-4.9.6.orig/include/linux/blkdev.h linux-4.9.6/include/linux/blkd struct percpu_ref q_usage_counter; struct list_head all_q_node; -diff -Nur linux-4.9.6.orig/include/linux/blk-mq.h linux-4.9.6/include/linux/blk-mq.h ---- linux-4.9.6.orig/include/linux/blk-mq.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/blk-mq.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/blk-mq.h linux-4.9.22/include/linux/blk-mq.h +--- linux-4.9.22.orig/include/linux/blk-mq.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/blk-mq.h 2017-04-18 17:19:16.662772455 +0200 @@ -209,7 +209,7 @@ return unique_tag & BLK_MQ_UNIQUE_TAG_MASK; } @@ -6052,9 +6279,9 @@ diff -Nur linux-4.9.6.orig/include/linux/blk-mq.h linux-4.9.6/include/linux/blk- int blk_mq_request_started(struct request *rq); void blk_mq_start_request(struct request *rq); void blk_mq_end_request(struct request *rq, int error); -diff -Nur linux-4.9.6.orig/include/linux/bottom_half.h linux-4.9.6/include/linux/bottom_half.h ---- linux-4.9.6.orig/include/linux/bottom_half.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/bottom_half.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/bottom_half.h linux-4.9.22/include/linux/bottom_half.h +--- linux-4.9.22.orig/include/linux/bottom_half.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/bottom_half.h 2017-04-18 17:19:16.662772455 +0200 @@ -3,6 +3,39 @@ #include <linux/preempt.h> @@ -6102,9 +6329,9 @@ diff -Nur linux-4.9.6.orig/include/linux/bottom_half.h linux-4.9.6/include/linux +#endif #endif /* _LINUX_BH_H */ -diff -Nur linux-4.9.6.orig/include/linux/buffer_head.h linux-4.9.6/include/linux/buffer_head.h ---- linux-4.9.6.orig/include/linux/buffer_head.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/buffer_head.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/buffer_head.h linux-4.9.22/include/linux/buffer_head.h +--- linux-4.9.22.orig/include/linux/buffer_head.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/buffer_head.h 2017-04-18 17:19:16.662772455 +0200 @@ -75,8 +75,50 @@ struct address_space *b_assoc_map; /* mapping this buffer is associated with */ @@ -6156,9 +6383,9 @@ diff -Nur linux-4.9.6.orig/include/linux/buffer_head.h linux-4.9.6/include/linux /* * macro tricks to expand the set_buffer_foo(), clear_buffer_foo() * and buffer_foo() functions. -diff -Nur linux-4.9.6.orig/include/linux/cgroup-defs.h linux-4.9.6/include/linux/cgroup-defs.h ---- linux-4.9.6.orig/include/linux/cgroup-defs.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/cgroup-defs.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/cgroup-defs.h linux-4.9.22/include/linux/cgroup-defs.h +--- linux-4.9.22.orig/include/linux/cgroup-defs.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/cgroup-defs.h 2017-04-18 17:19:16.662772455 +0200 @@ -16,6 +16,7 @@ #include <linux/percpu-refcount.h> #include <linux/percpu-rwsem.h> @@ -6175,9 +6402,9 @@ diff -Nur linux-4.9.6.orig/include/linux/cgroup-defs.h linux-4.9.6/include/linux }; /* -diff -Nur linux-4.9.6.orig/include/linux/completion.h linux-4.9.6/include/linux/completion.h ---- linux-4.9.6.orig/include/linux/completion.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/completion.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/completion.h linux-4.9.22/include/linux/completion.h +--- linux-4.9.22.orig/include/linux/completion.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/completion.h 2017-04-18 17:19:16.662772455 +0200 @@ -7,8 +7,7 @@ * Atomic wait-for-completion handler data structures. * See kernel/sched/completion.c for details. @@ -6211,9 +6438,9 @@ diff -Nur linux-4.9.6.orig/include/linux/completion.h linux-4.9.6/include/linux/ } /** -diff -Nur linux-4.9.6.orig/include/linux/cpu.h linux-4.9.6/include/linux/cpu.h ---- linux-4.9.6.orig/include/linux/cpu.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/cpu.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/cpu.h linux-4.9.22/include/linux/cpu.h +--- linux-4.9.22.orig/include/linux/cpu.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/cpu.h 2017-04-18 17:19:16.662772455 +0200 @@ -182,6 +182,8 @@ extern void put_online_cpus(void); extern void cpu_hotplug_disable(void); @@ -6232,9 +6459,9 @@ diff -Nur linux-4.9.6.orig/include/linux/cpu.h linux-4.9.6/include/linux/cpu.h #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) #define __hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) /* These aren't inline functions due to a GCC bug. */ -diff -Nur linux-4.9.6.orig/include/linux/dcache.h linux-4.9.6/include/linux/dcache.h ---- linux-4.9.6.orig/include/linux/dcache.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/dcache.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/dcache.h linux-4.9.22/include/linux/dcache.h +--- linux-4.9.22.orig/include/linux/dcache.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/dcache.h 2017-04-18 17:19:16.662772455 +0200 @@ -11,6 +11,7 @@ #include <linux/rcupdate.h> #include <linux/lockref.h> @@ -6261,9 +6488,9 @@ diff -Nur linux-4.9.6.orig/include/linux/dcache.h linux-4.9.6/include/linux/dcac extern struct dentry * d_splice_alias(struct inode *, struct dentry *); extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); extern struct dentry * d_exact_alias(struct dentry *, struct inode *); -diff -Nur linux-4.9.6.orig/include/linux/delay.h linux-4.9.6/include/linux/delay.h ---- linux-4.9.6.orig/include/linux/delay.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/delay.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/delay.h linux-4.9.22/include/linux/delay.h +--- linux-4.9.22.orig/include/linux/delay.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/delay.h 2017-04-18 17:19:16.662772455 +0200 @@ -52,4 +52,10 @@ msleep(seconds * 1000); } @@ -6275,9 +6502,9 @@ diff -Nur linux-4.9.6.orig/include/linux/delay.h linux-4.9.6/include/linux/delay +#endif + #endif /* defined(_LINUX_DELAY_H) */ -diff -Nur linux-4.9.6.orig/include/linux/highmem.h linux-4.9.6/include/linux/highmem.h ---- linux-4.9.6.orig/include/linux/highmem.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/highmem.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/highmem.h linux-4.9.22/include/linux/highmem.h +--- linux-4.9.22.orig/include/linux/highmem.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/highmem.h 2017-04-18 17:19:16.666772610 +0200 @@ -7,6 +7,7 @@ #include <linux/mm.h> #include <linux/uaccess.h> @@ -6360,9 +6587,9 @@ diff -Nur linux-4.9.6.orig/include/linux/highmem.h linux-4.9.6/include/linux/hig #endif } -diff -Nur linux-4.9.6.orig/include/linux/hrtimer.h linux-4.9.6/include/linux/hrtimer.h ---- linux-4.9.6.orig/include/linux/hrtimer.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/hrtimer.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/hrtimer.h linux-4.9.22/include/linux/hrtimer.h +--- linux-4.9.22.orig/include/linux/hrtimer.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/hrtimer.h 2017-04-18 17:19:16.666772610 +0200 @@ -87,6 +87,9 @@ * @function: timer expiry callback function * @base: pointer to the timer base (per cpu and per clock) @@ -6445,18 +6672,27 @@ diff -Nur linux-4.9.6.orig/include/linux/hrtimer.h linux-4.9.6/include/linux/hrt /* Query timers: */ extern ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust); -@@ -436,7 +453,7 @@ +@@ -436,9 +453,15 @@ * Helper function to check, whether the timer is running the callback * function */ -static inline int hrtimer_callback_running(struct hrtimer *timer) +static inline int hrtimer_callback_running(const struct hrtimer *timer) { - return timer->base->cpu_base->running == timer; +- return timer->base->cpu_base->running == timer; ++ if (timer->base->cpu_base->running == timer) ++ return 1; ++#ifdef CONFIG_PREEMPT_RT_BASE ++ if (timer->base->cpu_base->running_soft == timer) ++ return 1; ++#endif ++ return 0; } -diff -Nur linux-4.9.6.orig/include/linux/idr.h linux-4.9.6/include/linux/idr.h ---- linux-4.9.6.orig/include/linux/idr.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/idr.h 2017-01-28 13:59:09.935656342 +0100 + + /* Forward a hrtimer so it expires after now: */ +diff -Nur linux-4.9.22.orig/include/linux/idr.h linux-4.9.22/include/linux/idr.h +--- linux-4.9.22.orig/include/linux/idr.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/idr.h 2017-04-18 17:19:16.666772610 +0200 @@ -95,10 +95,14 @@ * Each idr_preload() should be matched with an invocation of this * function. See idr_preload() for details. @@ -6472,9 +6708,9 @@ diff -Nur linux-4.9.6.orig/include/linux/idr.h linux-4.9.6/include/linux/idr.h /** * idr_find - return pointer for given id -diff -Nur linux-4.9.6.orig/include/linux/init_task.h linux-4.9.6/include/linux/init_task.h ---- linux-4.9.6.orig/include/linux/init_task.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/init_task.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/init_task.h linux-4.9.22/include/linux/init_task.h +--- linux-4.9.22.orig/include/linux/init_task.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/init_task.h 2017-04-18 17:19:16.666772610 +0200 @@ -150,6 +150,12 @@ # define INIT_PERF_EVENTS(tsk) #endif @@ -6496,9 +6732,9 @@ diff -Nur linux-4.9.6.orig/include/linux/init_task.h linux-4.9.6/include/linux/i .pids = { \ [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ -diff -Nur linux-4.9.6.orig/include/linux/interrupt.h linux-4.9.6/include/linux/interrupt.h ---- linux-4.9.6.orig/include/linux/interrupt.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/interrupt.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/interrupt.h linux-4.9.22/include/linux/interrupt.h +--- linux-4.9.22.orig/include/linux/interrupt.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/interrupt.h 2017-04-18 17:19:16.666772610 +0200 @@ -14,6 +14,7 @@ #include <linux/hrtimer.h> #include <linux/kref.h> @@ -6687,9 +6923,9 @@ diff -Nur linux-4.9.6.orig/include/linux/interrupt.h linux-4.9.6/include/linux/i /* * Autoprobing for irqs: * -diff -Nur linux-4.9.6.orig/include/linux/irqdesc.h linux-4.9.6/include/linux/irqdesc.h ---- linux-4.9.6.orig/include/linux/irqdesc.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/irqdesc.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/irqdesc.h linux-4.9.22/include/linux/irqdesc.h +--- linux-4.9.22.orig/include/linux/irqdesc.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/irqdesc.h 2017-04-18 17:19:16.666772610 +0200 @@ -66,6 +66,7 @@ unsigned int irqs_unhandled; atomic_t threads_handled; @@ -6698,9 +6934,9 @@ diff -Nur linux-4.9.6.orig/include/linux/irqdesc.h linux-4.9.6/include/linux/irq raw_spinlock_t lock; struct cpumask *percpu_enabled; const struct cpumask *percpu_affinity; -diff -Nur linux-4.9.6.orig/include/linux/irqflags.h linux-4.9.6/include/linux/irqflags.h ---- linux-4.9.6.orig/include/linux/irqflags.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/irqflags.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/irqflags.h linux-4.9.22/include/linux/irqflags.h +--- linux-4.9.22.orig/include/linux/irqflags.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/irqflags.h 2017-04-18 17:19:16.666772610 +0200 @@ -25,8 +25,6 @@ # define trace_softirqs_enabled(p) ((p)->softirqs_enabled) # define trace_hardirq_enter() do { current->hardirq_context++; } while (0) @@ -6751,9 +6987,9 @@ diff -Nur linux-4.9.6.orig/include/linux/irqflags.h linux-4.9.6/include/linux/ir +#endif + #endif -diff -Nur linux-4.9.6.orig/include/linux/irq.h linux-4.9.6/include/linux/irq.h ---- linux-4.9.6.orig/include/linux/irq.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/irq.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/irq.h linux-4.9.22/include/linux/irq.h +--- linux-4.9.22.orig/include/linux/irq.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/irq.h 2017-04-18 17:19:16.666772610 +0200 @@ -72,6 +72,7 @@ * IRQ_IS_POLLED - Always polled by another interrupt. Exclude * it from the spurious interrupt detection @@ -6778,9 +7014,9 @@ diff -Nur linux-4.9.6.orig/include/linux/irq.h linux-4.9.6/include/linux/irq.h #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) -diff -Nur linux-4.9.6.orig/include/linux/irq_work.h linux-4.9.6/include/linux/irq_work.h ---- linux-4.9.6.orig/include/linux/irq_work.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/irq_work.h 2017-01-28 13:59:09.935656342 +0100 +diff -Nur linux-4.9.22.orig/include/linux/irq_work.h linux-4.9.22/include/linux/irq_work.h +--- linux-4.9.22.orig/include/linux/irq_work.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/irq_work.h 2017-04-18 17:19:16.666772610 +0200 @@ -16,6 +16,7 @@ #define IRQ_WORK_BUSY 2UL #define IRQ_WORK_FLAGS 3UL @@ -6800,9 +7036,9 @@ diff -Nur linux-4.9.6.orig/include/linux/irq_work.h linux-4.9.6/include/linux/ir +#endif + #endif /* _LINUX_IRQ_WORK_H */ -diff -Nur linux-4.9.6.orig/include/linux/jbd2.h linux-4.9.6/include/linux/jbd2.h ---- linux-4.9.6.orig/include/linux/jbd2.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/jbd2.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/jbd2.h linux-4.9.22/include/linux/jbd2.h +--- linux-4.9.22.orig/include/linux/jbd2.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/jbd2.h 2017-04-18 17:19:16.666772610 +0200 @@ -347,32 +347,56 @@ static inline void jbd_lock_bh_state(struct buffer_head *bh) @@ -6860,9 +7096,9 @@ diff -Nur linux-4.9.6.orig/include/linux/jbd2.h linux-4.9.6/include/linux/jbd2.h } #define J_ASSERT(assert) BUG_ON(!(assert)) -diff -Nur linux-4.9.6.orig/include/linux/kdb.h linux-4.9.6/include/linux/kdb.h ---- linux-4.9.6.orig/include/linux/kdb.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/kdb.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/kdb.h linux-4.9.22/include/linux/kdb.h +--- linux-4.9.22.orig/include/linux/kdb.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/kdb.h 2017-04-18 17:19:16.666772610 +0200 @@ -167,6 +167,7 @@ extern __printf(1, 2) int kdb_printf(const char *, ...); typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...); @@ -6879,9 +7115,9 @@ diff -Nur linux-4.9.6.orig/include/linux/kdb.h linux-4.9.6/include/linux/kdb.h static inline void kdb_init(int level) {} static inline int kdb_register(char *cmd, kdb_func_t func, char *usage, char *help, short minlen) { return 0; } -diff -Nur linux-4.9.6.orig/include/linux/kernel.h linux-4.9.6/include/linux/kernel.h ---- linux-4.9.6.orig/include/linux/kernel.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/kernel.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/kernel.h linux-4.9.22/include/linux/kernel.h +--- linux-4.9.22.orig/include/linux/kernel.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/kernel.h 2017-04-18 17:19:16.666772610 +0200 @@ -194,6 +194,9 @@ */ # define might_sleep() \ @@ -6908,9 +7144,9 @@ diff -Nur linux-4.9.6.orig/include/linux/kernel.h linux-4.9.6/include/linux/kern } system_state; #define TAINT_PROPRIETARY_MODULE 0 -diff -Nur linux-4.9.6.orig/include/linux/list_bl.h linux-4.9.6/include/linux/list_bl.h ---- linux-4.9.6.orig/include/linux/list_bl.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/list_bl.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/list_bl.h linux-4.9.22/include/linux/list_bl.h +--- linux-4.9.22.orig/include/linux/list_bl.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/list_bl.h 2017-04-18 17:19:16.666772610 +0200 @@ -2,6 +2,7 @@ #define _LINUX_LIST_BL_H @@ -6973,9 +7209,9 @@ diff -Nur linux-4.9.6.orig/include/linux/list_bl.h linux-4.9.6/include/linux/lis } static inline bool hlist_bl_is_locked(struct hlist_bl_head *b) -diff -Nur linux-4.9.6.orig/include/linux/locallock.h linux-4.9.6/include/linux/locallock.h ---- linux-4.9.6.orig/include/linux/locallock.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/locallock.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/locallock.h linux-4.9.22/include/linux/locallock.h +--- linux-4.9.22.orig/include/linux/locallock.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/locallock.h 2017-04-18 17:19:16.666772610 +0200 @@ -0,0 +1,278 @@ +#ifndef _LINUX_LOCALLOCK_H +#define _LINUX_LOCALLOCK_H @@ -7255,9 +7491,9 @@ diff -Nur linux-4.9.6.orig/include/linux/locallock.h linux-4.9.6/include/linux/l +#endif + +#endif -diff -Nur linux-4.9.6.orig/include/linux/mm_types.h linux-4.9.6/include/linux/mm_types.h ---- linux-4.9.6.orig/include/linux/mm_types.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/mm_types.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/mm_types.h linux-4.9.22/include/linux/mm_types.h +--- linux-4.9.22.orig/include/linux/mm_types.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/mm_types.h 2017-04-18 17:19:16.666772610 +0200 @@ -11,6 +11,7 @@ #include <linux/completion.h> #include <linux/cpumask.h> @@ -7276,9 +7512,32 @@ diff -Nur linux-4.9.6.orig/include/linux/mm_types.h linux-4.9.6/include/linux/mm #ifdef CONFIG_X86_INTEL_MPX /* address of the bounds directory */ void __user *bd_addr; -diff -Nur linux-4.9.6.orig/include/linux/mutex.h linux-4.9.6/include/linux/mutex.h ---- linux-4.9.6.orig/include/linux/mutex.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/mutex.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/module.h linux-4.9.22/include/linux/module.h +--- linux-4.9.22.orig/include/linux/module.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/module.h 2017-04-18 17:19:16.666772610 +0200 +@@ -496,6 +496,7 @@ + struct module *__module_text_address(unsigned long addr); + struct module *__module_address(unsigned long addr); + bool is_module_address(unsigned long addr); ++bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr); + bool is_module_percpu_address(unsigned long addr); + bool is_module_text_address(unsigned long addr); + +@@ -662,6 +663,11 @@ + { + return false; + } ++ ++static inline bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) ++{ ++ return false; ++} + + static inline bool is_module_text_address(unsigned long addr) + { +diff -Nur linux-4.9.22.orig/include/linux/mutex.h linux-4.9.22/include/linux/mutex.h +--- linux-4.9.22.orig/include/linux/mutex.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/mutex.h 2017-04-18 17:19:16.666772610 +0200 @@ -19,6 +19,17 @@ #include <asm/processor.h> #include <linux/osq_lock.h> @@ -7320,10 +7579,10 @@ diff -Nur linux-4.9.6.orig/include/linux/mutex.h linux-4.9.6/include/linux/mutex extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); #endif /* __LINUX_MUTEX_H */ -diff -Nur linux-4.9.6.orig/include/linux/mutex_rt.h linux-4.9.6/include/linux/mutex_rt.h ---- linux-4.9.6.orig/include/linux/mutex_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/mutex_rt.h 2017-01-28 13:59:09.939656496 +0100 -@@ -0,0 +1,84 @@ +diff -Nur linux-4.9.22.orig/include/linux/mutex_rt.h linux-4.9.22/include/linux/mutex_rt.h +--- linux-4.9.22.orig/include/linux/mutex_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/mutex_rt.h 2017-04-18 17:19:16.666772610 +0200 +@@ -0,0 +1,89 @@ +#ifndef __LINUX_MUTEX_RT_H +#define __LINUX_MUTEX_RT_H + @@ -7369,7 +7628,12 @@ diff -Nur linux-4.9.6.orig/include/linux/mutex_rt.h linux-4.9.6/include/linux/mu +#define mutex_lock_killable(l) _mutex_lock_killable(l) +#define mutex_trylock(l) _mutex_trylock(l) +#define mutex_unlock(l) _mutex_unlock(l) ++ ++#ifdef CONFIG_DEBUG_MUTEXES +#define mutex_destroy(l) rt_mutex_destroy(&(l)->lock) ++#else ++static inline void mutex_destroy(struct mutex *lock) {} ++#endif + +#ifdef CONFIG_DEBUG_LOCK_ALLOC +# define mutex_lock_nested(l, s) _mutex_lock_nested(l, s) @@ -7408,9 +7672,9 @@ diff -Nur linux-4.9.6.orig/include/linux/mutex_rt.h linux-4.9.6/include/linux/mu +} while (0) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/netdevice.h linux-4.9.6/include/linux/netdevice.h ---- linux-4.9.6.orig/include/linux/netdevice.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/netdevice.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/netdevice.h linux-4.9.22/include/linux/netdevice.h +--- linux-4.9.22.orig/include/linux/netdevice.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/netdevice.h 2017-04-18 17:19:16.666772610 +0200 @@ -396,7 +396,19 @@ typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb); @@ -7431,7 +7695,7 @@ diff -Nur linux-4.9.6.orig/include/linux/netdevice.h linux-4.9.6/include/linux/n static inline bool napi_disable_pending(struct napi_struct *n) { -@@ -2461,14 +2473,53 @@ +@@ -2463,14 +2475,53 @@ void synchronize_net(void); int init_dummy_netdev(struct net_device *dev); @@ -7486,7 +7750,7 @@ diff -Nur linux-4.9.6.orig/include/linux/netdevice.h linux-4.9.6/include/linux/n struct net_device *dev_get_by_index(struct net *net, int ifindex); struct net_device *__dev_get_by_index(struct net *net, int ifindex); struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); -@@ -2851,6 +2902,7 @@ +@@ -2855,6 +2906,7 @@ unsigned int dropped; struct sk_buff_head input_pkt_queue; struct napi_struct backlog; @@ -7494,9 +7758,9 @@ diff -Nur linux-4.9.6.orig/include/linux/netdevice.h linux-4.9.6/include/linux/n }; -diff -Nur linux-4.9.6.orig/include/linux/netfilter/x_tables.h linux-4.9.6/include/linux/netfilter/x_tables.h ---- linux-4.9.6.orig/include/linux/netfilter/x_tables.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/netfilter/x_tables.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/netfilter/x_tables.h linux-4.9.22/include/linux/netfilter/x_tables.h +--- linux-4.9.22.orig/include/linux/netfilter/x_tables.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/netfilter/x_tables.h 2017-04-18 17:19:16.666772610 +0200 @@ -4,6 +4,7 @@ #include <linux/netdevice.h> @@ -7532,9 +7796,9 @@ diff -Nur linux-4.9.6.orig/include/linux/netfilter/x_tables.h linux-4.9.6/includ } /* -diff -Nur linux-4.9.6.orig/include/linux/nfs_fs.h linux-4.9.6/include/linux/nfs_fs.h ---- linux-4.9.6.orig/include/linux/nfs_fs.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/nfs_fs.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/nfs_fs.h linux-4.9.22/include/linux/nfs_fs.h +--- linux-4.9.22.orig/include/linux/nfs_fs.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/nfs_fs.h 2017-04-18 17:19:16.666772610 +0200 @@ -165,7 +165,11 @@ /* Readers: in-flight sillydelete RPC calls */ @@ -7547,9 +7811,9 @@ diff -Nur linux-4.9.6.orig/include/linux/nfs_fs.h linux-4.9.6/include/linux/nfs_ #if IS_ENABLED(CONFIG_NFS_V4) struct nfs4_cached_acl *nfs4_acl; -diff -Nur linux-4.9.6.orig/include/linux/nfs_xdr.h linux-4.9.6/include/linux/nfs_xdr.h ---- linux-4.9.6.orig/include/linux/nfs_xdr.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/nfs_xdr.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/nfs_xdr.h linux-4.9.22/include/linux/nfs_xdr.h +--- linux-4.9.22.orig/include/linux/nfs_xdr.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/nfs_xdr.h 2017-04-18 17:19:16.670772765 +0200 @@ -1490,7 +1490,7 @@ struct nfs_removeargs args; struct nfs_removeres res; @@ -7559,9 +7823,9 @@ diff -Nur linux-4.9.6.orig/include/linux/nfs_xdr.h linux-4.9.6/include/linux/nfs struct rpc_cred *cred; struct nfs_fattr dir_attr; long timeout; -diff -Nur linux-4.9.6.orig/include/linux/notifier.h linux-4.9.6/include/linux/notifier.h ---- linux-4.9.6.orig/include/linux/notifier.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/notifier.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/notifier.h linux-4.9.22/include/linux/notifier.h +--- linux-4.9.22.orig/include/linux/notifier.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/notifier.h 2017-04-18 17:19:16.670772765 +0200 @@ -6,7 +6,7 @@ * * Alan Cox <Alan.Cox@linux.org> @@ -7641,9 +7905,9 @@ diff -Nur linux-4.9.6.orig/include/linux/notifier.h linux-4.9.6/include/linux/no /* CPU notfiers are defined in include/linux/cpu.h. */ /* netdevice notifiers are defined in include/linux/netdevice.h */ -diff -Nur linux-4.9.6.orig/include/linux/percpu.h linux-4.9.6/include/linux/percpu.h ---- linux-4.9.6.orig/include/linux/percpu.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/percpu.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/percpu.h linux-4.9.22/include/linux/percpu.h +--- linux-4.9.22.orig/include/linux/percpu.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/percpu.h 2017-04-18 17:19:16.670772765 +0200 @@ -18,6 +18,35 @@ #define PERCPU_MODULE_RESERVE 0 #endif @@ -7680,9 +7944,17 @@ diff -Nur linux-4.9.6.orig/include/linux/percpu.h linux-4.9.6/include/linux/perc /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) -diff -Nur linux-4.9.6.orig/include/linux/percpu-rwsem.h linux-4.9.6/include/linux/percpu-rwsem.h ---- linux-4.9.6.orig/include/linux/percpu-rwsem.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/percpu-rwsem.h 2017-01-28 13:59:09.939656496 +0100 +@@ -110,6 +139,7 @@ + #endif + + extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); ++extern bool __is_kernel_percpu_address(unsigned long addr, unsigned long *can_addr); + extern bool is_kernel_percpu_address(unsigned long addr); + + #if !defined(CONFIG_SMP) || !defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) +diff -Nur linux-4.9.22.orig/include/linux/percpu-rwsem.h linux-4.9.22/include/linux/percpu-rwsem.h +--- linux-4.9.22.orig/include/linux/percpu-rwsem.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/percpu-rwsem.h 2017-04-18 17:19:16.670772765 +0200 @@ -4,7 +4,7 @@ #include <linux/atomic.h> #include <linux/rwsem.h> @@ -7764,9 +8036,9 @@ diff -Nur linux-4.9.6.orig/include/linux/percpu-rwsem.h linux-4.9.6/include/linu extern void percpu_down_write(struct percpu_rw_semaphore *); extern void percpu_up_write(struct percpu_rw_semaphore *); -diff -Nur linux-4.9.6.orig/include/linux/pid.h linux-4.9.6/include/linux/pid.h ---- linux-4.9.6.orig/include/linux/pid.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/pid.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/pid.h linux-4.9.22/include/linux/pid.h +--- linux-4.9.22.orig/include/linux/pid.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/pid.h 2017-04-18 17:19:16.670772765 +0200 @@ -2,6 +2,7 @@ #define _LINUX_PID_H @@ -7775,9 +8047,9 @@ diff -Nur linux-4.9.6.orig/include/linux/pid.h linux-4.9.6/include/linux/pid.h enum pid_type { -diff -Nur linux-4.9.6.orig/include/linux/preempt.h linux-4.9.6/include/linux/preempt.h ---- linux-4.9.6.orig/include/linux/preempt.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/preempt.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/preempt.h linux-4.9.22/include/linux/preempt.h +--- linux-4.9.22.orig/include/linux/preempt.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/preempt.h 2017-04-18 17:19:16.670772765 +0200 @@ -50,7 +50,11 @@ #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) #define NMI_OFFSET (1UL << NMI_SHIFT) @@ -7931,9 +8203,9 @@ diff -Nur linux-4.9.6.orig/include/linux/preempt.h linux-4.9.6/include/linux/pre #ifdef CONFIG_PREEMPT_NOTIFIERS struct preempt_notifier; -diff -Nur linux-4.9.6.orig/include/linux/printk.h linux-4.9.6/include/linux/printk.h ---- linux-4.9.6.orig/include/linux/printk.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/printk.h 2017-01-28 13:59:09.939656496 +0100 +diff -Nur linux-4.9.22.orig/include/linux/printk.h linux-4.9.22/include/linux/printk.h +--- linux-4.9.22.orig/include/linux/printk.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/printk.h 2017-04-18 17:19:16.670772765 +0200 @@ -126,9 +126,11 @@ #ifdef CONFIG_EARLY_PRINTK extern asmlinkage __printf(1, 2) @@ -7946,41 +8218,33 @@ diff -Nur linux-4.9.6.orig/include/linux/printk.h linux-4.9.6/include/linux/prin #endif #ifdef CONFIG_PRINTK_NMI -diff -Nur linux-4.9.6.orig/include/linux/radix-tree.h linux-4.9.6/include/linux/radix-tree.h ---- linux-4.9.6.orig/include/linux/radix-tree.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/radix-tree.h 2017-01-28 13:59:09.939656496 +0100 -@@ -289,9 +289,19 @@ - unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root, - void ***results, unsigned long *indices, - unsigned long first_index, unsigned int max_items); -+#ifdef CONFIG_PREEMPT_RT_FULL -+static inline int radix_tree_preload(gfp_t gm) { return 0; } -+static inline int radix_tree_maybe_preload(gfp_t gfp_mask) { return 0; } -+static inline int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order) -+{ -+ return 0; -+}; -+ -+#else +diff -Nur linux-4.9.22.orig/include/linux/radix-tree.h linux-4.9.22/include/linux/radix-tree.h +--- linux-4.9.22.orig/include/linux/radix-tree.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/radix-tree.h 2017-04-18 17:19:16.670772765 +0200 +@@ -292,6 +292,8 @@ int radix_tree_preload(gfp_t gfp_mask); int radix_tree_maybe_preload(gfp_t gfp_mask); int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order); -+#endif ++void radix_tree_preload_end(void); ++ void radix_tree_init(void); void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag); -@@ -316,7 +326,7 @@ +@@ -314,11 +316,6 @@ + int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); + unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item); - static inline void radix_tree_preload_end(void) - { +-static inline void radix_tree_preload_end(void) +-{ - preempt_enable(); -+ preempt_enable_nort(); - } - +-} +- /** -diff -Nur linux-4.9.6.orig/include/linux/random.h linux-4.9.6/include/linux/random.h ---- linux-4.9.6.orig/include/linux/random.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/random.h 2017-01-28 13:59:09.943656649 +0100 + * struct radix_tree_iter - radix tree iterator state + * +diff -Nur linux-4.9.22.orig/include/linux/random.h linux-4.9.22/include/linux/random.h +--- linux-4.9.22.orig/include/linux/random.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/random.h 2017-04-18 17:19:16.670772765 +0200 @@ -31,7 +31,7 @@ extern void add_input_randomness(unsigned int type, unsigned int code, @@ -7990,9 +8254,9 @@ diff -Nur linux-4.9.6.orig/include/linux/random.h linux-4.9.6/include/linux/rand extern void get_random_bytes(void *buf, int nbytes); extern int add_random_ready_callback(struct random_ready_callback *rdy); -diff -Nur linux-4.9.6.orig/include/linux/rbtree_augmented.h linux-4.9.6/include/linux/rbtree_augmented.h ---- linux-4.9.6.orig/include/linux/rbtree_augmented.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rbtree_augmented.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rbtree_augmented.h linux-4.9.22/include/linux/rbtree_augmented.h +--- linux-4.9.22.orig/include/linux/rbtree_augmented.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rbtree_augmented.h 2017-04-18 17:19:16.670772765 +0200 @@ -26,6 +26,7 @@ #include <linux/compiler.h> @@ -8001,9 +8265,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rbtree_augmented.h linux-4.9.6/include/ /* * Please note - only struct rb_augment_callbacks and the prototypes for -diff -Nur linux-4.9.6.orig/include/linux/rbtree.h linux-4.9.6/include/linux/rbtree.h ---- linux-4.9.6.orig/include/linux/rbtree.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rbtree.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rbtree.h linux-4.9.22/include/linux/rbtree.h +--- linux-4.9.22.orig/include/linux/rbtree.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rbtree.h 2017-04-18 17:19:16.670772765 +0200 @@ -31,7 +31,7 @@ #include <linux/kernel.h> @@ -8013,9 +8277,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rbtree.h linux-4.9.6/include/linux/rbtr struct rb_node { unsigned long __rb_parent_color; -diff -Nur linux-4.9.6.orig/include/linux/rcu_assign_pointer.h linux-4.9.6/include/linux/rcu_assign_pointer.h ---- linux-4.9.6.orig/include/linux/rcu_assign_pointer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/rcu_assign_pointer.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rcu_assign_pointer.h linux-4.9.22/include/linux/rcu_assign_pointer.h +--- linux-4.9.22.orig/include/linux/rcu_assign_pointer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/rcu_assign_pointer.h 2017-04-18 17:19:16.670772765 +0200 @@ -0,0 +1,54 @@ +#ifndef __LINUX_RCU_ASSIGN_POINTER_H__ +#define __LINUX_RCU_ASSIGN_POINTER_H__ @@ -8071,9 +8335,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rcu_assign_pointer.h linux-4.9.6/includ +}) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/rcupdate.h linux-4.9.6/include/linux/rcupdate.h ---- linux-4.9.6.orig/include/linux/rcupdate.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rcupdate.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rcupdate.h linux-4.9.22/include/linux/rcupdate.h +--- linux-4.9.22.orig/include/linux/rcupdate.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rcupdate.h 2017-04-18 17:19:16.670772765 +0200 @@ -46,6 +46,7 @@ #include <linux/compiler.h> #include <linux/ktime.h> @@ -8221,9 +8485,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rcupdate.h linux-4.9.6/include/linux/rc local_bh_enable(); } -diff -Nur linux-4.9.6.orig/include/linux/rcutree.h linux-4.9.6/include/linux/rcutree.h ---- linux-4.9.6.orig/include/linux/rcutree.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rcutree.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rcutree.h linux-4.9.22/include/linux/rcutree.h +--- linux-4.9.22.orig/include/linux/rcutree.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rcutree.h 2017-04-18 17:19:16.670772765 +0200 @@ -44,7 +44,11 @@ rcu_note_context_switch(); } @@ -8283,9 +8547,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rcutree.h linux-4.9.6/include/linux/rcu void rcu_all_qs(void); /* RCUtree hotplug events */ -diff -Nur linux-4.9.6.orig/include/linux/rtmutex.h linux-4.9.6/include/linux/rtmutex.h ---- linux-4.9.6.orig/include/linux/rtmutex.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rtmutex.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rtmutex.h linux-4.9.22/include/linux/rtmutex.h +--- linux-4.9.22.orig/include/linux/rtmutex.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rtmutex.h 2017-04-18 17:19:16.670772765 +0200 @@ -13,11 +13,15 @@ #define __LINUX_RT_MUTEX_H @@ -8352,17 +8616,19 @@ diff -Nur linux-4.9.6.orig/include/linux/rtmutex.h linux-4.9.6/include/linux/rtm #define DEFINE_RT_MUTEX(mutexname) \ struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) -@@ -91,6 +106,7 @@ +@@ -90,7 +105,9 @@ + extern void rt_mutex_destroy(struct rt_mutex *lock); extern void rt_mutex_lock(struct rt_mutex *lock); ++extern int rt_mutex_lock_state(struct rt_mutex *lock, int state); extern int rt_mutex_lock_interruptible(struct rt_mutex *lock); +extern int rt_mutex_lock_killable(struct rt_mutex *lock); extern int rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout); -diff -Nur linux-4.9.6.orig/include/linux/rwlock_rt.h linux-4.9.6/include/linux/rwlock_rt.h ---- linux-4.9.6.orig/include/linux/rwlock_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/rwlock_rt.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rwlock_rt.h linux-4.9.22/include/linux/rwlock_rt.h +--- linux-4.9.22.orig/include/linux/rwlock_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/rwlock_rt.h 2017-04-18 17:19:16.670772765 +0200 @@ -0,0 +1,99 @@ +#ifndef __LINUX_RWLOCK_RT_H +#define __LINUX_RWLOCK_RT_H @@ -8463,9 +8729,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rwlock_rt.h linux-4.9.6/include/linux/r + } while (0) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/rwlock_types.h linux-4.9.6/include/linux/rwlock_types.h ---- linux-4.9.6.orig/include/linux/rwlock_types.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rwlock_types.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rwlock_types.h linux-4.9.22/include/linux/rwlock_types.h +--- linux-4.9.22.orig/include/linux/rwlock_types.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rwlock_types.h 2017-04-18 17:19:16.670772765 +0200 @@ -1,6 +1,10 @@ #ifndef __LINUX_RWLOCK_TYPES_H #define __LINUX_RWLOCK_TYPES_H @@ -8477,9 +8743,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rwlock_types.h linux-4.9.6/include/linu /* * include/linux/rwlock_types.h - generic rwlock type definitions * and initializers -diff -Nur linux-4.9.6.orig/include/linux/rwlock_types_rt.h linux-4.9.6/include/linux/rwlock_types_rt.h ---- linux-4.9.6.orig/include/linux/rwlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/rwlock_types_rt.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rwlock_types_rt.h linux-4.9.22/include/linux/rwlock_types_rt.h +--- linux-4.9.22.orig/include/linux/rwlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/rwlock_types_rt.h 2017-04-18 17:19:16.670772765 +0200 @@ -0,0 +1,33 @@ +#ifndef __LINUX_RWLOCK_TYPES_RT_H +#define __LINUX_RWLOCK_TYPES_RT_H @@ -8514,9 +8780,9 @@ diff -Nur linux-4.9.6.orig/include/linux/rwlock_types_rt.h linux-4.9.6/include/l + rwlock_t name = __RW_LOCK_UNLOCKED(name) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/rwsem.h linux-4.9.6/include/linux/rwsem.h ---- linux-4.9.6.orig/include/linux/rwsem.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/rwsem.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/rwsem.h linux-4.9.22/include/linux/rwsem.h +--- linux-4.9.22.orig/include/linux/rwsem.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/rwsem.h 2017-04-18 17:19:16.670772765 +0200 @@ -19,6 +19,10 @@ #include <linux/osq_lock.h> #endif @@ -8528,17 +8794,24 @@ diff -Nur linux-4.9.6.orig/include/linux/rwsem.h linux-4.9.6/include/linux/rwsem struct rw_semaphore; #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK -@@ -184,4 +188,6 @@ - # define up_read_non_owner(sem) up_read(sem) - #endif +@@ -106,6 +110,13 @@ + return !list_empty(&sem->wait_list); + } +#endif /* !PREEMPT_RT_FULL */ + - #endif /* _LINUX_RWSEM_H */ -diff -Nur linux-4.9.6.orig/include/linux/rwsem_rt.h linux-4.9.6/include/linux/rwsem_rt.h ---- linux-4.9.6.orig/include/linux/rwsem_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/rwsem_rt.h 2017-01-28 13:59:09.943656649 +0100 -@@ -0,0 +1,167 @@ ++/* ++ * The functions below are the same for all rwsem implementations including ++ * the RT specific variant. ++ */ ++ + /* + * lock for reading + */ +diff -Nur linux-4.9.22.orig/include/linux/rwsem_rt.h linux-4.9.22/include/linux/rwsem_rt.h +--- linux-4.9.22.orig/include/linux/rwsem_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/rwsem_rt.h 2017-04-18 17:19:16.670772765 +0200 +@@ -0,0 +1,67 @@ +#ifndef _LINUX_RWSEM_RT_H +#define _LINUX_RWSEM_RT_H + @@ -8546,169 +8819,69 @@ diff -Nur linux-4.9.6.orig/include/linux/rwsem_rt.h linux-4.9.6/include/linux/rw +#error "Include rwsem.h" +#endif + -+/* -+ * RW-semaphores are a spinlock plus a reader-depth count. -+ * -+ * Note that the semantics are different from the usual -+ * Linux rw-sems, in PREEMPT_RT mode we do not allow -+ * multiple readers to hold the lock at once, we only allow -+ * a read-lock owner to read-lock recursively. This is -+ * better for latency, makes the implementation inherently -+ * fair and makes it simpler as well. -+ */ -+ +#include <linux/rtmutex.h> ++#include <linux/swait.h> ++ ++#define READER_BIAS (1U << 31) ++#define WRITER_BIAS (1U << 30) + +struct rw_semaphore { -+ struct rt_mutex lock; -+ int read_depth; ++ atomic_t readers; ++ struct rt_mutex rtmutex; +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; +#endif +}; + -+#define __RWSEM_INITIALIZER(name) \ -+ { .lock = __RT_MUTEX_INITIALIZER(name.lock), \ -+ RW_DEP_MAP_INIT(name) } ++#define __RWSEM_INITIALIZER(name) \ ++{ \ ++ .readers = ATOMIC_INIT(READER_BIAS), \ ++ .rtmutex = __RT_MUTEX_INITIALIZER(name.rtmutex), \ ++ RW_DEP_MAP_INIT(name) \ ++} + +#define DECLARE_RWSEM(lockname) \ + struct rw_semaphore lockname = __RWSEM_INITIALIZER(lockname) + -+extern void __rt_rwsem_init(struct rw_semaphore *rwsem, const char *name, -+ struct lock_class_key *key); ++extern void __rwsem_init(struct rw_semaphore *rwsem, const char *name, ++ struct lock_class_key *key); + -+#define __rt_init_rwsem(sem, name, key) \ -+ do { \ -+ rt_mutex_init(&(sem)->lock); \ -+ __rt_rwsem_init((sem), (name), (key));\ -+ } while (0) -+ -+#define __init_rwsem(sem, name, key) __rt_init_rwsem(sem, name, key) ++#define __init_rwsem(sem, name, key) \ ++do { \ ++ rt_mutex_init(&(sem)->rtmutex); \ ++ __rwsem_init((sem), (name), (key)); \ ++} while (0) + -+# define rt_init_rwsem(sem) \ ++#define init_rwsem(sem) \ +do { \ + static struct lock_class_key __key; \ + \ -+ __rt_init_rwsem((sem), #sem, &__key); \ ++ __init_rwsem((sem), #sem, &__key); \ +} while (0) + -+extern void rt_down_write(struct rw_semaphore *rwsem); -+extern int rt_down_write_killable(struct rw_semaphore *rwsem); -+extern void rt_down_read_nested(struct rw_semaphore *rwsem, int subclass); -+extern void rt_down_write_nested(struct rw_semaphore *rwsem, int subclass); -+extern int rt_down_write_killable_nested(struct rw_semaphore *rwsem, -+ int subclass); -+extern void rt_down_write_nested_lock(struct rw_semaphore *rwsem, -+ struct lockdep_map *nest); -+extern void rt__down_read(struct rw_semaphore *rwsem); -+extern void rt_down_read(struct rw_semaphore *rwsem); -+extern int rt_down_write_trylock(struct rw_semaphore *rwsem); -+extern int rt__down_read_trylock(struct rw_semaphore *rwsem); -+extern int rt_down_read_trylock(struct rw_semaphore *rwsem); -+extern void __rt_up_read(struct rw_semaphore *rwsem); -+extern void rt_up_read(struct rw_semaphore *rwsem); -+extern void rt_up_write(struct rw_semaphore *rwsem); -+extern void rt_downgrade_write(struct rw_semaphore *rwsem); -+ -+#define init_rwsem(sem) rt_init_rwsem(sem) -+#define rwsem_is_locked(s) rt_mutex_is_locked(&(s)->lock) -+ -+static inline int rwsem_is_contended(struct rw_semaphore *sem) -+{ -+ /* rt_mutex_has_waiters() */ -+ return !RB_EMPTY_ROOT(&sem->lock.waiters); -+} -+ -+static inline void __down_read(struct rw_semaphore *sem) -+{ -+ rt__down_read(sem); -+} -+ -+static inline void down_read(struct rw_semaphore *sem) -+{ -+ rt_down_read(sem); -+} -+ -+static inline int __down_read_trylock(struct rw_semaphore *sem) -+{ -+ return rt__down_read_trylock(sem); -+} -+ -+static inline int down_read_trylock(struct rw_semaphore *sem) -+{ -+ return rt_down_read_trylock(sem); -+} -+ -+static inline void down_write(struct rw_semaphore *sem) -+{ -+ rt_down_write(sem); -+} -+ -+static inline int down_write_killable(struct rw_semaphore *sem) ++static inline int rwsem_is_locked(struct rw_semaphore *sem) +{ -+ return rt_down_write_killable(sem); ++ return atomic_read(&sem->readers) != READER_BIAS; +} + -+static inline int down_write_trylock(struct rw_semaphore *sem) -+{ -+ return rt_down_write_trylock(sem); -+} -+ -+static inline void __up_read(struct rw_semaphore *sem) -+{ -+ __rt_up_read(sem); -+} -+ -+static inline void up_read(struct rw_semaphore *sem) -+{ -+ rt_up_read(sem); -+} -+ -+static inline void up_write(struct rw_semaphore *sem) -+{ -+ rt_up_write(sem); -+} -+ -+static inline void downgrade_write(struct rw_semaphore *sem) -+{ -+ rt_downgrade_write(sem); -+} -+ -+static inline void down_read_nested(struct rw_semaphore *sem, int subclass) -+{ -+ return rt_down_read_nested(sem, subclass); -+} -+ -+static inline void down_write_nested(struct rw_semaphore *sem, int subclass) -+{ -+ rt_down_write_nested(sem, subclass); -+} -+ -+static inline int down_write_killable_nested(struct rw_semaphore *sem, -+ int subclass) -+{ -+ return rt_down_write_killable_nested(sem, subclass); -+} -+ -+#ifdef CONFIG_DEBUG_LOCK_ALLOC -+static inline void down_write_nest_lock(struct rw_semaphore *sem, -+ struct rw_semaphore *nest_lock) ++static inline int rwsem_is_contended(struct rw_semaphore *sem) +{ -+ rt_down_write_nested_lock(sem, &nest_lock->dep_map); ++ return atomic_read(&sem->readers) > 0; +} + -+#else ++extern void __down_read(struct rw_semaphore *sem); ++extern int __down_read_trylock(struct rw_semaphore *sem); ++extern void __down_write(struct rw_semaphore *sem); ++extern int __must_check __down_write_killable(struct rw_semaphore *sem); ++extern int __down_write_trylock(struct rw_semaphore *sem); ++extern void __up_read(struct rw_semaphore *sem); ++extern void __up_write(struct rw_semaphore *sem); ++extern void __downgrade_write(struct rw_semaphore *sem); + -+static inline void down_write_nest_lock(struct rw_semaphore *sem, -+ struct rw_semaphore *nest_lock) -+{ -+ rt_down_write_nested_lock(sem, NULL); -+} -+#endif +#endif -diff -Nur linux-4.9.6.orig/include/linux/sched.h linux-4.9.6/include/linux/sched.h ---- linux-4.9.6.orig/include/linux/sched.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/sched.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/sched.h linux-4.9.22/include/linux/sched.h +--- linux-4.9.22.orig/include/linux/sched.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/sched.h 2017-04-18 17:19:16.670772765 +0200 @@ -26,6 +26,7 @@ #include <linux/nodemask.h> #include <linux/mm_types.h> @@ -9084,9 +9257,9 @@ diff -Nur linux-4.9.6.orig/include/linux/sched.h linux-4.9.6/include/linux/sched extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); extern long sched_getaffinity(pid_t pid, struct cpumask *mask); -diff -Nur linux-4.9.6.orig/include/linux/seqlock.h linux-4.9.6/include/linux/seqlock.h ---- linux-4.9.6.orig/include/linux/seqlock.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/seqlock.h 2017-01-28 13:59:09.943656649 +0100 +diff -Nur linux-4.9.22.orig/include/linux/seqlock.h linux-4.9.22/include/linux/seqlock.h +--- linux-4.9.22.orig/include/linux/seqlock.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/seqlock.h 2017-04-18 17:19:16.670772765 +0200 @@ -220,20 +220,30 @@ return __read_seqcount_retry(s, start); } @@ -9225,9 +9398,9 @@ diff -Nur linux-4.9.6.orig/include/linux/seqlock.h linux-4.9.6/include/linux/seq spin_unlock_irqrestore(&sl->lock, flags); } -diff -Nur linux-4.9.6.orig/include/linux/signal.h linux-4.9.6/include/linux/signal.h ---- linux-4.9.6.orig/include/linux/signal.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/signal.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/signal.h linux-4.9.22/include/linux/signal.h +--- linux-4.9.22.orig/include/linux/signal.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/signal.h 2017-04-18 17:19:16.670772765 +0200 @@ -233,6 +233,7 @@ } @@ -9236,9 +9409,9 @@ diff -Nur linux-4.9.6.orig/include/linux/signal.h linux-4.9.6/include/linux/sign /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ static inline int valid_signal(unsigned long sig) -diff -Nur linux-4.9.6.orig/include/linux/skbuff.h linux-4.9.6/include/linux/skbuff.h ---- linux-4.9.6.orig/include/linux/skbuff.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/skbuff.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/skbuff.h linux-4.9.22/include/linux/skbuff.h +--- linux-4.9.22.orig/include/linux/skbuff.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/skbuff.h 2017-04-18 17:19:16.674772920 +0200 @@ -284,6 +284,7 @@ __u32 qlen; @@ -9260,10 +9433,36 @@ diff -Nur linux-4.9.6.orig/include/linux/skbuff.h linux-4.9.6/include/linux/skbu static inline void skb_queue_head_init_class(struct sk_buff_head *list, struct lock_class_key *class) { -diff -Nur linux-4.9.6.orig/include/linux/smp.h linux-4.9.6/include/linux/smp.h ---- linux-4.9.6.orig/include/linux/smp.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/smp.h 2017-01-28 13:59:09.947656802 +0100 -@@ -185,6 +185,9 @@ +diff -Nur linux-4.9.22.orig/include/linux/smp.h linux-4.9.22/include/linux/smp.h +--- linux-4.9.22.orig/include/linux/smp.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/smp.h 2017-04-18 17:19:16.674772920 +0200 +@@ -120,6 +120,13 @@ + extern void __init setup_nr_cpu_ids(void); + extern void __init smp_init(void); + ++extern int __boot_cpu_id; ++ ++static inline int get_boot_cpu_id(void) ++{ ++ return __boot_cpu_id; ++} ++ + #else /* !SMP */ + + static inline void smp_send_stop(void) { } +@@ -158,6 +165,11 @@ + static inline void smp_init(void) { } + #endif + ++static inline int get_boot_cpu_id(void) ++{ ++ return 0; ++} ++ + #endif /* !SMP */ + + /* +@@ -185,6 +197,9 @@ #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) #define put_cpu() preempt_enable() @@ -9273,9 +9472,9 @@ diff -Nur linux-4.9.6.orig/include/linux/smp.h linux-4.9.6/include/linux/smp.h /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: -diff -Nur linux-4.9.6.orig/include/linux/spinlock_api_smp.h linux-4.9.6/include/linux/spinlock_api_smp.h ---- linux-4.9.6.orig/include/linux/spinlock_api_smp.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_api_smp.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock_api_smp.h linux-4.9.22/include/linux/spinlock_api_smp.h +--- linux-4.9.22.orig/include/linux/spinlock_api_smp.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/spinlock_api_smp.h 2017-04-18 17:19:16.674772920 +0200 @@ -189,6 +189,8 @@ return 0; } @@ -9286,9 +9485,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_api_smp.h linux-4.9.6/include/ +#endif #endif /* __LINUX_SPINLOCK_API_SMP_H */ -diff -Nur linux-4.9.6.orig/include/linux/spinlock.h linux-4.9.6/include/linux/spinlock.h ---- linux-4.9.6.orig/include/linux/spinlock.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock.h linux-4.9.22/include/linux/spinlock.h +--- linux-4.9.22.orig/include/linux/spinlock.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/spinlock.h 2017-04-18 17:19:16.674772920 +0200 @@ -271,7 +271,11 @@ #define raw_spin_can_lock(lock) (!raw_spin_is_locked(lock)) @@ -9313,30 +9512,17 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock.h linux-4.9.6/include/linux/sp /* * Map the spin_lock functions to the raw variants for PREEMPT_RT=n */ -@@ -347,6 +355,12 @@ - raw_spin_unlock(&lock->rlock); - } - -+static __always_inline int spin_unlock_no_deboost(spinlock_t *lock) -+{ -+ raw_spin_unlock(&lock->rlock); -+ return 0; -+} -+ - static __always_inline void spin_unlock_bh(spinlock_t *lock) - { - raw_spin_unlock_bh(&lock->rlock); -@@ -416,4 +430,6 @@ +@@ -416,4 +424,6 @@ #define atomic_dec_and_lock(atomic, lock) \ __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) +#endif /* !PREEMPT_RT_FULL */ + #endif /* __LINUX_SPINLOCK_H */ -diff -Nur linux-4.9.6.orig/include/linux/spinlock_rt.h linux-4.9.6/include/linux/spinlock_rt.h ---- linux-4.9.6.orig/include/linux/spinlock_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_rt.h 2017-01-28 13:59:09.947656802 +0100 -@@ -0,0 +1,164 @@ +diff -Nur linux-4.9.22.orig/include/linux/spinlock_rt.h linux-4.9.22/include/linux/spinlock_rt.h +--- linux-4.9.22.orig/include/linux/spinlock_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/spinlock_rt.h 2017-04-18 17:19:16.674772920 +0200 +@@ -0,0 +1,162 @@ +#ifndef __LINUX_SPINLOCK_RT_H +#define __LINUX_SPINLOCK_RT_H + @@ -9365,7 +9551,6 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_rt.h linux-4.9.6/include/linux +extern unsigned long __lockfunc rt_spin_lock_trace_flags(spinlock_t *lock); +extern void __lockfunc rt_spin_lock_nested(spinlock_t *lock, int subclass); +extern void __lockfunc rt_spin_unlock(spinlock_t *lock); -+extern int __lockfunc rt_spin_unlock_no_deboost(spinlock_t *lock); +extern void __lockfunc rt_spin_unlock_wait(spinlock_t *lock); +extern int __lockfunc rt_spin_trylock_irqsave(spinlock_t *lock, unsigned long *flags); +extern int __lockfunc rt_spin_trylock_bh(spinlock_t *lock); @@ -9451,7 +9636,6 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_rt.h linux-4.9.6/include/linux +#define spin_lock_nest_lock(lock, nest_lock) spin_lock_nested(lock, 0) + +#define spin_unlock(lock) rt_spin_unlock(lock) -+#define spin_unlock_no_deboost(lock) rt_spin_unlock_no_deboost(lock) + +#define spin_unlock_bh(lock) \ + do { \ @@ -9501,9 +9685,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_rt.h linux-4.9.6/include/linux + atomic_dec_and_spin_lock(atomic, lock) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/spinlock_types.h linux-4.9.6/include/linux/spinlock_types.h ---- linux-4.9.6.orig/include/linux/spinlock_types.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_types.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock_types.h linux-4.9.22/include/linux/spinlock_types.h +--- linux-4.9.22.orig/include/linux/spinlock_types.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/spinlock_types.h 2017-04-18 17:19:16.674772920 +0200 @@ -9,80 +9,15 @@ * Released under the General Public License (GPL). */ @@ -9592,9 +9776,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_types.h linux-4.9.6/include/li -#include <linux/rwlock_types.h> - #endif /* __LINUX_SPINLOCK_TYPES_H */ -diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_nort.h linux-4.9.6/include/linux/spinlock_types_nort.h ---- linux-4.9.6.orig/include/linux/spinlock_types_nort.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_types_nort.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock_types_nort.h linux-4.9.22/include/linux/spinlock_types_nort.h +--- linux-4.9.22.orig/include/linux/spinlock_types_nort.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/spinlock_types_nort.h 2017-04-18 17:19:16.674772920 +0200 @@ -0,0 +1,33 @@ +#ifndef __LINUX_SPINLOCK_TYPES_NORT_H +#define __LINUX_SPINLOCK_TYPES_NORT_H @@ -9629,9 +9813,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_nort.h linux-4.9.6/inclu +#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_raw.h linux-4.9.6/include/linux/spinlock_types_raw.h ---- linux-4.9.6.orig/include/linux/spinlock_types_raw.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_types_raw.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock_types_raw.h linux-4.9.22/include/linux/spinlock_types_raw.h +--- linux-4.9.22.orig/include/linux/spinlock_types_raw.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/spinlock_types_raw.h 2017-04-18 17:19:16.674772920 +0200 @@ -0,0 +1,56 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RAW_H +#define __LINUX_SPINLOCK_TYPES_RAW_H @@ -9689,9 +9873,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_raw.h linux-4.9.6/includ +#define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_rt.h linux-4.9.6/include/linux/spinlock_types_rt.h ---- linux-4.9.6.orig/include/linux/spinlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/spinlock_types_rt.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/spinlock_types_rt.h linux-4.9.22/include/linux/spinlock_types_rt.h +--- linux-4.9.22.orig/include/linux/spinlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/spinlock_types_rt.h 2017-04-18 17:19:16.674772920 +0200 @@ -0,0 +1,48 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RT_H +#define __LINUX_SPINLOCK_TYPES_RT_H @@ -9741,9 +9925,9 @@ diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_rt.h linux-4.9.6/include + spinlock_t name = __SPIN_LOCK_UNLOCKED(name) + +#endif -diff -Nur linux-4.9.6.orig/include/linux/srcu.h linux-4.9.6/include/linux/srcu.h ---- linux-4.9.6.orig/include/linux/srcu.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/srcu.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/srcu.h linux-4.9.22/include/linux/srcu.h +--- linux-4.9.22.orig/include/linux/srcu.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/srcu.h 2017-04-18 17:19:16.674772920 +0200 @@ -84,10 +84,10 @@ void process_srcu(struct work_struct *work); @@ -9766,9 +9950,9 @@ diff -Nur linux-4.9.6.orig/include/linux/srcu.h linux-4.9.6/include/linux/srcu.h #define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */) #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static) -diff -Nur linux-4.9.6.orig/include/linux/suspend.h linux-4.9.6/include/linux/suspend.h ---- linux-4.9.6.orig/include/linux/suspend.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/suspend.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/suspend.h linux-4.9.22/include/linux/suspend.h +--- linux-4.9.22.orig/include/linux/suspend.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/suspend.h 2017-04-18 17:19:16.674772920 +0200 @@ -193,6 +193,12 @@ void (*end)(void); }; @@ -9782,9 +9966,9 @@ diff -Nur linux-4.9.6.orig/include/linux/suspend.h linux-4.9.6/include/linux/sus #ifdef CONFIG_SUSPEND /** * suspend_set_ops - set platform dependent suspend operations -diff -Nur linux-4.9.6.orig/include/linux/swait.h linux-4.9.6/include/linux/swait.h ---- linux-4.9.6.orig/include/linux/swait.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/swait.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/swait.h linux-4.9.22/include/linux/swait.h +--- linux-4.9.22.orig/include/linux/swait.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/swait.h 2017-04-18 17:19:16.674772920 +0200 @@ -87,6 +87,7 @@ extern void swake_up(struct swait_queue_head *q); extern void swake_up_all(struct swait_queue_head *q); @@ -9793,9 +9977,9 @@ diff -Nur linux-4.9.6.orig/include/linux/swait.h linux-4.9.6/include/linux/swait extern void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait); extern void prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait, int state); -diff -Nur linux-4.9.6.orig/include/linux/swap.h linux-4.9.6/include/linux/swap.h ---- linux-4.9.6.orig/include/linux/swap.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/swap.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/swap.h linux-4.9.22/include/linux/swap.h +--- linux-4.9.22.orig/include/linux/swap.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/swap.h 2017-04-18 17:19:16.674772920 +0200 @@ -11,6 +11,7 @@ #include <linux/fs.h> #include <linux/atomic.h> @@ -9822,9 +10006,9 @@ diff -Nur linux-4.9.6.orig/include/linux/swap.h linux-4.9.6/include/linux/swap.h extern void lru_cache_add(struct page *); extern void lru_cache_add_anon(struct page *page); extern void lru_cache_add_file(struct page *page); -diff -Nur linux-4.9.6.orig/include/linux/swork.h linux-4.9.6/include/linux/swork.h ---- linux-4.9.6.orig/include/linux/swork.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/linux/swork.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/swork.h linux-4.9.22/include/linux/swork.h +--- linux-4.9.22.orig/include/linux/swork.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/linux/swork.h 2017-04-18 17:19:16.674772920 +0200 @@ -0,0 +1,24 @@ +#ifndef _LINUX_SWORK_H +#define _LINUX_SWORK_H @@ -9850,9 +10034,9 @@ diff -Nur linux-4.9.6.orig/include/linux/swork.h linux-4.9.6/include/linux/swork +void swork_put(void); + +#endif /* _LINUX_SWORK_H */ -diff -Nur linux-4.9.6.orig/include/linux/thread_info.h linux-4.9.6/include/linux/thread_info.h ---- linux-4.9.6.orig/include/linux/thread_info.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/thread_info.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/thread_info.h linux-4.9.22/include/linux/thread_info.h +--- linux-4.9.22.orig/include/linux/thread_info.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/thread_info.h 2017-04-18 17:19:16.678773075 +0200 @@ -107,7 +107,17 @@ #define test_thread_flag(flag) \ test_ti_thread_flag(current_thread_info(), flag) @@ -9872,9 +10056,9 @@ diff -Nur linux-4.9.6.orig/include/linux/thread_info.h linux-4.9.6/include/linux #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES static inline int arch_within_stack_frames(const void * const stack, -diff -Nur linux-4.9.6.orig/include/linux/timer.h linux-4.9.6/include/linux/timer.h ---- linux-4.9.6.orig/include/linux/timer.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/timer.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/timer.h linux-4.9.22/include/linux/timer.h +--- linux-4.9.22.orig/include/linux/timer.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/timer.h 2017-04-18 17:19:16.678773075 +0200 @@ -241,7 +241,7 @@ extern int try_to_del_timer_sync(struct timer_list *timer); @@ -9884,9 +10068,9 @@ diff -Nur linux-4.9.6.orig/include/linux/timer.h linux-4.9.6/include/linux/timer extern int del_timer_sync(struct timer_list *timer); #else # define del_timer_sync(t) del_timer(t) -diff -Nur linux-4.9.6.orig/include/linux/trace_events.h linux-4.9.6/include/linux/trace_events.h ---- linux-4.9.6.orig/include/linux/trace_events.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/trace_events.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/trace_events.h linux-4.9.22/include/linux/trace_events.h +--- linux-4.9.22.orig/include/linux/trace_events.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/trace_events.h 2017-04-18 17:19:16.678773075 +0200 @@ -56,6 +56,9 @@ unsigned char flags; unsigned char preempt_count; @@ -9897,9 +10081,9 @@ diff -Nur linux-4.9.6.orig/include/linux/trace_events.h linux-4.9.6/include/linu }; #define TRACE_EVENT_TYPE_MAX \ -diff -Nur linux-4.9.6.orig/include/linux/uaccess.h linux-4.9.6/include/linux/uaccess.h ---- linux-4.9.6.orig/include/linux/uaccess.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/uaccess.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/uaccess.h linux-4.9.22/include/linux/uaccess.h +--- linux-4.9.22.orig/include/linux/uaccess.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/uaccess.h 2017-04-18 17:19:16.678773075 +0200 @@ -24,6 +24,7 @@ */ static inline void pagefault_disable(void) @@ -9916,9 +10100,9 @@ diff -Nur linux-4.9.6.orig/include/linux/uaccess.h linux-4.9.6/include/linux/uac } /* -diff -Nur linux-4.9.6.orig/include/linux/uprobes.h linux-4.9.6/include/linux/uprobes.h ---- linux-4.9.6.orig/include/linux/uprobes.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/uprobes.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/uprobes.h linux-4.9.22/include/linux/uprobes.h +--- linux-4.9.22.orig/include/linux/uprobes.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/uprobes.h 2017-04-18 17:19:16.678773075 +0200 @@ -27,6 +27,7 @@ #include <linux/errno.h> #include <linux/rbtree.h> @@ -9927,9 +10111,9 @@ diff -Nur linux-4.9.6.orig/include/linux/uprobes.h linux-4.9.6/include/linux/upr struct vm_area_struct; struct mm_struct; -diff -Nur linux-4.9.6.orig/include/linux/vmstat.h linux-4.9.6/include/linux/vmstat.h ---- linux-4.9.6.orig/include/linux/vmstat.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/vmstat.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/vmstat.h linux-4.9.22/include/linux/vmstat.h +--- linux-4.9.22.orig/include/linux/vmstat.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/vmstat.h 2017-04-18 17:19:16.678773075 +0200 @@ -33,7 +33,9 @@ */ static inline void __count_vm_event(enum vm_event_item item) @@ -9950,9 +10134,9 @@ diff -Nur linux-4.9.6.orig/include/linux/vmstat.h linux-4.9.6/include/linux/vmst } static inline void count_vm_events(enum vm_event_item item, long delta) -diff -Nur linux-4.9.6.orig/include/linux/wait.h linux-4.9.6/include/linux/wait.h ---- linux-4.9.6.orig/include/linux/wait.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/linux/wait.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/linux/wait.h linux-4.9.22/include/linux/wait.h +--- linux-4.9.22.orig/include/linux/wait.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/linux/wait.h 2017-04-18 17:19:16.678773075 +0200 @@ -8,6 +8,7 @@ #include <linux/spinlock.h> #include <asm/current.h> @@ -9961,9 +10145,9 @@ diff -Nur linux-4.9.6.orig/include/linux/wait.h linux-4.9.6/include/linux/wait.h typedef struct __wait_queue wait_queue_t; typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); -diff -Nur linux-4.9.6.orig/include/net/dst.h linux-4.9.6/include/net/dst.h ---- linux-4.9.6.orig/include/net/dst.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/net/dst.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/net/dst.h linux-4.9.22/include/net/dst.h +--- linux-4.9.22.orig/include/net/dst.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/net/dst.h 2017-04-18 17:19:16.678773075 +0200 @@ -446,7 +446,7 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, struct sk_buff *skb) @@ -9973,9 +10157,9 @@ diff -Nur linux-4.9.6.orig/include/net/dst.h linux-4.9.6/include/net/dst.h if (dst->pending_confirm) { unsigned long now = jiffies; -diff -Nur linux-4.9.6.orig/include/net/gen_stats.h linux-4.9.6/include/net/gen_stats.h ---- linux-4.9.6.orig/include/net/gen_stats.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/net/gen_stats.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/net/gen_stats.h linux-4.9.22/include/net/gen_stats.h +--- linux-4.9.22.orig/include/net/gen_stats.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/net/gen_stats.h 2017-04-18 17:19:16.678773075 +0200 @@ -5,6 +5,7 @@ #include <linux/socket.h> #include <linux/rtnetlink.h> @@ -10015,9 +10199,9 @@ diff -Nur linux-4.9.6.orig/include/net/gen_stats.h linux-4.9.6/include/net/gen_s bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, const struct gnet_stats_rate_est64 *rate_est); #endif -diff -Nur linux-4.9.6.orig/include/net/neighbour.h linux-4.9.6/include/net/neighbour.h ---- linux-4.9.6.orig/include/net/neighbour.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/net/neighbour.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/net/neighbour.h linux-4.9.22/include/net/neighbour.h +--- linux-4.9.22.orig/include/net/neighbour.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/net/neighbour.h 2017-04-18 17:19:16.678773075 +0200 @@ -446,7 +446,7 @@ } #endif @@ -10036,9 +10220,9 @@ diff -Nur linux-4.9.6.orig/include/net/neighbour.h linux-4.9.6/include/net/neigh const struct net_device *dev) { unsigned int seq; -diff -Nur linux-4.9.6.orig/include/net/netns/ipv4.h linux-4.9.6/include/net/netns/ipv4.h ---- linux-4.9.6.orig/include/net/netns/ipv4.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/net/netns/ipv4.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/net/netns/ipv4.h linux-4.9.22/include/net/netns/ipv4.h +--- linux-4.9.22.orig/include/net/netns/ipv4.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/net/netns/ipv4.h 2017-04-18 17:19:16.678773075 +0200 @@ -69,6 +69,7 @@ int sysctl_icmp_echo_ignore_all; @@ -10047,9 +10231,9 @@ diff -Nur linux-4.9.6.orig/include/net/netns/ipv4.h linux-4.9.6/include/net/netn int sysctl_icmp_ignore_bogus_error_responses; int sysctl_icmp_ratelimit; int sysctl_icmp_ratemask; -diff -Nur linux-4.9.6.orig/include/net/net_seq_lock.h linux-4.9.6/include/net/net_seq_lock.h ---- linux-4.9.6.orig/include/net/net_seq_lock.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/net/net_seq_lock.h 2017-01-28 13:59:09.947656802 +0100 +diff -Nur linux-4.9.22.orig/include/net/net_seq_lock.h linux-4.9.22/include/net/net_seq_lock.h +--- linux-4.9.22.orig/include/net/net_seq_lock.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/net/net_seq_lock.h 2017-04-18 17:19:16.678773075 +0200 @@ -0,0 +1,15 @@ +#ifndef __NET_NET_SEQ_LOCK_H__ +#define __NET_NET_SEQ_LOCK_H__ @@ -10066,9 +10250,9 @@ diff -Nur linux-4.9.6.orig/include/net/net_seq_lock.h linux-4.9.6/include/net/ne +#endif + +#endif -diff -Nur linux-4.9.6.orig/include/net/sch_generic.h linux-4.9.6/include/net/sch_generic.h ---- linux-4.9.6.orig/include/net/sch_generic.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/include/net/sch_generic.h 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/include/net/sch_generic.h linux-4.9.22/include/net/sch_generic.h +--- linux-4.9.22.orig/include/net/sch_generic.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/include/net/sch_generic.h 2017-04-18 17:19:16.678773075 +0200 @@ -10,6 +10,7 @@ #include <linux/dynamic_queue_limits.h> #include <net/gen_stats.h> @@ -10136,9 +10320,9 @@ diff -Nur linux-4.9.6.orig/include/net/sch_generic.h linux-4.9.6/include/net/sch { struct Qdisc *root = qdisc_root_sleeping(qdisc); -diff -Nur linux-4.9.6.orig/include/trace/events/hist.h linux-4.9.6/include/trace/events/hist.h ---- linux-4.9.6.orig/include/trace/events/hist.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/trace/events/hist.h 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/include/trace/events/hist.h linux-4.9.22/include/trace/events/hist.h +--- linux-4.9.22.orig/include/trace/events/hist.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/trace/events/hist.h 2017-04-18 17:19:16.678773075 +0200 @@ -0,0 +1,73 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hist @@ -10213,9 +10397,9 @@ diff -Nur linux-4.9.6.orig/include/trace/events/hist.h linux-4.9.6/include/trace + +/* This part must be outside protection */ +#include <trace/define_trace.h> -diff -Nur linux-4.9.6.orig/include/trace/events/latency_hist.h linux-4.9.6/include/trace/events/latency_hist.h ---- linux-4.9.6.orig/include/trace/events/latency_hist.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/include/trace/events/latency_hist.h 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/include/trace/events/latency_hist.h linux-4.9.22/include/trace/events/latency_hist.h +--- linux-4.9.22.orig/include/trace/events/latency_hist.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/include/trace/events/latency_hist.h 2017-04-18 17:19:16.678773075 +0200 @@ -0,0 +1,29 @@ +#ifndef _LATENCY_HIST_H +#define _LATENCY_HIST_H @@ -10246,9 +10430,9 @@ diff -Nur linux-4.9.6.orig/include/trace/events/latency_hist.h linux-4.9.6/inclu +} + +#endif /* _LATENCY_HIST_H */ -diff -Nur linux-4.9.6.orig/init/Kconfig linux-4.9.6/init/Kconfig ---- linux-4.9.6.orig/init/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/init/Kconfig 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/init/Kconfig linux-4.9.22/init/Kconfig +--- linux-4.9.22.orig/init/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/init/Kconfig 2017-04-18 17:19:16.678773075 +0200 @@ -506,7 +506,7 @@ config RCU_EXPERT @@ -10329,9 +10513,9 @@ diff -Nur linux-4.9.6.orig/init/Kconfig linux-4.9.6/init/Kconfig bool "SLUB per cpu partial cache" help Per cpu partial caches accellerate objects allocation and freeing -diff -Nur linux-4.9.6.orig/init/main.c linux-4.9.6/init/main.c ---- linux-4.9.6.orig/init/main.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/init/main.c 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/init/main.c linux-4.9.22/init/main.c +--- linux-4.9.22.orig/init/main.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/init/main.c 2017-04-18 17:19:16.682773230 +0200 @@ -507,6 +507,7 @@ setup_command_line(command_line); setup_nr_cpu_ids(); @@ -10340,18 +10524,18 @@ diff -Nur linux-4.9.6.orig/init/main.c linux-4.9.6/init/main.c boot_cpu_state_init(); smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ -diff -Nur linux-4.9.6.orig/init/Makefile linux-4.9.6/init/Makefile ---- linux-4.9.6.orig/init/Makefile 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/init/Makefile 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/init/Makefile linux-4.9.22/init/Makefile +--- linux-4.9.22.orig/init/Makefile 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/init/Makefile 2017-04-18 17:19:16.678773075 +0200 @@ -35,4 +35,4 @@ include/generated/compile.h: FORCE @$($(quiet)chk_compile.h) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ - "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)" + "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CONFIG_PREEMPT_RT_FULL)" "$(CC) $(KBUILD_CFLAGS)" -diff -Nur linux-4.9.6.orig/ipc/sem.c linux-4.9.6/ipc/sem.c ---- linux-4.9.6.orig/ipc/sem.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/ipc/sem.c 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/ipc/sem.c linux-4.9.22/ipc/sem.c +--- linux-4.9.22.orig/ipc/sem.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/ipc/sem.c 2017-04-18 17:19:16.682773230 +0200 @@ -712,6 +712,13 @@ static void wake_up_sem_queue_prepare(struct list_head *pt, struct sem_queue *q, int error) @@ -10390,9 +10574,9 @@ diff -Nur linux-4.9.6.orig/ipc/sem.c linux-4.9.6/ipc/sem.c } static void unlink_queue(struct sem_array *sma, struct sem_queue *q) -diff -Nur linux-4.9.6.orig/kernel/cgroup.c linux-4.9.6/kernel/cgroup.c ---- linux-4.9.6.orig/kernel/cgroup.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/cgroup.c 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/kernel/cgroup.c linux-4.9.22/kernel/cgroup.c +--- linux-4.9.22.orig/kernel/cgroup.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/cgroup.c 2017-04-18 17:19:16.682773230 +0200 @@ -5040,10 +5040,10 @@ queue_work(cgroup_destroy_wq, &css->destroy_work); } @@ -10417,7 +10601,7 @@ diff -Nur linux-4.9.6.orig/kernel/cgroup.c linux-4.9.6/kernel/cgroup.c } static void init_and_link_css(struct cgroup_subsys_state *css, -@@ -5742,6 +5742,7 @@ +@@ -5739,6 +5739,7 @@ */ cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1); BUG_ON(!cgroup_destroy_wq); @@ -10425,9 +10609,9 @@ diff -Nur linux-4.9.6.orig/kernel/cgroup.c linux-4.9.6/kernel/cgroup.c /* * Used to destroy pidlists and separate to serve as flush domain. -diff -Nur linux-4.9.6.orig/kernel/cpu.c linux-4.9.6/kernel/cpu.c ---- linux-4.9.6.orig/kernel/cpu.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/cpu.c 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/kernel/cpu.c linux-4.9.22/kernel/cpu.c +--- linux-4.9.22.orig/kernel/cpu.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/cpu.c 2017-04-18 17:19:16.682773230 +0200 @@ -239,6 +239,289 @@ #define cpuhp_lock_acquire() lock_map_acquire(&cpu_hotplug.dep_map) #define cpuhp_lock_release() lock_map_release(&cpu_hotplug.dep_map) @@ -10794,9 +10978,266 @@ diff -Nur linux-4.9.6.orig/kernel/cpu.c linux-4.9.6/kernel/cpu.c return ret; } -diff -Nur linux-4.9.6.orig/kernel/debug/kdb/kdb_io.c linux-4.9.6/kernel/debug/kdb/kdb_io.c ---- linux-4.9.6.orig/kernel/debug/kdb/kdb_io.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/debug/kdb/kdb_io.c 2017-01-28 13:59:09.951656955 +0100 +@@ -1240,6 +1562,8 @@ + + #endif /* CONFIG_PM_SLEEP_SMP */ + ++int __boot_cpu_id; ++ + #endif /* CONFIG_SMP */ + + /* Boot processor state steps */ +@@ -1923,6 +2247,10 @@ + set_cpu_active(cpu, true); + set_cpu_present(cpu, true); + set_cpu_possible(cpu, true); ++ ++#ifdef CONFIG_SMP ++ __boot_cpu_id = cpu; ++#endif + } + + /* +diff -Nur linux-4.9.22.orig/kernel/cpuset.c linux-4.9.22/kernel/cpuset.c +--- linux-4.9.22.orig/kernel/cpuset.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/cpuset.c 2017-04-18 17:19:16.682773230 +0200 +@@ -284,7 +284,7 @@ + */ + + static DEFINE_MUTEX(cpuset_mutex); +-static DEFINE_SPINLOCK(callback_lock); ++static DEFINE_RAW_SPINLOCK(callback_lock); + + static struct workqueue_struct *cpuset_migrate_mm_wq; + +@@ -907,9 +907,9 @@ + continue; + rcu_read_unlock(); + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cpumask_copy(cp->effective_cpus, new_cpus); +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + WARN_ON(!cgroup_subsys_on_dfl(cpuset_cgrp_subsys) && + !cpumask_equal(cp->cpus_allowed, cp->effective_cpus)); +@@ -974,9 +974,9 @@ + if (retval < 0) + return retval; + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed); +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + /* use trialcs->cpus_allowed as a temp variable */ + update_cpumasks_hier(cs, trialcs->cpus_allowed); +@@ -1176,9 +1176,9 @@ + continue; + rcu_read_unlock(); + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cp->effective_mems = *new_mems; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + WARN_ON(!cgroup_subsys_on_dfl(cpuset_cgrp_subsys) && + !nodes_equal(cp->mems_allowed, cp->effective_mems)); +@@ -1246,9 +1246,9 @@ + if (retval < 0) + goto done; + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cs->mems_allowed = trialcs->mems_allowed; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + /* use trialcs->mems_allowed as a temp variable */ + update_nodemasks_hier(cs, &trialcs->mems_allowed); +@@ -1339,9 +1339,9 @@ + spread_flag_changed = ((is_spread_slab(cs) != is_spread_slab(trialcs)) + || (is_spread_page(cs) != is_spread_page(trialcs))); + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cs->flags = trialcs->flags; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + if (!cpumask_empty(trialcs->cpus_allowed) && balance_flag_changed) + rebuild_sched_domains_locked(); +@@ -1756,7 +1756,7 @@ + cpuset_filetype_t type = seq_cft(sf)->private; + int ret = 0; + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + + switch (type) { + case FILE_CPULIST: +@@ -1775,7 +1775,7 @@ + ret = -EINVAL; + } + +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + return ret; + } + +@@ -1989,12 +1989,12 @@ + + cpuset_inc(); + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys)) { + cpumask_copy(cs->effective_cpus, parent->effective_cpus); + cs->effective_mems = parent->effective_mems; + } +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + if (!test_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags)) + goto out_unlock; +@@ -2021,12 +2021,12 @@ + } + rcu_read_unlock(); + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cs->mems_allowed = parent->mems_allowed; + cs->effective_mems = parent->mems_allowed; + cpumask_copy(cs->cpus_allowed, parent->cpus_allowed); + cpumask_copy(cs->effective_cpus, parent->cpus_allowed); +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + out_unlock: + mutex_unlock(&cpuset_mutex); + return 0; +@@ -2065,7 +2065,7 @@ + static void cpuset_bind(struct cgroup_subsys_state *root_css) + { + mutex_lock(&cpuset_mutex); +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + + if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys)) { + cpumask_copy(top_cpuset.cpus_allowed, cpu_possible_mask); +@@ -2076,7 +2076,7 @@ + top_cpuset.mems_allowed = top_cpuset.effective_mems; + } + +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + mutex_unlock(&cpuset_mutex); + } + +@@ -2177,12 +2177,12 @@ + { + bool is_empty; + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cpumask_copy(cs->cpus_allowed, new_cpus); + cpumask_copy(cs->effective_cpus, new_cpus); + cs->mems_allowed = *new_mems; + cs->effective_mems = *new_mems; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + /* + * Don't call update_tasks_cpumask() if the cpuset becomes empty, +@@ -2219,10 +2219,10 @@ + if (nodes_empty(*new_mems)) + *new_mems = parent_cs(cs)->effective_mems; + +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + cpumask_copy(cs->effective_cpus, new_cpus); + cs->effective_mems = *new_mems; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + + if (cpus_updated) + update_tasks_cpumask(cs); +@@ -2308,21 +2308,21 @@ + + /* synchronize cpus_allowed to cpu_active_mask */ + if (cpus_updated) { +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + if (!on_dfl) + cpumask_copy(top_cpuset.cpus_allowed, &new_cpus); + cpumask_copy(top_cpuset.effective_cpus, &new_cpus); +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + /* we don't mess with cpumasks of tasks in top_cpuset */ + } + + /* synchronize mems_allowed to N_MEMORY */ + if (mems_updated) { +- spin_lock_irq(&callback_lock); ++ raw_spin_lock_irq(&callback_lock); + if (!on_dfl) + top_cpuset.mems_allowed = new_mems; + top_cpuset.effective_mems = new_mems; +- spin_unlock_irq(&callback_lock); ++ raw_spin_unlock_irq(&callback_lock); + update_tasks_nodemask(&top_cpuset); + } + +@@ -2420,11 +2420,11 @@ + { + unsigned long flags; + +- spin_lock_irqsave(&callback_lock, flags); ++ raw_spin_lock_irqsave(&callback_lock, flags); + rcu_read_lock(); + guarantee_online_cpus(task_cs(tsk), pmask); + rcu_read_unlock(); +- spin_unlock_irqrestore(&callback_lock, flags); ++ raw_spin_unlock_irqrestore(&callback_lock, flags); + } + + void cpuset_cpus_allowed_fallback(struct task_struct *tsk) +@@ -2472,11 +2472,11 @@ + nodemask_t mask; + unsigned long flags; + +- spin_lock_irqsave(&callback_lock, flags); ++ raw_spin_lock_irqsave(&callback_lock, flags); + rcu_read_lock(); + guarantee_online_mems(task_cs(tsk), &mask); + rcu_read_unlock(); +- spin_unlock_irqrestore(&callback_lock, flags); ++ raw_spin_unlock_irqrestore(&callback_lock, flags); + + return mask; + } +@@ -2568,14 +2568,14 @@ + return true; + + /* Not hardwall and node outside mems_allowed: scan up cpusets */ +- spin_lock_irqsave(&callback_lock, flags); ++ raw_spin_lock_irqsave(&callback_lock, flags); + + rcu_read_lock(); + cs = nearest_hardwall_ancestor(task_cs(current)); + allowed = node_isset(node, cs->mems_allowed); + rcu_read_unlock(); + +- spin_unlock_irqrestore(&callback_lock, flags); ++ raw_spin_unlock_irqrestore(&callback_lock, flags); + return allowed; + } + +diff -Nur linux-4.9.22.orig/kernel/debug/kdb/kdb_io.c linux-4.9.22/kernel/debug/kdb/kdb_io.c +--- linux-4.9.22.orig/kernel/debug/kdb/kdb_io.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/debug/kdb/kdb_io.c 2017-04-18 17:19:16.682773230 +0200 @@ -554,7 +554,6 @@ int linecount; int colcount; @@ -10834,9 +11275,9 @@ diff -Nur linux-4.9.6.orig/kernel/debug/kdb/kdb_io.c linux-4.9.6/kernel/debug/kd return r; } -diff -Nur linux-4.9.6.orig/kernel/events/core.c linux-4.9.6/kernel/events/core.c ---- linux-4.9.6.orig/kernel/events/core.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/events/core.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/events/core.c linux-4.9.22/kernel/events/core.c +--- linux-4.9.22.orig/kernel/events/core.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/events/core.c 2017-04-18 17:19:16.686773386 +0200 @@ -1050,6 +1050,7 @@ raw_spin_lock_init(&cpuctx->hrtimer_lock); hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); @@ -10845,7 +11286,7 @@ diff -Nur linux-4.9.6.orig/kernel/events/core.c linux-4.9.6/kernel/events/core.c } static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx) -@@ -8335,6 +8336,7 @@ +@@ -8363,6 +8364,7 @@ hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hwc->hrtimer.function = perf_swevent_hrtimer; @@ -10853,9 +11294,9 @@ diff -Nur linux-4.9.6.orig/kernel/events/core.c linux-4.9.6/kernel/events/core.c /* * Since hrtimers have a fixed rate, we can do a static freq->period -diff -Nur linux-4.9.6.orig/kernel/exit.c linux-4.9.6/kernel/exit.c ---- linux-4.9.6.orig/kernel/exit.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/exit.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/exit.c linux-4.9.22/kernel/exit.c +--- linux-4.9.22.orig/kernel/exit.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/exit.c 2017-04-18 17:19:16.686773386 +0200 @@ -143,7 +143,7 @@ * Do this under ->siglock, we can race with another thread * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. @@ -10865,9 +11306,9 @@ diff -Nur linux-4.9.6.orig/kernel/exit.c linux-4.9.6/kernel/exit.c tsk->sighand = NULL; spin_unlock(&sighand->siglock); -diff -Nur linux-4.9.6.orig/kernel/fork.c linux-4.9.6/kernel/fork.c ---- linux-4.9.6.orig/kernel/fork.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/fork.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/fork.c linux-4.9.22/kernel/fork.c +--- linux-4.9.22.orig/kernel/fork.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/fork.c 2017-04-18 17:19:16.686773386 +0200 @@ -76,6 +76,7 @@ #include <linux/compiler.h> #include <linux/sysctl.h> @@ -10959,10 +11400,40 @@ diff -Nur linux-4.9.6.orig/kernel/fork.c linux-4.9.6/kernel/fork.c p->utime = p->stime = p->gtime = 0; p->utimescaled = p->stimescaled = 0; -diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c ---- linux-4.9.6.orig/kernel/futex.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/futex.c 2017-01-28 13:59:09.955657109 +0100 -@@ -904,7 +904,9 @@ +diff -Nur linux-4.9.22.orig/kernel/futex.c linux-4.9.22/kernel/futex.c +--- linux-4.9.22.orig/kernel/futex.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/futex.c 2017-04-18 17:19:16.686773386 +0200 +@@ -800,7 +800,7 @@ + return 0; + } + +-static struct futex_pi_state * alloc_pi_state(void) ++static struct futex_pi_state *alloc_pi_state(void) + { + struct futex_pi_state *pi_state = current->pi_state_cache; + +@@ -810,6 +810,11 @@ + return pi_state; + } + ++static void get_pi_state(struct futex_pi_state *pi_state) ++{ ++ WARN_ON_ONCE(!atomic_inc_not_zero(&pi_state->refcount)); ++} ++ + /* + * Drops a reference to the pi_state object and frees or caches it + * when the last reference is gone. +@@ -854,7 +859,7 @@ + * Look up the task based on what TID userspace gave us. + * We dont trust it. + */ +-static struct task_struct * futex_find_get_task(pid_t pid) ++static struct task_struct *futex_find_get_task(pid_t pid) + { + struct task_struct *p; + +@@ -904,7 +909,9 @@ * task still owns the PI-state: */ if (head->next != next) { @@ -10972,36 +11443,388 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c continue; } -@@ -1299,6 +1301,7 @@ - struct futex_pi_state *pi_state = this->pi_state; +@@ -914,10 +921,12 @@ + pi_state->owner = NULL; + raw_spin_unlock_irq(&curr->pi_lock); + +- rt_mutex_unlock(&pi_state->pi_mutex); +- ++ get_pi_state(pi_state); + spin_unlock(&hb->lock); + ++ rt_mutex_futex_unlock(&pi_state->pi_mutex); ++ put_pi_state(pi_state); ++ + raw_spin_lock_irq(&curr->pi_lock); + } + raw_spin_unlock_irq(&curr->pi_lock); +@@ -971,6 +980,39 @@ + * + * [10] There is no transient state which leaves owner and user space + * TID out of sync. ++ * ++ * ++ * Serialization and lifetime rules: ++ * ++ * hb->lock: ++ * ++ * hb -> futex_q, relation ++ * futex_q -> pi_state, relation ++ * ++ * (cannot be raw because hb can contain arbitrary amount ++ * of futex_q's) ++ * ++ * pi_mutex->wait_lock: ++ * ++ * {uval, pi_state} ++ * ++ * (and pi_mutex 'obviously') ++ * ++ * p->pi_lock: ++ * ++ * p->pi_state_list -> pi_state->list, relation ++ * ++ * pi_state->refcount: ++ * ++ * pi_state lifetime ++ * ++ * ++ * Lock order: ++ * ++ * hb->lock ++ * pi_mutex->wait_lock ++ * p->pi_lock ++ * + */ + + /* +@@ -978,10 +1020,12 @@ + * the pi_state against the user space value. If correct, attach to + * it. + */ +-static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state, ++static int attach_to_pi_state(u32 __user *uaddr, u32 uval, ++ struct futex_pi_state *pi_state, + struct futex_pi_state **ps) + { + pid_t pid = uval & FUTEX_TID_MASK; ++ int ret, uval2; + + /* + * Userspace might have messed up non-PI and PI futexes [3] +@@ -989,9 +1033,39 @@ + if (unlikely(!pi_state)) + return -EINVAL; + ++ /* ++ * We get here with hb->lock held, and having found a ++ * futex_top_waiter(). This means that futex_lock_pi() of said futex_q ++ * has dropped the hb->lock in between queue_me() and unqueue_me_pi(), ++ * which in turn means that futex_lock_pi() still has a reference on ++ * our pi_state. ++ * ++ * The waiter holding a reference on @pi_state also protects against ++ * the unlocked put_pi_state() in futex_unlock_pi(), futex_lock_pi() ++ * and futex_wait_requeue_pi() as it cannot go to 0 and consequently ++ * free pi_state before we can take a reference ourselves. ++ */ + WARN_ON(!atomic_read(&pi_state->refcount)); + + /* ++ * Now that we have a pi_state, we can acquire wait_lock ++ * and do the state validation. ++ */ ++ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); ++ ++ /* ++ * Since {uval, pi_state} is serialized by wait_lock, and our current ++ * uval was read without holding it, it can have changed. Verify it ++ * still is what we expect it to be, otherwise retry the entire ++ * operation. ++ */ ++ if (get_futex_value_locked(&uval2, uaddr)) ++ goto out_efault; ++ ++ if (uval != uval2) ++ goto out_eagain; ++ ++ /* + * Handle the owner died case: + */ + if (uval & FUTEX_OWNER_DIED) { +@@ -1006,11 +1080,11 @@ + * is not 0. Inconsistent state. [5] + */ + if (pid) +- return -EINVAL; ++ goto out_einval; + /* + * Take a ref on the state and return success. [4] + */ +- goto out_state; ++ goto out_attach; + } + + /* +@@ -1022,14 +1096,14 @@ + * Take a ref on the state and return success. [6] + */ + if (!pid) +- goto out_state; ++ goto out_attach; + } else { + /* + * If the owner died bit is not set, then the pi_state + * must have an owner. [7] + */ + if (!pi_state->owner) +- return -EINVAL; ++ goto out_einval; + } + + /* +@@ -1038,11 +1112,29 @@ + * user space TID. [9/10] + */ + if (pid != task_pid_vnr(pi_state->owner)) +- return -EINVAL; +-out_state: +- atomic_inc(&pi_state->refcount); ++ goto out_einval; ++ ++out_attach: ++ get_pi_state(pi_state); ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); + *ps = pi_state; + return 0; ++ ++out_einval: ++ ret = -EINVAL; ++ goto out_error; ++ ++out_eagain: ++ ret = -EAGAIN; ++ goto out_error; ++ ++out_efault: ++ ret = -EFAULT; ++ goto out_error; ++ ++out_error: ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); ++ return ret; + } + + /* +@@ -1093,6 +1185,9 @@ + + /* + * No existing pi state. First waiter. [2] ++ * ++ * This creates pi_state, we have hb->lock held, this means nothing can ++ * observe this state, wait_lock is irrelevant. + */ + pi_state = alloc_pi_state(); + +@@ -1117,17 +1212,18 @@ + return 0; + } + +-static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, ++static int lookup_pi_state(u32 __user *uaddr, u32 uval, ++ struct futex_hash_bucket *hb, + union futex_key *key, struct futex_pi_state **ps) + { +- struct futex_q *match = futex_top_waiter(hb, key); ++ struct futex_q *top_waiter = futex_top_waiter(hb, key); + + /* + * If there is a waiter on that futex, validate it and + * attach to the pi_state when the validation succeeds. + */ +- if (match) +- return attach_to_pi_state(uval, match->pi_state, ps); ++ if (top_waiter) ++ return attach_to_pi_state(uaddr, uval, top_waiter->pi_state, ps); + + /* + * We are the first waiter - try to look up the owner based on +@@ -1146,7 +1242,7 @@ + if (unlikely(cmpxchg_futex_value_locked(&curval, uaddr, uval, newval))) + return -EFAULT; + +- /*If user space value changed, let the caller retry */ ++ /* If user space value changed, let the caller retry */ + return curval != uval ? -EAGAIN : 0; + } + +@@ -1174,7 +1270,7 @@ + struct task_struct *task, int set_waiters) + { + u32 uval, newval, vpid = task_pid_vnr(task); +- struct futex_q *match; ++ struct futex_q *top_waiter; + int ret; + + /* +@@ -1200,9 +1296,9 @@ + * Lookup existing state first. If it exists, try to attach to + * its pi_state. + */ +- match = futex_top_waiter(hb, key); +- if (match) +- return attach_to_pi_state(uval, match->pi_state, ps); ++ top_waiter = futex_top_waiter(hb, key); ++ if (top_waiter) ++ return attach_to_pi_state(uaddr, uval, top_waiter->pi_state, ps); + + /* + * No waiter and user TID is 0. We are here because the +@@ -1288,45 +1384,39 @@ + * memory barrier is required here to prevent the following + * store to lock_ptr from getting ahead of the plist_del. + */ +- smp_wmb(); +- q->lock_ptr = NULL; ++ smp_store_release(&q->lock_ptr, NULL); + } + +-static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this, +- struct futex_hash_bucket *hb) ++/* ++ * Caller must hold a reference on @pi_state. ++ */ ++static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_state) + { +- struct task_struct *new_owner; +- struct futex_pi_state *pi_state = this->pi_state; u32 uninitialized_var(curval), newval; ++ struct task_struct *new_owner; ++ bool deboost = false; WAKE_Q(wake_q); +- bool deboost; + WAKE_Q(wake_sleeper_q); - bool deboost; int ret = 0; -@@ -1365,7 +1368,8 @@ +- if (!pi_state) +- return -EINVAL; +- +- /* +- * If current does not own the pi_state then the futex is +- * inconsistent and user space fiddled with the futex value. +- */ +- if (pi_state->owner != current) +- return -EINVAL; +- +- raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); + new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); ++ if (WARN_ON_ONCE(!new_owner)) { ++ /* ++ * As per the comment in futex_unlock_pi() this should not happen. ++ * ++ * When this happens, give up our locks and try again, giving ++ * the futex_lock_pi() instance time to complete, either by ++ * waiting on the rtmutex or removing itself from the futex ++ * queue. ++ */ ++ ret = -EAGAIN; ++ goto out_unlock; ++ } + + /* +- * It is possible that the next waiter (the one that brought +- * this owner to the kernel) timed out and is no longer +- * waiting on the lock. +- */ +- if (!new_owner) +- new_owner = this->task; +- +- /* +- * We pass it to the next owner. The WAITERS bit is always +- * kept enabled while there is PI state around. We cleanup the +- * owner died bit, because we are the owner. ++ * We pass it to the next owner. The WAITERS bit is always kept ++ * enabled while there is PI state around. We cleanup the owner ++ * died bit, because we are the owner. + */ + newval = FUTEX_WAITERS | task_pid_vnr(new_owner); - raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); +@@ -1335,6 +1425,7 @@ -- deboost = rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q); -+ deboost = rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q, -+ &wake_sleeper_q); + if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)) { + ret = -EFAULT; ++ + } else if (curval != uval) { + /* + * If a unconditional UNLOCK_PI operation (user space did not +@@ -1347,10 +1438,9 @@ + else + ret = -EINVAL; + } +- if (ret) { +- raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); +- return ret; +- } ++ ++ if (ret) ++ goto out_unlock; + raw_spin_lock(&pi_state->owner->pi_lock); + WARN_ON(list_empty(&pi_state->list)); +@@ -1363,22 +1453,22 @@ + pi_state->owner = new_owner; + raw_spin_unlock(&new_owner->pi_lock); + +- raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); +- +- deboost = rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q); +- /* - * First unlock HB so the waiter does not spin on it once he got woken -@@ -1373,8 +1377,9 @@ - * deboost first (and lose our higher priority), then the task might get - * scheduled away before the wake up can take place. +- * First unlock HB so the waiter does not spin on it once he got woken +- * up. Second wake up the waiter before the priority is adjusted. If we +- * deboost first (and lose our higher priority), then the task might get +- * scheduled away before the wake up can take place. ++ * We've updated the uservalue, this unlock cannot fail. */ - spin_unlock(&hb->lock); -+ deboost |= spin_unlock_no_deboost(&hb->lock); - wake_up_q(&wake_q); -+ wake_up_q_sleeper(&wake_sleeper_q); - if (deboost) +- wake_up_q(&wake_q); +- if (deboost) ++ deboost = __rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q, ++ &wake_sleeper_q); ++ ++out_unlock: ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); ++ ++ if (deboost) { ++ wake_up_q(&wake_q); ++ wake_up_q_sleeper(&wake_sleeper_q); rt_mutex_adjust_prio(current); ++ } + +- return 0; ++ return ret; + } -@@ -1924,6 +1929,16 @@ + /* +@@ -1824,7 +1914,7 @@ + * If that call succeeds then we have pi_state and an + * initial refcount on it. + */ +- ret = lookup_pi_state(ret, hb2, &key2, &pi_state); ++ ret = lookup_pi_state(uaddr2, ret, hb2, &key2, &pi_state); + } + + switch (ret) { +@@ -1907,7 +1997,7 @@ + * refcount on the pi_state and store the pointer in + * the futex_q object of the waiter. + */ +- atomic_inc(&pi_state->refcount); ++ get_pi_state(pi_state); + this->pi_state = pi_state; + ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex, + this->rt_waiter, +@@ -1924,6 +2014,16 @@ requeue_pi_wake_futex(this, &key2, hb2); drop_count++; continue; @@ -11018,16 +11841,471 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c } else if (ret) { /* * rt_mutex_start_proxy_lock() detected a -@@ -2814,7 +2829,7 @@ +@@ -2007,20 +2107,7 @@ + hb_waiters_dec(hb); + } + +-/** +- * queue_me() - Enqueue the futex_q on the futex_hash_bucket +- * @q: The futex_q to enqueue +- * @hb: The destination hash bucket +- * +- * The hb->lock must be held by the caller, and is released here. A call to +- * queue_me() is typically paired with exactly one call to unqueue_me(). The +- * exceptions involve the PI related operations, which may use unqueue_me_pi() +- * or nothing if the unqueue is done as part of the wake process and the unqueue +- * state is implicit in the state of woken task (see futex_wait_requeue_pi() for +- * an example). +- */ +-static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) +- __releases(&hb->lock) ++static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) + { + int prio; + +@@ -2037,6 +2124,24 @@ + plist_node_init(&q->list, prio); + plist_add(&q->list, &hb->chain); + q->task = current; ++} ++ ++/** ++ * queue_me() - Enqueue the futex_q on the futex_hash_bucket ++ * @q: The futex_q to enqueue ++ * @hb: The destination hash bucket ++ * ++ * The hb->lock must be held by the caller, and is released here. A call to ++ * queue_me() is typically paired with exactly one call to unqueue_me(). The ++ * exceptions involve the PI related operations, which may use unqueue_me_pi() ++ * or nothing if the unqueue is done as part of the wake process and the unqueue ++ * state is implicit in the state of woken task (see futex_wait_requeue_pi() for ++ * an example). ++ */ ++static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) ++ __releases(&hb->lock) ++{ ++ __queue_me(q, hb); + spin_unlock(&hb->lock); + } + +@@ -2123,10 +2228,13 @@ + { + u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; + struct futex_pi_state *pi_state = q->pi_state; +- struct task_struct *oldowner = pi_state->owner; + u32 uval, uninitialized_var(curval), newval; ++ struct task_struct *oldowner; + int ret; + ++ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); ++ ++ oldowner = pi_state->owner; + /* Owner died? */ + if (!pi_state->owner) + newtid |= FUTEX_OWNER_DIED; +@@ -2134,7 +2242,8 @@ + /* + * We are here either because we stole the rtmutex from the + * previous highest priority waiter or we are the highest priority +- * waiter but failed to get the rtmutex the first time. ++ * waiter but have failed to get the rtmutex the first time. ++ * + * We have to replace the newowner TID in the user space variable. + * This must be atomic as we have to preserve the owner died bit here. + * +@@ -2142,17 +2251,16 @@ + * because we can fault here. Imagine swapped out pages or a fork + * that marked all the anonymous memory readonly for cow. + * +- * Modifying pi_state _before_ the user space value would +- * leave the pi_state in an inconsistent state when we fault +- * here, because we need to drop the hash bucket lock to +- * handle the fault. This might be observed in the PID check +- * in lookup_pi_state. ++ * Modifying pi_state _before_ the user space value would leave the ++ * pi_state in an inconsistent state when we fault here, because we ++ * need to drop the locks to handle the fault. This might be observed ++ * in the PID check in lookup_pi_state. + */ + retry: + if (get_futex_value_locked(&uval, uaddr)) + goto handle_fault; + +- while (1) { ++ for (;;) { + newval = (uval & FUTEX_OWNER_DIED) | newtid; + + if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)) +@@ -2167,47 +2275,60 @@ + * itself. + */ + if (pi_state->owner != NULL) { +- raw_spin_lock_irq(&pi_state->owner->pi_lock); ++ raw_spin_lock(&pi_state->owner->pi_lock); + WARN_ON(list_empty(&pi_state->list)); + list_del_init(&pi_state->list); +- raw_spin_unlock_irq(&pi_state->owner->pi_lock); ++ raw_spin_unlock(&pi_state->owner->pi_lock); + } + + pi_state->owner = newowner; + +- raw_spin_lock_irq(&newowner->pi_lock); ++ raw_spin_lock(&newowner->pi_lock); + WARN_ON(!list_empty(&pi_state->list)); + list_add(&pi_state->list, &newowner->pi_state_list); +- raw_spin_unlock_irq(&newowner->pi_lock); ++ raw_spin_unlock(&newowner->pi_lock); ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); ++ + return 0; + + /* +- * To handle the page fault we need to drop the hash bucket +- * lock here. That gives the other task (either the highest priority +- * waiter itself or the task which stole the rtmutex) the +- * chance to try the fixup of the pi_state. So once we are +- * back from handling the fault we need to check the pi_state +- * after reacquiring the hash bucket lock and before trying to +- * do another fixup. When the fixup has been done already we +- * simply return. ++ * To handle the page fault we need to drop the locks here. That gives ++ * the other task (either the highest priority waiter itself or the ++ * task which stole the rtmutex) the chance to try the fixup of the ++ * pi_state. So once we are back from handling the fault we need to ++ * check the pi_state after reacquiring the locks and before trying to ++ * do another fixup. When the fixup has been done already we simply ++ * return. ++ * ++ * Note: we hold both hb->lock and pi_mutex->wait_lock. We can safely ++ * drop hb->lock since the caller owns the hb -> futex_q relation. ++ * Dropping the pi_mutex->wait_lock requires the state revalidate. + */ + handle_fault: ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); + spin_unlock(q->lock_ptr); + + ret = fault_in_user_writeable(uaddr); + + spin_lock(q->lock_ptr); ++ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); + + /* + * Check if someone else fixed it for us: + */ +- if (pi_state->owner != oldowner) +- return 0; ++ if (pi_state->owner != oldowner) { ++ ret = 0; ++ goto out_unlock; ++ } + + if (ret) +- return ret; ++ goto out_unlock; + + goto retry; ++ ++out_unlock: ++ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); ++ return ret; + } + + static long futex_wait_restart(struct restart_block *restart); +@@ -2229,13 +2350,16 @@ + */ + static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked) + { +- struct task_struct *owner; + int ret = 0; + + if (locked) { + /* + * Got the lock. We might not be the anticipated owner if we + * did a lock-steal - fix up the PI-state in that case: ++ * ++ * We can safely read pi_state->owner without holding wait_lock ++ * because we now own the rt_mutex, only the owner will attempt ++ * to change it. + */ + if (q->pi_state->owner != current) + ret = fixup_pi_state_owner(uaddr, q, current); +@@ -2243,43 +2367,15 @@ + } + + /* +- * Catch the rare case, where the lock was released when we were on the +- * way back before we locked the hash bucket. +- */ +- if (q->pi_state->owner == current) { +- /* +- * Try to get the rt_mutex now. This might fail as some other +- * task acquired the rt_mutex after we removed ourself from the +- * rt_mutex waiters list. +- */ +- if (rt_mutex_trylock(&q->pi_state->pi_mutex)) { +- locked = 1; +- goto out; +- } +- +- /* +- * pi_state is incorrect, some other task did a lock steal and +- * we returned due to timeout or signal without taking the +- * rt_mutex. Too late. +- */ +- raw_spin_lock_irq(&q->pi_state->pi_mutex.wait_lock); +- owner = rt_mutex_owner(&q->pi_state->pi_mutex); +- if (!owner) +- owner = rt_mutex_next_owner(&q->pi_state->pi_mutex); +- raw_spin_unlock_irq(&q->pi_state->pi_mutex.wait_lock); +- ret = fixup_pi_state_owner(uaddr, q, owner); +- goto out; +- } +- +- /* + * Paranoia check. If we did not take the lock, then we should not be + * the owner of the rt_mutex. + */ +- if (rt_mutex_owner(&q->pi_state->pi_mutex) == current) ++ if (rt_mutex_owner(&q->pi_state->pi_mutex) == current) { + printk(KERN_ERR "fixup_owner: ret = %d pi-mutex: %p " + "pi-state %p\n", ret, + q->pi_state->pi_mutex.owner, + q->pi_state->owner); ++ } + + out: + return ret ? ret : locked; +@@ -2503,6 +2599,8 @@ + ktime_t *time, int trylock) + { struct hrtimer_sleeper timeout, *to = NULL; ++ struct futex_pi_state *pi_state = NULL; ++ struct rt_mutex_waiter rt_waiter; + struct futex_hash_bucket *hb; + struct futex_q q = futex_q_init; + int res, ret; +@@ -2555,25 +2653,77 @@ + } + } + ++ WARN_ON(!q.pi_state); ++ + /* + * Only actually queue now that the atomic ops are done: + */ +- queue_me(&q, hb); ++ __queue_me(&q, hb); + +- WARN_ON(!q.pi_state); +- /* +- * Block on the PI mutex: +- */ +- if (!trylock) { +- ret = rt_mutex_timed_futex_lock(&q.pi_state->pi_mutex, to); +- } else { +- ret = rt_mutex_trylock(&q.pi_state->pi_mutex); ++ if (trylock) { ++ ret = rt_mutex_futex_trylock(&q.pi_state->pi_mutex); + /* Fixup the trylock return value: */ + ret = ret ? 0 : -EWOULDBLOCK; ++ goto no_block; ++ } ++ ++ rt_mutex_init_waiter(&rt_waiter, false); ++ ++ /* ++ * On PREEMPT_RT_FULL, when hb->lock becomes an rt_mutex, we must not ++ * hold it while doing rt_mutex_start_proxy(), because then it will ++ * include hb->lock in the blocking chain, even through we'll not in ++ * fact hold it while blocking. This will lead it to report -EDEADLK ++ * and BUG when futex_unlock_pi() interleaves with this. ++ * ++ * Therefore acquire wait_lock while holding hb->lock, but drop the ++ * latter before calling rt_mutex_start_proxy_lock(). This still fully ++ * serializes against futex_unlock_pi() as that does the exact same ++ * lock handoff sequence. ++ */ ++ raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock); ++ /* ++ * the migrate_disable() here disables migration in the in_atomic() fast ++ * path which is enabled again in the following spin_unlock(). We have ++ * one migrate_disable() pending in the slow-path which is reversed ++ * after the raw_spin_unlock_irq() where we leave the atomic context. ++ */ ++ migrate_disable(); ++ ++ spin_unlock(q.lock_ptr); ++ ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current); ++ raw_spin_unlock_irq(&q.pi_state->pi_mutex.wait_lock); ++ migrate_enable(); ++ ++ if (ret) { ++ if (ret == 1) ++ ret = 0; ++ ++ spin_lock(q.lock_ptr); ++ goto no_block; + } + ++ ++ if (unlikely(to)) ++ hrtimer_start_expires(&to->timer, HRTIMER_MODE_ABS); ++ ++ ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); ++ + spin_lock(q.lock_ptr); + /* ++ * If we failed to acquire the lock (signal/timeout), we must ++ * first acquire the hb->lock before removing the lock from the ++ * rt_mutex waitqueue, such that we can keep the hb and rt_mutex ++ * wait lists consistent. ++ * ++ * In particular; it is important that futex_unlock_pi() can not ++ * observe this inconsistency. ++ */ ++ if (ret && !rt_mutex_cleanup_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter)) ++ ret = 0; ++ ++no_block: ++ /* + * Fixup the pi_state owner and possibly acquire the lock if we + * haven't already. + */ +@@ -2589,12 +2739,19 @@ + * If fixup_owner() faulted and was unable to handle the fault, unlock + * it and return the fault to userspace. + */ +- if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current)) +- rt_mutex_unlock(&q.pi_state->pi_mutex); ++ if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current)) { ++ pi_state = q.pi_state; ++ get_pi_state(pi_state); ++ } + + /* Unqueue and drop the lock */ + unqueue_me_pi(&q); + ++ if (pi_state) { ++ rt_mutex_futex_unlock(&pi_state->pi_mutex); ++ put_pi_state(pi_state); ++ } ++ + goto out_put_key; + + out_unlock_put_key: +@@ -2631,7 +2788,7 @@ + u32 uninitialized_var(curval), uval, vpid = task_pid_vnr(current); + union futex_key key = FUTEX_KEY_INIT; + struct futex_hash_bucket *hb; +- struct futex_q *match; ++ struct futex_q *top_waiter; + int ret; + + retry: +@@ -2655,12 +2812,48 @@ + * all and we at least want to know if user space fiddled + * with the futex value instead of blindly unlocking. + */ +- match = futex_top_waiter(hb, &key); +- if (match) { +- ret = wake_futex_pi(uaddr, uval, match, hb); ++ top_waiter = futex_top_waiter(hb, &key); ++ if (top_waiter) { ++ struct futex_pi_state *pi_state = top_waiter->pi_state; ++ ++ ret = -EINVAL; ++ if (!pi_state) ++ goto out_unlock; ++ + /* +- * In case of success wake_futex_pi dropped the hash +- * bucket lock. ++ * If current does not own the pi_state then the futex is ++ * inconsistent and user space fiddled with the futex value. ++ */ ++ if (pi_state->owner != current) ++ goto out_unlock; ++ ++ get_pi_state(pi_state); ++ /* ++ * By taking wait_lock while still holding hb->lock, we ensure ++ * there is no point where we hold neither; and therefore ++ * wake_futex_pi() must observe a state consistent with what we ++ * observed. ++ */ ++ raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); ++ /* ++ * Magic trickery for now to make the RT migrate disable ++ * logic happy. The following spin_unlock() happens with ++ * interrupts disabled so the internal migrate_enable() ++ * won't undo the migrate_disable() which was issued when ++ * locking hb->lock. ++ */ ++ migrate_disable(); ++ spin_unlock(&hb->lock); ++ ++ /* Drops pi_state->pi_mutex.wait_lock */ ++ ret = wake_futex_pi(uaddr, uval, pi_state); ++ ++ migrate_enable(); ++ ++ put_pi_state(pi_state); ++ ++ /* ++ * Success, we're done! No tricky corner cases. + */ + if (!ret) + goto out_putkey; +@@ -2675,7 +2868,6 @@ + * setting the FUTEX_WAITERS bit. Try again. + */ + if (ret == -EAGAIN) { +- spin_unlock(&hb->lock); + put_futex_key(&key); + goto retry; + } +@@ -2683,7 +2875,7 @@ + * wake_futex_pi has detected invalid state. Tell user + * space. + */ +- goto out_unlock; ++ goto out_putkey; + } + + /* +@@ -2693,8 +2885,10 @@ + * preserve the WAITERS bit not the OWNER_DIED one. We are the + * owner. + */ +- if (cmpxchg_futex_value_locked(&curval, uaddr, uval, 0)) ++ if (cmpxchg_futex_value_locked(&curval, uaddr, uval, 0)) { ++ spin_unlock(&hb->lock); + goto pi_faulted; ++ } + + /* + * If uval has changed, let user space handle it. +@@ -2708,7 +2902,6 @@ + return ret; + + pi_faulted: +- spin_unlock(&hb->lock); + put_futex_key(&key); + + ret = fault_in_user_writeable(uaddr); +@@ -2812,8 +3005,9 @@ + u32 __user *uaddr2) + { + struct hrtimer_sleeper timeout, *to = NULL; ++ struct futex_pi_state *pi_state = NULL; struct rt_mutex_waiter rt_waiter; - struct rt_mutex *pi_mutex = NULL; - struct futex_hash_bucket *hb; + struct futex_hash_bucket *hb, *hb2; union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; -@@ -2839,10 +2854,7 @@ +@@ -2838,10 +3032,7 @@ * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ @@ -11039,7 +12317,7 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) -@@ -2873,20 +2885,55 @@ +@@ -2872,20 +3063,55 @@ /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); @@ -11106,7 +12384,7 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { -@@ -2895,14 +2942,15 @@ +@@ -2894,16 +3120,19 @@ * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { @@ -11114,6 +12392,12 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c + spin_lock(&hb2->lock); + BUG_ON(&hb2->lock != q.lock_ptr); ret = fixup_pi_state_owner(uaddr2, &q, current); +- if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) +- rt_mutex_unlock(&q.pi_state->pi_mutex); ++ if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { ++ pi_state = q.pi_state; ++ get_pi_state(pi_state); ++ } /* * Drop the reference to the pi state which * the requeue_pi() code acquired for us. @@ -11123,20 +12407,51 @@ diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c + spin_unlock(&hb2->lock); } } else { - /* -@@ -2915,7 +2963,8 @@ - ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter); - debug_rt_mutex_free_waiter(&rt_waiter); + struct rt_mutex *pi_mutex; +@@ -2915,10 +3144,14 @@ + */ + WARN_ON(!q.pi_state); + pi_mutex = &q.pi_state->pi_mutex; +- ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter); +- debug_rt_mutex_free_waiter(&rt_waiter); ++ ret = rt_mutex_wait_proxy_lock(pi_mutex, to, &rt_waiter); - spin_lock(q.lock_ptr); + spin_lock(&hb2->lock); + BUG_ON(&hb2->lock != q.lock_ptr); ++ if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, &rt_waiter)) ++ ret = 0; ++ ++ debug_rt_mutex_free_waiter(&rt_waiter); /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. -diff -Nur linux-4.9.6.orig/kernel/irq/handle.c linux-4.9.6/kernel/irq/handle.c ---- linux-4.9.6.orig/kernel/irq/handle.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/irq/handle.c 2017-01-28 13:59:09.955657109 +0100 +@@ -2936,13 +3169,20 @@ + * the fault, unlock the rt_mutex and return the fault to + * userspace. + */ +- if (ret && rt_mutex_owner(pi_mutex) == current) +- rt_mutex_unlock(pi_mutex); ++ if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { ++ pi_state = q.pi_state; ++ get_pi_state(pi_state); ++ } + + /* Unqueue and drop the lock. */ + unqueue_me_pi(&q); + } + ++ if (pi_state) { ++ rt_mutex_futex_unlock(&pi_state->pi_mutex); ++ put_pi_state(pi_state); ++ } ++ + if (ret == -EINTR) { + /* + * We've already been requeued, but cannot restart by calling +diff -Nur linux-4.9.22.orig/kernel/irq/handle.c linux-4.9.22/kernel/irq/handle.c +--- linux-4.9.22.orig/kernel/irq/handle.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/irq/handle.c 2017-04-18 17:19:16.686773386 +0200 @@ -181,10 +181,16 @@ { irqreturn_t retval; @@ -11155,9 +12470,9 @@ diff -Nur linux-4.9.6.orig/kernel/irq/handle.c linux-4.9.6/kernel/irq/handle.c if (!noirqdebug) note_interrupt(desc, retval); -diff -Nur linux-4.9.6.orig/kernel/irq/manage.c linux-4.9.6/kernel/irq/manage.c ---- linux-4.9.6.orig/kernel/irq/manage.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/irq/manage.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/irq/manage.c linux-4.9.22/kernel/irq/manage.c +--- linux-4.9.22.orig/kernel/irq/manage.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/irq/manage.c 2017-04-18 17:19:16.686773386 +0200 @@ -22,6 +22,7 @@ #include "internals.h" @@ -11297,9 +12612,9 @@ diff -Nur linux-4.9.6.orig/kernel/irq/manage.c linux-4.9.6/kernel/irq/manage.c * interrupt controller has per-cpu registers. */ int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which, -diff -Nur linux-4.9.6.orig/kernel/irq/settings.h linux-4.9.6/kernel/irq/settings.h ---- linux-4.9.6.orig/kernel/irq/settings.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/irq/settings.h 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/irq/settings.h linux-4.9.22/kernel/irq/settings.h +--- linux-4.9.22.orig/kernel/irq/settings.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/irq/settings.h 2017-04-18 17:19:16.686773386 +0200 @@ -16,6 +16,7 @@ _IRQ_PER_CPU_DEVID = IRQ_PER_CPU_DEVID, _IRQ_IS_POLLED = IRQ_IS_POLLED, @@ -11333,9 +12648,9 @@ diff -Nur linux-4.9.6.orig/kernel/irq/settings.h linux-4.9.6/kernel/irq/settings static inline bool irq_settings_is_per_cpu(struct irq_desc *desc) { return desc->status_use_accessors & _IRQ_PER_CPU; -diff -Nur linux-4.9.6.orig/kernel/irq/spurious.c linux-4.9.6/kernel/irq/spurious.c ---- linux-4.9.6.orig/kernel/irq/spurious.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/irq/spurious.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/irq/spurious.c linux-4.9.22/kernel/irq/spurious.c +--- linux-4.9.22.orig/kernel/irq/spurious.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/irq/spurious.c 2017-04-18 17:19:16.686773386 +0200 @@ -442,6 +442,10 @@ static int __init irqfixup_setup(char *str) @@ -11358,9 +12673,9 @@ diff -Nur linux-4.9.6.orig/kernel/irq/spurious.c linux-4.9.6/kernel/irq/spurious irqfixup = 2; printk(KERN_WARNING "Misrouted IRQ fixup and polling support " "enabled\n"); -diff -Nur linux-4.9.6.orig/kernel/irq_work.c linux-4.9.6/kernel/irq_work.c ---- linux-4.9.6.orig/kernel/irq_work.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/irq_work.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/irq_work.c linux-4.9.22/kernel/irq_work.c +--- linux-4.9.22.orig/kernel/irq_work.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/irq_work.c 2017-04-18 17:19:16.686773386 +0200 @@ -17,6 +17,7 @@ #include <linux/cpu.h> #include <linux/notifier.h> @@ -11482,9 +12797,9 @@ diff -Nur linux-4.9.6.orig/kernel/irq_work.c linux-4.9.6/kernel/irq_work.c /* * Synchronize against the irq_work @entry, ensures the entry is not -diff -Nur linux-4.9.6.orig/kernel/Kconfig.locks linux-4.9.6/kernel/Kconfig.locks ---- linux-4.9.6.orig/kernel/Kconfig.locks 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/Kconfig.locks 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/kernel/Kconfig.locks linux-4.9.22/kernel/Kconfig.locks +--- linux-4.9.22.orig/kernel/Kconfig.locks 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/Kconfig.locks 2017-04-18 17:19:16.682773230 +0200 @@ -225,11 +225,11 @@ config MUTEX_SPIN_ON_OWNER @@ -11499,9 +12814,9 @@ diff -Nur linux-4.9.6.orig/kernel/Kconfig.locks linux-4.9.6/kernel/Kconfig.locks config LOCK_SPIN_ON_OWNER def_bool y -diff -Nur linux-4.9.6.orig/kernel/Kconfig.preempt linux-4.9.6/kernel/Kconfig.preempt ---- linux-4.9.6.orig/kernel/Kconfig.preempt 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/Kconfig.preempt 2017-01-28 13:59:09.951656955 +0100 +diff -Nur linux-4.9.22.orig/kernel/Kconfig.preempt linux-4.9.22/kernel/Kconfig.preempt +--- linux-4.9.22.orig/kernel/Kconfig.preempt 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/Kconfig.preempt 2017-04-18 17:19:16.682773230 +0200 @@ -1,3 +1,16 @@ +config PREEMPT + bool @@ -11554,9 +12869,9 @@ diff -Nur linux-4.9.6.orig/kernel/Kconfig.preempt linux-4.9.6/kernel/Kconfig.pre endchoice config PREEMPT_COUNT -diff -Nur linux-4.9.6.orig/kernel/ksysfs.c linux-4.9.6/kernel/ksysfs.c ---- linux-4.9.6.orig/kernel/ksysfs.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/ksysfs.c 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/ksysfs.c linux-4.9.22/kernel/ksysfs.c +--- linux-4.9.22.orig/kernel/ksysfs.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/ksysfs.c 2017-04-18 17:19:16.686773386 +0200 @@ -136,6 +136,15 @@ #endif /* CONFIG_KEXEC_CORE */ @@ -11583,10 +12898,87 @@ diff -Nur linux-4.9.6.orig/kernel/ksysfs.c linux-4.9.6/kernel/ksysfs.c NULL }; -diff -Nur linux-4.9.6.orig/kernel/locking/lockdep.c linux-4.9.6/kernel/locking/lockdep.c ---- linux-4.9.6.orig/kernel/locking/lockdep.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/lockdep.c 2017-01-28 13:59:09.955657109 +0100 -@@ -3689,6 +3689,7 @@ +diff -Nur linux-4.9.22.orig/kernel/locking/lockdep.c linux-4.9.22/kernel/locking/lockdep.c +--- linux-4.9.22.orig/kernel/locking/lockdep.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/lockdep.c 2017-04-18 17:19:16.686773386 +0200 +@@ -658,6 +658,7 @@ + struct lockdep_subclass_key *key; + struct hlist_head *hash_head; + struct lock_class *class; ++ bool is_static = false; + + if (unlikely(subclass >= MAX_LOCKDEP_SUBCLASSES)) { + debug_locks_off(); +@@ -671,10 +672,23 @@ + + /* + * Static locks do not have their class-keys yet - for them the key +- * is the lock object itself: +- */ +- if (unlikely(!lock->key)) +- lock->key = (void *)lock; ++ * is the lock object itself. If the lock is in the per cpu area, ++ * the canonical address of the lock (per cpu offset removed) is ++ * used. ++ */ ++ if (unlikely(!lock->key)) { ++ unsigned long can_addr, addr = (unsigned long)lock; ++ ++ if (__is_kernel_percpu_address(addr, &can_addr)) ++ lock->key = (void *)can_addr; ++ else if (__is_module_percpu_address(addr, &can_addr)) ++ lock->key = (void *)can_addr; ++ else if (static_obj(lock)) ++ lock->key = (void *)lock; ++ else ++ return ERR_PTR(-EINVAL); ++ is_static = true; ++ } + + /* + * NOTE: the class-key must be unique. For dynamic locks, a static +@@ -706,7 +720,7 @@ + } + } + +- return NULL; ++ return is_static || static_obj(lock->key) ? NULL : ERR_PTR(-EINVAL); + } + + /* +@@ -724,19 +738,18 @@ + DEBUG_LOCKS_WARN_ON(!irqs_disabled()); + + class = look_up_lock_class(lock, subclass); +- if (likely(class)) ++ if (likely(!IS_ERR_OR_NULL(class))) + goto out_set_class_cache; + + /* + * Debug-check: all keys must be persistent! +- */ +- if (!static_obj(lock->key)) { ++ */ ++ if (IS_ERR(class)) { + debug_locks_off(); + printk("INFO: trying to register non-static key.\n"); + printk("the code is fine but needs lockdep annotation.\n"); + printk("turning off the locking correctness validator.\n"); + dump_stack(); +- + return NULL; + } + +@@ -3410,7 +3423,7 @@ + * Clearly if the lock hasn't been acquired _ever_, we're not + * holding it either, so report failure. + */ +- if (!class) ++ if (IS_ERR_OR_NULL(class)) + return 0; + + /* +@@ -3689,6 +3702,7 @@ } } @@ -11594,7 +12986,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/lockdep.c linux-4.9.6/kernel/locking/l /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -3703,6 +3704,7 @@ +@@ -3703,6 +3717,7 @@ DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } @@ -11602,9 +12994,18 @@ diff -Nur linux-4.9.6.orig/kernel/locking/lockdep.c linux-4.9.6/kernel/locking/l if (!debug_locks) print_irqtrace_events(current); -diff -Nur linux-4.9.6.orig/kernel/locking/locktorture.c linux-4.9.6/kernel/locking/locktorture.c ---- linux-4.9.6.orig/kernel/locking/locktorture.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/locktorture.c 2017-01-28 13:59:09.959657263 +0100 +@@ -4159,7 +4174,7 @@ + * If the class exists we look it up and zap it: + */ + class = look_up_lock_class(lock, j); +- if (class) ++ if (!IS_ERR_OR_NULL(class)) + zap_class(class); + } + /* +diff -Nur linux-4.9.22.orig/kernel/locking/locktorture.c linux-4.9.22/kernel/locking/locktorture.c +--- linux-4.9.22.orig/kernel/locking/locktorture.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/locktorture.c 2017-04-18 17:19:16.686773386 +0200 @@ -26,7 +26,6 @@ #include <linux/kthread.h> #include <linux/sched/rt.h> @@ -11613,9 +13014,9 @@ diff -Nur linux-4.9.6.orig/kernel/locking/locktorture.c linux-4.9.6/kernel/locki #include <linux/mutex.h> #include <linux/rwsem.h> #include <linux/smp.h> -diff -Nur linux-4.9.6.orig/kernel/locking/Makefile linux-4.9.6/kernel/locking/Makefile ---- linux-4.9.6.orig/kernel/locking/Makefile 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/Makefile 2017-01-28 13:59:09.955657109 +0100 +diff -Nur linux-4.9.22.orig/kernel/locking/Makefile linux-4.9.22/kernel/locking/Makefile +--- linux-4.9.22.orig/kernel/locking/Makefile 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/Makefile 2017-04-18 17:19:16.686773386 +0200 @@ -2,7 +2,7 @@ # and is generally not a function of system call inputs. KCOV_INSTRUMENT := n @@ -11632,8 +13033,8 @@ diff -Nur linux-4.9.6.orig/kernel/locking/Makefile linux-4.9.6/kernel/locking/Ma +ifneq ($(CONFIG_PREEMPT_RT_FULL),y) +obj-y += mutex.o obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o -+obj-y += rwsem.o +endif ++obj-y += rwsem.o obj-$(CONFIG_LOCKDEP) += lockdep.o ifeq ($(CONFIG_PROC_FS),y) obj-$(CONFIG_LOCKDEP) += lockdep_proc.o @@ -11645,12 +13046,12 @@ diff -Nur linux-4.9.6.orig/kernel/locking/Makefile linux-4.9.6/kernel/locking/Ma obj-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem-xadd.o +endif -+obj-$(CONFIG_PREEMPT_RT_FULL) += rt.o ++obj-$(CONFIG_PREEMPT_RT_FULL) += rt.o rwsem-rt.o obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o -diff -Nur linux-4.9.6.orig/kernel/locking/percpu-rwsem.c linux-4.9.6/kernel/locking/percpu-rwsem.c ---- linux-4.9.6.orig/kernel/locking/percpu-rwsem.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/percpu-rwsem.c 2017-01-28 13:59:09.959657263 +0100 +diff -Nur linux-4.9.22.orig/kernel/locking/percpu-rwsem.c linux-4.9.22/kernel/locking/percpu-rwsem.c +--- linux-4.9.22.orig/kernel/locking/percpu-rwsem.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/percpu-rwsem.c 2017-04-18 17:19:16.686773386 +0200 @@ -18,7 +18,7 @@ /* ->rw_sem represents the whole percpu_rw_semaphore for lockdep */ rcu_sync_init(&sem->rss, RCU_SCHED_SYNC); @@ -11678,10 +13079,10 @@ diff -Nur linux-4.9.6.orig/kernel/locking/percpu-rwsem.c linux-4.9.6/kernel/lock } EXPORT_SYMBOL_GPL(percpu_down_write); -diff -Nur linux-4.9.6.orig/kernel/locking/rt.c linux-4.9.6/kernel/locking/rt.c ---- linux-4.9.6.orig/kernel/locking/rt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/kernel/locking/rt.c 2017-01-28 13:59:10.035660185 +0100 -@@ -0,0 +1,498 @@ +diff -Nur linux-4.9.22.orig/kernel/locking/rt.c linux-4.9.22/kernel/locking/rt.c +--- linux-4.9.22.orig/kernel/locking/rt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/kernel/locking/rt.c 2017-04-18 17:19:16.690773540 +0200 +@@ -0,0 +1,331 @@ +/* + * kernel/rt.c + * @@ -11990,173 +13391,6 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rt.c linux-4.9.6/kernel/locking/rt.c +} +EXPORT_SYMBOL(__rt_rwlock_init); + -+/* -+ * rw_semaphores -+ */ -+ -+void rt_up_write(struct rw_semaphore *rwsem) -+{ -+ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); -+ rt_mutex_unlock(&rwsem->lock); -+} -+EXPORT_SYMBOL(rt_up_write); -+ -+void __rt_up_read(struct rw_semaphore *rwsem) -+{ -+ if (--rwsem->read_depth == 0) -+ rt_mutex_unlock(&rwsem->lock); -+} -+ -+void rt_up_read(struct rw_semaphore *rwsem) -+{ -+ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); -+ __rt_up_read(rwsem); -+} -+EXPORT_SYMBOL(rt_up_read); -+ -+/* -+ * downgrade a write lock into a read lock -+ * - just wake up any readers at the front of the queue -+ */ -+void rt_downgrade_write(struct rw_semaphore *rwsem) -+{ -+ BUG_ON(rt_mutex_owner(&rwsem->lock) != current); -+ rwsem->read_depth = 1; -+} -+EXPORT_SYMBOL(rt_downgrade_write); -+ -+int rt_down_write_trylock(struct rw_semaphore *rwsem) -+{ -+ int ret = rt_mutex_trylock(&rwsem->lock); -+ -+ if (ret) -+ rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); -+ return ret; -+} -+EXPORT_SYMBOL(rt_down_write_trylock); -+ -+void rt_down_write(struct rw_semaphore *rwsem) -+{ -+ rwsem_acquire(&rwsem->dep_map, 0, 0, _RET_IP_); -+ rt_mutex_lock(&rwsem->lock); -+} -+EXPORT_SYMBOL(rt_down_write); -+ -+int rt_down_write_killable(struct rw_semaphore *rwsem) -+{ -+ int ret; -+ -+ rwsem_acquire(&rwsem->dep_map, 0, 0, _RET_IP_); -+ ret = rt_mutex_lock_killable(&rwsem->lock); -+ if (ret) -+ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); -+ return ret; -+} -+EXPORT_SYMBOL(rt_down_write_killable); -+ -+int rt_down_write_killable_nested(struct rw_semaphore *rwsem, int subclass) -+{ -+ int ret; -+ -+ rwsem_acquire(&rwsem->dep_map, subclass, 0, _RET_IP_); -+ ret = rt_mutex_lock_killable(&rwsem->lock); -+ if (ret) -+ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); -+ return ret; -+} -+EXPORT_SYMBOL(rt_down_write_killable_nested); -+ -+void rt_down_write_nested(struct rw_semaphore *rwsem, int subclass) -+{ -+ rwsem_acquire(&rwsem->dep_map, subclass, 0, _RET_IP_); -+ rt_mutex_lock(&rwsem->lock); -+} -+EXPORT_SYMBOL(rt_down_write_nested); -+ -+void rt_down_write_nested_lock(struct rw_semaphore *rwsem, -+ struct lockdep_map *nest) -+{ -+ rwsem_acquire_nest(&rwsem->dep_map, 0, 0, nest, _RET_IP_); -+ rt_mutex_lock(&rwsem->lock); -+} -+EXPORT_SYMBOL(rt_down_write_nested_lock); -+ -+int rt__down_read_trylock(struct rw_semaphore *rwsem) -+{ -+ struct rt_mutex *lock = &rwsem->lock; -+ int ret = 1; -+ -+ /* -+ * recursive read locks succeed when current owns the rwsem, -+ * but not when read_depth == 0 which means that the rwsem is -+ * write locked. -+ */ -+ if (rt_mutex_owner(lock) != current) -+ ret = rt_mutex_trylock(&rwsem->lock); -+ else if (!rwsem->read_depth) -+ ret = 0; -+ -+ if (ret) -+ rwsem->read_depth++; -+ return ret; -+ -+} -+ -+int rt_down_read_trylock(struct rw_semaphore *rwsem) -+{ -+ int ret; -+ -+ ret = rt__down_read_trylock(rwsem); -+ if (ret) -+ rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); -+ -+ return ret; -+} -+EXPORT_SYMBOL(rt_down_read_trylock); -+ -+void rt__down_read(struct rw_semaphore *rwsem) -+{ -+ struct rt_mutex *lock = &rwsem->lock; -+ -+ if (rt_mutex_owner(lock) != current) -+ rt_mutex_lock(&rwsem->lock); -+ rwsem->read_depth++; -+} -+EXPORT_SYMBOL(rt__down_read); -+ -+static void __rt_down_read(struct rw_semaphore *rwsem, int subclass) -+{ -+ rwsem_acquire_read(&rwsem->dep_map, subclass, 0, _RET_IP_); -+ rt__down_read(rwsem); -+} -+ -+void rt_down_read(struct rw_semaphore *rwsem) -+{ -+ __rt_down_read(rwsem, 0); -+} -+EXPORT_SYMBOL(rt_down_read); -+ -+void rt_down_read_nested(struct rw_semaphore *rwsem, int subclass) -+{ -+ __rt_down_read(rwsem, subclass); -+} -+EXPORT_SYMBOL(rt_down_read_nested); -+ -+void __rt_rwsem_init(struct rw_semaphore *rwsem, const char *name, -+ struct lock_class_key *key) -+{ -+#ifdef CONFIG_DEBUG_LOCK_ALLOC -+ /* -+ * Make sure we are not reinitializing a held lock: -+ */ -+ debug_check_no_locks_freed((void *)rwsem, sizeof(*rwsem)); -+ lockdep_init_map(&rwsem->dep_map, name, key, 0); -+#endif -+ rwsem->read_depth = 0; -+ rwsem->lock.save_state = 0; -+} -+EXPORT_SYMBOL(__rt_rwsem_init); -+ +/** + * atomic_dec_and_mutex_lock - return holding mutex if we dec to 0 + * @cnt: the atomic which we are to dec @@ -12180,9 +13414,9 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rt.c linux-4.9.6/kernel/locking/rt.c + return 1; +} +EXPORT_SYMBOL(atomic_dec_and_mutex_lock); -diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/rtmutex.c ---- linux-4.9.6.orig/kernel/locking/rtmutex.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/rtmutex.c 2017-01-28 13:59:10.035660185 +0100 +diff -Nur linux-4.9.22.orig/kernel/locking/rtmutex.c linux-4.9.22/kernel/locking/rtmutex.c +--- linux-4.9.22.orig/kernel/locking/rtmutex.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/rtmutex.c 2017-04-18 17:19:16.690773540 +0200 @@ -7,6 +7,11 @@ * Copyright (C) 2005-2006 Timesys Corp., Thomas Gleixner <tglx@timesys.com> * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt @@ -12337,10 +13571,14 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r /* * The current top waiter stays enqueued. We * don't have to change anything in the lock -@@ -941,6 +983,433 @@ - return 1; - } +@@ -936,10 +978,394 @@ + */ + rt_mutex_set_owner(lock, task); +- rt_mutex_deadlock_account_lock(lock, task); ++ return 1; ++} ++ +#ifdef CONFIG_PREEMPT_RT_FULL +/* + * preemptible spin_lock functions: @@ -12356,19 +13594,18 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + migrate_disable(); + + if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) -+ rt_mutex_deadlock_account_lock(lock, current); ++ return; + else + slowfn(lock, do_mig_dis); +} + -+static inline int rt_spin_lock_fastunlock(struct rt_mutex *lock, -+ int (*slowfn)(struct rt_mutex *lock)) ++static inline void rt_spin_lock_fastunlock(struct rt_mutex *lock, ++ void (*slowfn)(struct rt_mutex *lock)) +{ -+ if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { -+ rt_mutex_deadlock_account_unlock(current); -+ return 0; -+ } -+ return slowfn(lock); ++ if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) ++ return; ++ else ++ slowfn(lock); +} +#ifdef CONFIG_SMP +/* @@ -12379,7 +13616,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + struct task_struct *owner) +{ + int res = 0; -+ + + rcu_read_lock(); + for (;;) { + if (owner != rt_mutex_owner(lock)) @@ -12402,8 +13639,8 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +static int adaptive_wait(struct rt_mutex *lock, + struct task_struct *orig_owner) +{ -+ return 1; -+} + return 1; + } +#endif + +static int task_blocks_on_rt_mutex(struct rt_mutex *lock, @@ -12509,7 +13746,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +/* + * Slow path to release a rt_mutex spin_lock style + */ -+static int noinline __sched rt_spin_lock_slowunlock(struct rt_mutex *lock) ++static void noinline __sched rt_spin_lock_slowunlock(struct rt_mutex *lock) +{ + unsigned long flags; + WAKE_Q(wake_q); @@ -12519,12 +13756,10 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + + debug_rt_mutex_unlock(lock); + -+ rt_mutex_deadlock_account_unlock(current); -+ + if (!rt_mutex_has_waiters(lock)) { + lock->owner = NULL; + raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -+ return 0; ++ return; + } + + mark_wakeup_next_waiter(&wake_q, &wake_sleeper_q, lock); @@ -12535,33 +13770,6 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + + /* Undo pi boosting.when necessary */ + rt_mutex_adjust_prio(current); -+ return 0; -+} -+ -+static int noinline __sched rt_spin_lock_slowunlock_no_deboost(struct rt_mutex *lock) -+{ -+ unsigned long flags; -+ WAKE_Q(wake_q); -+ WAKE_Q(wake_sleeper_q); -+ -+ raw_spin_lock_irqsave(&lock->wait_lock, flags); -+ -+ debug_rt_mutex_unlock(lock); -+ -+ rt_mutex_deadlock_account_unlock(current); -+ -+ if (!rt_mutex_has_waiters(lock)) { -+ lock->owner = NULL; -+ raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -+ return 0; -+ } -+ -+ mark_wakeup_next_waiter(&wake_q, &wake_sleeper_q, lock); -+ -+ raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -+ wake_up_q(&wake_q); -+ wake_up_q_sleeper(&wake_sleeper_q); -+ return 1; +} + +void __lockfunc rt_spin_lock__no_mg(spinlock_t *lock) @@ -12616,17 +13824,6 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +} +EXPORT_SYMBOL(rt_spin_unlock); + -+int __lockfunc rt_spin_unlock_no_deboost(spinlock_t *lock) -+{ -+ int ret; -+ -+ /* NOTE: we always pass in '1' for nested, for simplicity */ -+ spin_release(&lock->dep_map, 1, _RET_IP_); -+ ret = rt_spin_lock_fastunlock(&lock->lock, rt_spin_lock_slowunlock_no_deboost); -+ migrate_enable(); -+ return ret; -+} -+ +void __lockfunc __rt_spin_unlock(struct rt_mutex *lock) +{ + rt_spin_lock_fastunlock(lock, rt_spin_lock_slowunlock); @@ -12767,11 +13964,10 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +{ + return __try_to_take_rt_mutex(lock, task, waiter, STEAL_NORMAL); +} -+ + /* * Task blocks on lock. - * -@@ -971,6 +1440,23 @@ +@@ -971,6 +1397,23 @@ return -EDEADLK; raw_spin_lock(&task->pi_lock); @@ -12795,7 +13991,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r __rt_mutex_adjust_prio(task); waiter->task = task; waiter->lock = lock; -@@ -994,7 +1480,7 @@ +@@ -994,7 +1437,7 @@ rt_mutex_enqueue_pi(owner, waiter); __rt_mutex_adjust_prio(owner); @@ -12804,7 +14000,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r chain_walk = 1; } else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) { chain_walk = 1; -@@ -1036,6 +1522,7 @@ +@@ -1036,6 +1479,7 @@ * Called with lock->wait_lock held and interrupts disabled. */ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q, @@ -12812,7 +14008,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r struct rt_mutex *lock) { struct rt_mutex_waiter *waiter; -@@ -1064,7 +1551,10 @@ +@@ -1064,7 +1508,10 @@ raw_spin_unlock(¤t->pi_lock); @@ -12824,7 +14020,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r } /* -@@ -1078,7 +1568,7 @@ +@@ -1078,7 +1525,7 @@ { bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock)); struct task_struct *owner = rt_mutex_owner(lock); @@ -12833,7 +14029,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r raw_spin_lock(¤t->pi_lock); rt_mutex_dequeue(lock, waiter); -@@ -1102,7 +1592,8 @@ +@@ -1102,7 +1549,8 @@ __rt_mutex_adjust_prio(owner); /* Store the lock on which owner is blocked or NULL */ @@ -12843,7 +14039,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r raw_spin_unlock(&owner->pi_lock); -@@ -1138,17 +1629,17 @@ +@@ -1138,21 +1586,30 @@ raw_spin_lock_irqsave(&task->pi_lock, flags); waiter = task->pi_blocked_on; @@ -12863,7 +14059,20 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r rt_mutex_adjust_prio_chain(task, RT_MUTEX_MIN_CHAINWALK, NULL, next_lock, NULL, task); } -@@ -1166,7 +1657,8 @@ + ++void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter, bool savestate) ++{ ++ debug_rt_mutex_init_waiter(waiter); ++ RB_CLEAR_NODE(&waiter->pi_tree_entry); ++ RB_CLEAR_NODE(&waiter->tree_entry); ++ waiter->task = NULL; ++ waiter->savestate = savestate; ++} ++ + /** + * __rt_mutex_slowlock() - Perform the wait-wake-try-to-take loop + * @lock: the rt_mutex to take +@@ -1166,7 +1623,8 @@ static int __sched __rt_mutex_slowlock(struct rt_mutex *lock, int state, struct hrtimer_sleeper *timeout, @@ -12873,26 +14082,51 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r { int ret = 0; -@@ -1189,6 +1681,12 @@ - break; - } +@@ -1175,16 +1633,17 @@ + if (try_to_take_rt_mutex(lock, current, waiter)) + break; -+ if (ww_ctx && ww_ctx->acquired > 0) { -+ ret = __mutex_lock_check_stamp(lock, ww_ctx); -+ if (ret) -+ break; +- /* +- * TASK_INTERRUPTIBLE checks for signals and +- * timeout. Ignored otherwise. +- */ +- if (unlikely(state == TASK_INTERRUPTIBLE)) { +- /* Signal pending? */ +- if (signal_pending(current)) +- ret = -EINTR; +- if (timeout && !timeout->task) +- ret = -ETIMEDOUT; ++ if (timeout && !timeout->task) { ++ ret = -ETIMEDOUT; ++ break; ++ } ++ if (signal_pending_state(state, current)) { ++ ret = -EINTR; ++ break; + } + - raw_spin_unlock_irq(&lock->wait_lock); - - debug_rt_mutex_print_deadlock(waiter); -@@ -1223,21 +1721,96 @@ ++ if (ww_ctx && ww_ctx->acquired > 0) { ++ ret = __mutex_lock_check_stamp(lock, ww_ctx); + if (ret) + break; + } +@@ -1223,35 +1682,94 @@ } } +-/* +- * Slow path lock function: +- */ +-static int __sched +-rt_mutex_slowlock(struct rt_mutex *lock, int state, +- struct hrtimer_sleeper *timeout, +- enum rtmutex_chainwalk chwalk) +static __always_inline void ww_mutex_lock_acquired(struct ww_mutex *ww, + struct ww_acquire_ctx *ww_ctx) -+{ + { +- struct rt_mutex_waiter waiter; +- unsigned long flags; +- int ret = 0; +#ifdef CONFIG_DEBUG_MUTEXES + /* + * If this WARN_ON triggers, you used ww_mutex_lock to acquire, @@ -12901,7 +14135,10 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + * This should never happen, always use ww_mutex_unlock. + */ + DEBUG_LOCKS_WARN_ON(ww->ctx); -+ + +- debug_rt_mutex_init_waiter(&waiter); +- RB_CLEAR_NODE(&waiter.pi_tree_entry); +- RB_CLEAR_NODE(&waiter.tree_entry); + /* + * Not quite done after calling ww_acquire_done() ? + */ @@ -12921,10 +14158,17 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + DEBUG_LOCKS_WARN_ON(ww_ctx->acquired > 0); + ww_ctx->contending_lock = NULL; + } -+ -+ /* + + /* +- * Technically we could use raw_spin_[un]lock_irq() here, but this can +- * be called in early boot if the cmpxchg() fast path is disabled +- * (debug, no architecture support). In this case we will acquire the +- * rtmutex with lock->wait_lock held. But we cannot unconditionally +- * enable interrupts in that early boot case. So we need to use the +- * irqsave/restore variants. + * Naughty, using a different class will lead to undefined behavior! -+ */ + */ +- raw_spin_lock_irqsave(&lock->wait_lock, flags); + DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class); +#endif + ww_ctx->acquired++; @@ -12966,44 +14210,36 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +} +#endif + - /* - * Slow path lock function: - */ - static int __sched - rt_mutex_slowlock(struct rt_mutex *lock, int state, - struct hrtimer_sleeper *timeout, -- enum rtmutex_chainwalk chwalk) -+ enum rtmutex_chainwalk chwalk, -+ struct ww_acquire_ctx *ww_ctx) - { - struct rt_mutex_waiter waiter; - unsigned long flags; - int ret = 0; - -- debug_rt_mutex_init_waiter(&waiter); -- RB_CLEAR_NODE(&waiter.pi_tree_entry); -- RB_CLEAR_NODE(&waiter.tree_entry); -+ rt_mutex_init_waiter(&waiter, false); - - /* - * Technically we could use raw_spin_[un]lock_irq() here, but this can -@@ -1251,6 +1824,8 @@ ++int __sched rt_mutex_slowlock_locked(struct rt_mutex *lock, int state, ++ struct hrtimer_sleeper *timeout, ++ enum rtmutex_chainwalk chwalk, ++ struct ww_acquire_ctx *ww_ctx, ++ struct rt_mutex_waiter *waiter) ++{ ++ int ret; /* Try to acquire the lock again: */ if (try_to_take_rt_mutex(lock, current, NULL)) { +- raw_spin_unlock_irqrestore(&lock->wait_lock, flags); + if (ww_ctx) + ww_mutex_account_lock(lock, ww_ctx); - raw_spin_unlock_irqrestore(&lock->wait_lock, flags); return 0; } -@@ -1265,13 +1840,23 @@ - if (likely(!ret)) +@@ -1261,17 +1779,27 @@ + if (unlikely(timeout)) + hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS); + +- ret = task_blocks_on_rt_mutex(lock, &waiter, current, chwalk); ++ ret = task_blocks_on_rt_mutex(lock, waiter, current, chwalk); + +- if (likely(!ret)) ++ if (likely(!ret)) { /* sleep on the mutex */ - ret = __rt_mutex_slowlock(lock, state, timeout, &waiter); -+ ret = __rt_mutex_slowlock(lock, state, timeout, &waiter, ++ ret = __rt_mutex_slowlock(lock, state, timeout, waiter, + ww_ctx); -+ else if (ww_ctx) { ++ } else if (ww_ctx) { + /* ww_mutex received EDEADLK, let it become EALREADY */ + ret = __mutex_lock_check_stamp(lock, ww_ctx); + BUG_ON(!ret); @@ -13012,17 +14248,55 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r if (unlikely(ret)) { __set_current_state(TASK_RUNNING); if (rt_mutex_has_waiters(lock)) - remove_waiter(lock, &waiter); +- remove_waiter(lock, &waiter); - rt_mutex_handle_deadlock(ret, chwalk, &waiter); ++ remove_waiter(lock, waiter); + /* ww_mutex want to report EDEADLK/EALREADY, let them */ + if (!ww_ctx) -+ rt_mutex_handle_deadlock(ret, chwalk, &waiter); ++ rt_mutex_handle_deadlock(ret, chwalk, waiter); + } else if (ww_ctx) { + ww_mutex_account_lock(lock, ww_ctx); } /* -@@ -1331,7 +1916,8 @@ +@@ -1279,6 +1807,36 @@ + * unconditionally. We might have to fix that up. + */ + fixup_rt_mutex_waiters(lock); ++ return ret; ++} ++ ++/* ++ * Slow path lock function: ++ */ ++static int __sched ++rt_mutex_slowlock(struct rt_mutex *lock, int state, ++ struct hrtimer_sleeper *timeout, ++ enum rtmutex_chainwalk chwalk, ++ struct ww_acquire_ctx *ww_ctx) ++{ ++ struct rt_mutex_waiter waiter; ++ unsigned long flags; ++ int ret = 0; ++ ++ rt_mutex_init_waiter(&waiter, false); ++ ++ /* ++ * Technically we could use raw_spin_[un]lock_irq() here, but this can ++ * be called in early boot if the cmpxchg() fast path is disabled ++ * (debug, no architecture support). In this case we will acquire the ++ * rtmutex with lock->wait_lock held. But we cannot unconditionally ++ * enable interrupts in that early boot case. So we need to use the ++ * irqsave/restore variants. ++ */ ++ raw_spin_lock_irqsave(&lock->wait_lock, flags); ++ ++ ret = rt_mutex_slowlock_locked(lock, state, timeout, chwalk, ww_ctx, ++ &waiter); + + raw_spin_unlock_irqrestore(&lock->wait_lock, flags); + +@@ -1331,7 +1889,8 @@ * Return whether the current task needs to undo a potential priority boosting. */ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, @@ -13032,7 +14306,16 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r { unsigned long flags; -@@ -1387,7 +1973,7 @@ +@@ -1340,8 +1899,6 @@ + + debug_rt_mutex_unlock(lock); + +- rt_mutex_deadlock_account_unlock(current); +- + /* + * We must be careful here if the fast path is enabled. If we + * have no waiters queued we cannot set owner to NULL here +@@ -1387,7 +1944,7 @@ * * Queue the next waiter for wakeup once we release the wait_lock. */ @@ -13041,7 +14324,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -@@ -1403,31 +1989,36 @@ +@@ -1403,63 +1960,79 @@ */ static inline int rt_mutex_fastlock(struct rt_mutex *lock, int state, @@ -13052,13 +14335,14 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + enum rtmutex_chainwalk chwalk, + struct ww_acquire_ctx *ww_ctx)) { - if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { - rt_mutex_deadlock_account_lock(lock, current); +- if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { +- rt_mutex_deadlock_account_lock(lock, current); ++ if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) return 0; - } else +- } else - return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK); -+ return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK, -+ ww_ctx); ++ ++ return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK, ww_ctx); } static inline int @@ -13073,16 +14357,29 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + struct ww_acquire_ctx *ww_ctx)) { if (chwalk == RT_MUTEX_MIN_CHAINWALK && - likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { - rt_mutex_deadlock_account_lock(lock, current); +- likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { +- rt_mutex_deadlock_account_lock(lock, current); ++ likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) return 0; - } else +- } else - return slowfn(lock, state, timeout, chwalk); -+ return slowfn(lock, state, timeout, chwalk, ww_ctx); ++ ++ return slowfn(lock, state, timeout, chwalk, ww_ctx); } static inline int -@@ -1444,17 +2035,20 @@ + rt_mutex_fasttrylock(struct rt_mutex *lock, + int (*slowfn)(struct rt_mutex *lock)) + { +- if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) { +- rt_mutex_deadlock_account_lock(lock, current); ++ if (likely(rt_mutex_cmpxchg_acquire(lock, NULL, current))) + return 1; +- } ++ + return slowfn(lock); + } + static inline void rt_mutex_fastunlock(struct rt_mutex *lock, bool (*slowfn)(struct rt_mutex *lock, @@ -13092,47 +14389,76 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r { WAKE_Q(wake_q); + WAKE_Q(wake_sleeper_q); ++ bool deboost; - if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { - rt_mutex_deadlock_account_unlock(current); +- if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { +- rt_mutex_deadlock_account_unlock(current); ++ if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) ++ return; - } else { +- } else { - bool deboost = slowfn(lock, &wake_q); -+ bool deboost = slowfn(lock, &wake_q, &wake_sleeper_q); ++ deboost = slowfn(lock, &wake_q, &wake_sleeper_q); - wake_up_q(&wake_q); -+ wake_up_q_sleeper(&wake_sleeper_q); +- wake_up_q(&wake_q); ++ wake_up_q(&wake_q); ++ wake_up_q_sleeper(&wake_sleeper_q); - /* Undo pi boosting if necessary: */ - if (deboost) -@@ -1471,7 +2065,7 @@ - { - might_sleep(); +- /* Undo pi boosting if necessary: */ +- if (deboost) +- rt_mutex_adjust_prio(current); +- } ++ /* Undo pi boosting if necessary: */ ++ if (deboost) ++ rt_mutex_adjust_prio(current); ++} ++ ++/** ++ * rt_mutex_lock_state - lock a rt_mutex with a given state ++ * ++ * @lock: The rt_mutex to be locked ++ * @state: The state to set when blocking on the rt_mutex ++ */ ++int __sched rt_mutex_lock_state(struct rt_mutex *lock, int state) ++{ ++ might_sleep(); ++ ++ return rt_mutex_fastlock(lock, state, NULL, rt_mutex_slowlock); + } + /** +@@ -1469,15 +2042,13 @@ + */ + void __sched rt_mutex_lock(struct rt_mutex *lock) + { +- might_sleep(); +- - rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock); -+ rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, NULL, rt_mutex_slowlock); ++ rt_mutex_lock_state(lock, TASK_UNINTERRUPTIBLE); } EXPORT_SYMBOL_GPL(rt_mutex_lock); -@@ -1488,7 +2082,7 @@ + /** + * rt_mutex_lock_interruptible - lock a rt_mutex interruptible +- * ++ ** + * @lock: the rt_mutex to be locked + * + * Returns: +@@ -1486,23 +2057,32 @@ + */ + int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) { - might_sleep(); - +- might_sleep(); +- - return rt_mutex_fastlock(lock, TASK_INTERRUPTIBLE, rt_mutex_slowlock); -+ return rt_mutex_fastlock(lock, TASK_INTERRUPTIBLE, NULL, rt_mutex_slowlock); ++ return rt_mutex_lock_state(lock, TASK_INTERRUPTIBLE); } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); -@@ -1501,11 +2095,30 @@ - might_sleep(); - - return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, -- RT_MUTEX_FULL_CHAINWALK, -+ RT_MUTEX_FULL_CHAINWALK, NULL, - rt_mutex_slowlock); - } - - /** +-/* +- * Futex variant with full deadlock detection. ++/** + * rt_mutex_lock_killable - lock a rt_mutex killable + * + * @lock: the rt_mutex to be locked @@ -13141,21 +14467,29 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + * Returns: + * 0 on success + * -EINTR when interrupted by a signal -+ * -EDEADLK when the lock would deadlock (when deadlock detection is on) -+ */ + */ +-int rt_mutex_timed_futex_lock(struct rt_mutex *lock, +- struct hrtimer_sleeper *timeout) +int __sched rt_mutex_lock_killable(struct rt_mutex *lock) -+{ -+ might_sleep(); -+ -+ return rt_mutex_fastlock(lock, TASK_KILLABLE, NULL, rt_mutex_slowlock); + { +- might_sleep(); ++ return rt_mutex_lock_state(lock, TASK_KILLABLE); +} +EXPORT_SYMBOL_GPL(rt_mutex_lock_killable); -+ -+/** - * rt_mutex_timed_lock - lock a rt_mutex interruptible - * the timeout structure is provided - * by the caller -@@ -1525,6 +2138,7 @@ + +- return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, +- RT_MUTEX_FULL_CHAINWALK, +- rt_mutex_slowlock); ++/* ++ * Futex variant, must not use fastpath. ++ */ ++int __sched rt_mutex_futex_trylock(struct rt_mutex *lock) ++{ ++ return rt_mutex_slowtrylock(lock); + } + + /** +@@ -1525,6 +2105,7 @@ return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, RT_MUTEX_MIN_CHAINWALK, @@ -13163,7 +14497,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r rt_mutex_slowlock); } EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); -@@ -1542,7 +2156,11 @@ +@@ -1542,7 +2123,11 @@ */ int __sched rt_mutex_trylock(struct rt_mutex *lock) { @@ -13175,24 +14509,60 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r return 0; return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); -@@ -1568,13 +2186,14 @@ - * required or not. +@@ -1561,20 +2146,41 @@ + EXPORT_SYMBOL_GPL(rt_mutex_unlock); + + /** +- * rt_mutex_futex_unlock - Futex variant of rt_mutex_unlock +- * @lock: the rt_mutex to be unlocked +- * +- * Returns: true/false indicating whether priority adjustment is +- * required or not. ++ * Futex variant, that since futex variants do not use the fast-path, can be ++ * simple and will not need to retry. */ - bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, +-bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, - struct wake_q_head *wqh) -+ struct wake_q_head *wqh, -+ struct wake_q_head *wq_sleeper) ++bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock, ++ struct wake_q_head *wake_q, ++ struct wake_q_head *wq_sleeper) ++{ ++ lockdep_assert_held(&lock->wait_lock); ++ ++ debug_rt_mutex_unlock(lock); ++ ++ if (!rt_mutex_has_waiters(lock)) { ++ lock->owner = NULL; ++ return false; /* done */ ++ } ++ ++ mark_wakeup_next_waiter(wake_q, wq_sleeper, lock); ++ return true; /* deboost and wakeups */ ++} ++ ++void __sched rt_mutex_futex_unlock(struct rt_mutex *lock) { - if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { - rt_mutex_deadlock_account_unlock(current); - return false; +- if (likely(rt_mutex_cmpxchg_release(lock, current, NULL))) { +- rt_mutex_deadlock_account_unlock(current); +- return false; ++ WAKE_Q(wake_q); ++ WAKE_Q(wake_sleeper_q); ++ bool deboost; ++ ++ raw_spin_lock_irq(&lock->wait_lock); ++ deboost = __rt_mutex_futex_unlock(lock, &wake_q, &wake_sleeper_q); ++ raw_spin_unlock_irq(&lock->wait_lock); ++ ++ if (deboost) { ++ wake_up_q(&wake_q); ++ wake_up_q_sleeper(&wake_sleeper_q); ++ rt_mutex_adjust_prio(current); } - return rt_mutex_slowunlock(lock, wqh); -+ return rt_mutex_slowunlock(lock, wqh, wq_sleeper); } /** -@@ -1607,13 +2226,12 @@ +@@ -1607,13 +2213,12 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name) { lock->owner = NULL; @@ -13207,7 +14577,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r /** * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a -@@ -1628,7 +2246,7 @@ +@@ -1628,10 +2233,9 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) { @@ -13215,11 +14585,42 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + rt_mutex_init(lock); debug_rt_mutex_proxy_lock(lock, proxy_owner); rt_mutex_set_owner(lock, proxy_owner); - rt_mutex_deadlock_account_lock(lock, proxy_owner); -@@ -1676,6 +2294,35 @@ - return 1; - } +- rt_mutex_deadlock_account_lock(lock, proxy_owner); + } + + /** +@@ -1647,34 +2251,45 @@ + { + debug_rt_mutex_proxy_unlock(lock); + rt_mutex_set_owner(lock, NULL); +- rt_mutex_deadlock_account_unlock(proxy_owner); + } + +-/** +- * rt_mutex_start_proxy_lock() - Start lock acquisition for another task +- * @lock: the rt_mutex to take +- * @waiter: the pre-initialized rt_mutex_waiter +- * @task: the task to prepare +- * +- * Returns: +- * 0 - task blocked on lock +- * 1 - acquired the lock for task, caller should wake it up +- * <0 - error +- * +- * Special API call for FUTEX_REQUEUE_PI support. +- */ +-int rt_mutex_start_proxy_lock(struct rt_mutex *lock, ++int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, + struct rt_mutex_waiter *waiter, + struct task_struct *task) + { + int ret; + +- raw_spin_lock_irq(&lock->wait_lock); ++ if (try_to_take_rt_mutex(lock, task, NULL)) ++ return 1; +- if (try_to_take_rt_mutex(lock, task, NULL)) { +#ifdef CONFIG_PREEMPT_RT_FULL + /* + * In PREEMPT_RT there's an added race. @@ -13242,17 +14643,17 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + raw_spin_lock(&task->pi_lock); + if (task->pi_blocked_on) { + raw_spin_unlock(&task->pi_lock); -+ raw_spin_unlock_irq(&lock->wait_lock); + raw_spin_unlock_irq(&lock->wait_lock); +- return 1; + return -EAGAIN; -+ } + } + task->pi_blocked_on = PI_REQUEUE_INPROGRESS; + raw_spin_unlock(&task->pi_lock); +#endif -+ + /* We enforce deadlock detection for futexes */ ret = task_blocks_on_rt_mutex(lock, waiter, task, - RT_MUTEX_FULL_CHAINWALK); -@@ -1690,7 +2337,7 @@ +@@ -1690,17 +2305,41 @@ ret = 0; } @@ -13260,20 +14661,127 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + if (ret && rt_mutex_has_waiters(lock)) remove_waiter(lock, waiter); - raw_spin_unlock_irq(&lock->wait_lock); -@@ -1746,7 +2393,7 @@ +- raw_spin_unlock_irq(&lock->wait_lock); +- + debug_rt_mutex_print_deadlock(waiter); + + return ret; + } + + /** ++ * rt_mutex_start_proxy_lock() - Start lock acquisition for another task ++ * @lock: the rt_mutex to take ++ * @waiter: the pre-initialized rt_mutex_waiter ++ * @task: the task to prepare ++ * ++ * Returns: ++ * 0 - task blocked on lock ++ * 1 - acquired the lock for task, caller should wake it up ++ * <0 - error ++ * ++ * Special API call for FUTEX_REQUEUE_PI support. ++ */ ++int rt_mutex_start_proxy_lock(struct rt_mutex *lock, ++ struct rt_mutex_waiter *waiter, ++ struct task_struct *task) ++{ ++ int ret; ++ ++ raw_spin_lock_irq(&lock->wait_lock); ++ ret = __rt_mutex_start_proxy_lock(lock, waiter, task); ++ raw_spin_unlock_irq(&lock->wait_lock); ++ ++ return ret; ++} ++ ++/** + * rt_mutex_next_owner - return the next owner of the lock + * + * @lock: the rt lock query +@@ -1721,21 +2360,23 @@ + } + + /** +- * rt_mutex_finish_proxy_lock() - Complete lock acquisition ++ * rt_mutex_wait_proxy_lock() - Wait for lock acquisition + * @lock: the rt_mutex we were woken on + * @to: the timeout, null if none. hrtimer should already have + * been started. + * @waiter: the pre-initialized rt_mutex_waiter + * +- * Complete the lock acquisition started our behalf by another thread. ++ * Wait for the the lock acquisition started on our behalf by ++ * rt_mutex_start_proxy_lock(). Upon failure, the caller must call ++ * rt_mutex_cleanup_proxy_lock(). + * + * Returns: + * 0 - success + * <0 - error, one of -EINTR, -ETIMEDOUT + * +- * Special API call for PI-futex requeue support ++ * Special API call for PI-futex support + */ +-int rt_mutex_finish_proxy_lock(struct rt_mutex *lock, ++int rt_mutex_wait_proxy_lock(struct rt_mutex *lock, + struct hrtimer_sleeper *to, + struct rt_mutex_waiter *waiter) + { +@@ -1746,10 +2387,47 @@ set_current_state(TASK_INTERRUPTIBLE); /* sleep on the mutex */ - ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter); + ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter, NULL); - if (unlikely(ret)) +- if (unlikely(ret)) ++ raw_spin_unlock_irq(&lock->wait_lock); ++ ++ return ret; ++} ++ ++/** ++ * rt_mutex_cleanup_proxy_lock() - Cleanup failed lock acquisition ++ * @lock: the rt_mutex we were woken on ++ * @waiter: the pre-initialized rt_mutex_waiter ++ * ++ * Attempt to clean up after a failed rt_mutex_wait_proxy_lock(). ++ * ++ * Unless we acquired the lock; we're still enqueued on the wait-list and can ++ * in fact still be granted ownership until we're removed. Therefore we can ++ * find we are in fact the owner and must disregard the ++ * rt_mutex_wait_proxy_lock() failure. ++ * ++ * Returns: ++ * true - did the cleanup, we done. ++ * false - we acquired the lock after rt_mutex_wait_proxy_lock() returned, ++ * caller should disregards its return value. ++ * ++ * Special API call for PI-futex support ++ */ ++bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock, ++ struct rt_mutex_waiter *waiter) ++{ ++ bool cleanup = false; ++ ++ raw_spin_lock_irq(&lock->wait_lock); ++ /* ++ * Unless we're the owner; we're still enqueued on the wait_list. ++ * So check if we became owner, if not, take us off the wait_list. ++ */ ++ if (rt_mutex_owner(lock) != current) { remove_waiter(lock, waiter); -@@ -1761,3 +2408,89 @@ ++ fixup_rt_mutex_waiters(lock); ++ cleanup = true; ++ } - return ret; - } + /* + * try_to_take_rt_mutex() sets the waiter bit unconditionally. We might +@@ -1759,5 +2437,91 @@ + + raw_spin_unlock_irq(&lock->wait_lock); + ++ return cleanup; ++} + +static inline int +ww_mutex_deadlock_injection(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) @@ -13316,8 +14824,8 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r + else if (!ret && ww_ctx->acquired > 1) + return ww_mutex_deadlock_injection(lock, ww_ctx); + -+ return ret; -+} + return ret; + } +EXPORT_SYMBOL_GPL(__ww_mutex_lock_interruptible); + +int __sched @@ -13360,9 +14868,9 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/r +} +EXPORT_SYMBOL(ww_mutex_unlock); +#endif -diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex_common.h linux-4.9.6/kernel/locking/rtmutex_common.h ---- linux-4.9.6.orig/kernel/locking/rtmutex_common.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/rtmutex_common.h 2017-01-28 13:59:10.035660185 +0100 +diff -Nur linux-4.9.22.orig/kernel/locking/rtmutex_common.h linux-4.9.22/kernel/locking/rtmutex_common.h +--- linux-4.9.22.orig/kernel/locking/rtmutex_common.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/rtmutex_common.h 2017-04-18 17:19:16.690773540 +0200 @@ -27,6 +27,7 @@ struct rb_node pi_tree_entry; struct task_struct *task; @@ -13371,7 +14879,7 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex_common.h linux-4.9.6/kernel/lo #ifdef CONFIG_DEBUG_RT_MUTEXES unsigned long ip; struct pid *deadlock_task_pid; -@@ -98,6 +99,9 @@ +@@ -98,22 +99,45 @@ /* * PI-futex support (proxy locking functions, etc.): */ @@ -13381,34 +14889,364 @@ diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex_common.h linux-4.9.6/kernel/lo extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner); -@@ -111,7 +115,8 @@ - struct rt_mutex_waiter *waiter); - extern int rt_mutex_timed_futex_lock(struct rt_mutex *l, struct hrtimer_sleeper *to); - extern bool rt_mutex_futex_unlock(struct rt_mutex *lock, + extern void rt_mutex_proxy_unlock(struct rt_mutex *lock, + struct task_struct *proxy_owner); ++extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter, bool savetate); ++extern int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, ++ struct rt_mutex_waiter *waiter, ++ struct task_struct *task); + extern int rt_mutex_start_proxy_lock(struct rt_mutex *lock, + struct rt_mutex_waiter *waiter, + struct task_struct *task); +-extern int rt_mutex_finish_proxy_lock(struct rt_mutex *lock, +- struct hrtimer_sleeper *to, +- struct rt_mutex_waiter *waiter); +-extern int rt_mutex_timed_futex_lock(struct rt_mutex *l, struct hrtimer_sleeper *to); +-extern bool rt_mutex_futex_unlock(struct rt_mutex *lock, - struct wake_q_head *wqh); -+ struct wake_q_head *wqh, -+ struct wake_q_head *wq_sleeper); ++extern int rt_mutex_wait_proxy_lock(struct rt_mutex *lock, ++ struct hrtimer_sleeper *to, ++ struct rt_mutex_waiter *waiter); ++extern bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock, ++ struct rt_mutex_waiter *waiter); ++ ++extern int rt_mutex_futex_trylock(struct rt_mutex *l); ++ ++extern void rt_mutex_futex_unlock(struct rt_mutex *lock); ++extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock, ++ struct wake_q_head *wqh, ++ struct wake_q_head *wq_sleeper); ++ extern void rt_mutex_adjust_prio(struct task_struct *task); ++/* RW semaphore special interface */ ++struct ww_acquire_ctx; ++ ++int __sched rt_mutex_slowlock_locked(struct rt_mutex *lock, int state, ++ struct hrtimer_sleeper *timeout, ++ enum rtmutex_chainwalk chwalk, ++ struct ww_acquire_ctx *ww_ctx, ++ struct rt_mutex_waiter *waiter); ++ #ifdef CONFIG_DEBUG_RT_MUTEXES -@@ -120,4 +125,14 @@ - # include "rtmutex.h" - #endif + # include "rtmutex-debug.h" + #else +diff -Nur linux-4.9.22.orig/kernel/locking/rtmutex-debug.c linux-4.9.22/kernel/locking/rtmutex-debug.c +--- linux-4.9.22.orig/kernel/locking/rtmutex-debug.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/rtmutex-debug.c 2017-04-18 17:19:16.690773540 +0200 +@@ -173,12 +173,3 @@ + lock->name = name; + } -+static inline void -+rt_mutex_init_waiter(struct rt_mutex_waiter *waiter, bool savestate) +-void +-rt_mutex_deadlock_account_lock(struct rt_mutex *lock, struct task_struct *task) +-{ +-} +- +-void rt_mutex_deadlock_account_unlock(struct task_struct *task) +-{ +-} +- +diff -Nur linux-4.9.22.orig/kernel/locking/rtmutex-debug.h linux-4.9.22/kernel/locking/rtmutex-debug.h +--- linux-4.9.22.orig/kernel/locking/rtmutex-debug.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/rtmutex-debug.h 2017-04-18 17:19:16.690773540 +0200 +@@ -9,9 +9,6 @@ + * This file contains macros used solely by rtmutex.c. Debug version. + */ + +-extern void +-rt_mutex_deadlock_account_lock(struct rt_mutex *lock, struct task_struct *task); +-extern void rt_mutex_deadlock_account_unlock(struct task_struct *task); + extern void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter); + extern void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter); + extern void debug_rt_mutex_init(struct rt_mutex *lock, const char *name); +diff -Nur linux-4.9.22.orig/kernel/locking/rtmutex.h linux-4.9.22/kernel/locking/rtmutex.h +--- linux-4.9.22.orig/kernel/locking/rtmutex.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/rtmutex.h 2017-04-18 17:19:16.690773540 +0200 +@@ -11,8 +11,6 @@ + */ + + #define rt_mutex_deadlock_check(l) (0) +-#define rt_mutex_deadlock_account_lock(m, t) do { } while (0) +-#define rt_mutex_deadlock_account_unlock(l) do { } while (0) + #define debug_rt_mutex_init_waiter(w) do { } while (0) + #define debug_rt_mutex_free_waiter(w) do { } while (0) + #define debug_rt_mutex_lock(l) do { } while (0) +diff -Nur linux-4.9.22.orig/kernel/locking/rwsem-rt.c linux-4.9.22/kernel/locking/rwsem-rt.c +--- linux-4.9.22.orig/kernel/locking/rwsem-rt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/kernel/locking/rwsem-rt.c 2017-04-18 17:19:16.690773540 +0200 +@@ -0,0 +1,268 @@ ++/* ++ */ ++#include <linux/rwsem.h> ++#include <linux/sched.h> ++#include <linux/export.h> ++ ++#include "rtmutex_common.h" ++ ++/* ++ * RT-specific reader/writer semaphores ++ * ++ * down_write() ++ * 1) Lock sem->rtmutex ++ * 2) Remove the reader BIAS to force readers into the slow path ++ * 3) Wait until all readers have left the critical region ++ * 4) Mark it write locked ++ * ++ * up_write() ++ * 1) Remove the write locked marker ++ * 2) Set the reader BIAS so readers can use the fast path again ++ * 3) Unlock sem->rtmutex to release blocked readers ++ * ++ * down_read() ++ * 1) Try fast path acquisition (reader BIAS is set) ++ * 2) Take sem->rtmutex.wait_lock which protects the writelocked flag ++ * 3) If !writelocked, acquire it for read ++ * 4) If writelocked, block on sem->rtmutex ++ * 5) unlock sem->rtmutex, goto 1) ++ * ++ * up_read() ++ * 1) Try fast path release (reader count != 1) ++ * 2) Wake the writer waiting in down_write()#3 ++ * ++ * down_read()#3 has the consequence, that rw semaphores on RT are not writer ++ * fair, but writers, which should be avoided in RT tasks (think mmap_sem), ++ * are subject to the rtmutex priority/DL inheritance mechanism. ++ * ++ * It's possible to make the rw semaphores writer fair by keeping a list of ++ * active readers. A blocked writer would force all newly incoming readers to ++ * block on the rtmutex, but the rtmutex would have to be proxy locked for one ++ * reader after the other. We can't use multi-reader inheritance because there ++ * is no way to support that with SCHED_DEADLINE. Implementing the one by one ++ * reader boosting/handover mechanism is a major surgery for a very dubious ++ * value. ++ * ++ * The risk of writer starvation is there, but the pathological use cases ++ * which trigger it are not necessarily the typical RT workloads. ++ */ ++ ++void __rwsem_init(struct rw_semaphore *sem, const char *name, ++ struct lock_class_key *key) +{ -+ debug_rt_mutex_init_waiter(waiter); -+ waiter->task = NULL; -+ waiter->savestate = savestate; -+ RB_CLEAR_NODE(&waiter->pi_tree_entry); -+ RB_CLEAR_NODE(&waiter->tree_entry); ++#ifdef CONFIG_DEBUG_LOCK_ALLOC ++ /* ++ * Make sure we are not reinitializing a held semaphore: ++ */ ++ debug_check_no_locks_freed((void *)sem, sizeof(*sem)); ++ lockdep_init_map(&sem->dep_map, name, key, 0); ++#endif ++ atomic_set(&sem->readers, READER_BIAS); +} ++EXPORT_SYMBOL(__rwsem_init); + - #endif -diff -Nur linux-4.9.6.orig/kernel/locking/spinlock.c linux-4.9.6/kernel/locking/spinlock.c ---- linux-4.9.6.orig/kernel/locking/spinlock.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/spinlock.c 2017-01-28 13:59:10.035660185 +0100 ++int __down_read_trylock(struct rw_semaphore *sem) ++{ ++ int r, old; ++ ++ /* ++ * Increment reader count, if sem->readers < 0, i.e. READER_BIAS is ++ * set. ++ */ ++ for (r = atomic_read(&sem->readers); r < 0;) { ++ old = atomic_cmpxchg(&sem->readers, r, r + 1); ++ if (likely(old == r)) ++ return 1; ++ r = old; ++ } ++ return 0; ++} ++ ++void __sched __down_read(struct rw_semaphore *sem) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ struct rt_mutex_waiter waiter; ++ ++ if (__down_read_trylock(sem)) ++ return; ++ ++ might_sleep(); ++ raw_spin_lock_irq(&m->wait_lock); ++ /* ++ * Allow readers as long as the writer has not completely ++ * acquired the semaphore for write. ++ */ ++ if (atomic_read(&sem->readers) != WRITER_BIAS) { ++ atomic_inc(&sem->readers); ++ raw_spin_unlock_irq(&m->wait_lock); ++ return; ++ } ++ ++ /* ++ * Call into the slow lock path with the rtmutex->wait_lock ++ * held, so this can't result in the following race: ++ * ++ * Reader1 Reader2 Writer ++ * down_read() ++ * down_write() ++ * rtmutex_lock(m) ++ * swait() ++ * down_read() ++ * unlock(m->wait_lock) ++ * up_read() ++ * swake() ++ * lock(m->wait_lock) ++ * sem->writelocked=true ++ * unlock(m->wait_lock) ++ * ++ * up_write() ++ * sem->writelocked=false ++ * rtmutex_unlock(m) ++ * down_read() ++ * down_write() ++ * rtmutex_lock(m) ++ * swait() ++ * rtmutex_lock(m) ++ * ++ * That would put Reader1 behind the writer waiting on ++ * Reader2 to call up_read() which might be unbound. ++ */ ++ rt_mutex_init_waiter(&waiter, false); ++ rt_mutex_slowlock_locked(m, TASK_UNINTERRUPTIBLE, NULL, ++ RT_MUTEX_MIN_CHAINWALK, NULL, ++ &waiter); ++ /* ++ * The slowlock() above is guaranteed to return with the rtmutex is ++ * now held, so there can't be a writer active. Increment the reader ++ * count and immediately drop the rtmutex again. ++ */ ++ atomic_inc(&sem->readers); ++ raw_spin_unlock_irq(&m->wait_lock); ++ rt_mutex_unlock(m); ++ ++ debug_rt_mutex_free_waiter(&waiter); ++} ++ ++void __up_read(struct rw_semaphore *sem) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ struct task_struct *tsk; ++ ++ /* ++ * sem->readers can only hit 0 when a writer is waiting for the ++ * active readers to leave the critical region. ++ */ ++ if (!atomic_dec_and_test(&sem->readers)) ++ return; ++ ++ might_sleep(); ++ raw_spin_lock_irq(&m->wait_lock); ++ /* ++ * Wake the writer, i.e. the rtmutex owner. It might release the ++ * rtmutex concurrently in the fast path (due to a signal), but to ++ * clean up the rwsem it needs to acquire m->wait_lock. The worst ++ * case which can happen is a spurious wakeup. ++ */ ++ tsk = rt_mutex_owner(m); ++ if (tsk) ++ wake_up_process(tsk); ++ ++ raw_spin_unlock_irq(&m->wait_lock); ++} ++ ++static void __up_write_unlock(struct rw_semaphore *sem, int bias, ++ unsigned long flags) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ ++ atomic_add(READER_BIAS - bias, &sem->readers); ++ raw_spin_unlock_irqrestore(&m->wait_lock, flags); ++ rt_mutex_unlock(m); ++} ++ ++static int __sched __down_write_common(struct rw_semaphore *sem, int state) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ unsigned long flags; ++ ++ /* Take the rtmutex as a first step */ ++ if (rt_mutex_lock_state(m, state)) ++ return -EINTR; ++ ++ /* Force readers into slow path */ ++ atomic_sub(READER_BIAS, &sem->readers); ++ might_sleep(); ++ ++ set_current_state(state); ++ for (;;) { ++ raw_spin_lock_irqsave(&m->wait_lock, flags); ++ /* Have all readers left the critical region? */ ++ if (!atomic_read(&sem->readers)) { ++ atomic_set(&sem->readers, WRITER_BIAS); ++ __set_current_state(TASK_RUNNING); ++ raw_spin_unlock_irqrestore(&m->wait_lock, flags); ++ return 0; ++ } ++ ++ if (signal_pending_state(state, current)) { ++ __set_current_state(TASK_RUNNING); ++ __up_write_unlock(sem, 0, flags); ++ return -EINTR; ++ } ++ raw_spin_unlock_irqrestore(&m->wait_lock, flags); ++ ++ if (atomic_read(&sem->readers) != 0) { ++ schedule(); ++ set_current_state(state); ++ } ++ } ++} ++ ++void __sched __down_write(struct rw_semaphore *sem) ++{ ++ __down_write_common(sem, TASK_UNINTERRUPTIBLE); ++} ++ ++int __sched __down_write_killable(struct rw_semaphore *sem) ++{ ++ return __down_write_common(sem, TASK_KILLABLE); ++} ++ ++int __down_write_trylock(struct rw_semaphore *sem) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ unsigned long flags; ++ ++ if (!rt_mutex_trylock(m)) ++ return 0; ++ ++ atomic_sub(READER_BIAS, &sem->readers); ++ ++ raw_spin_lock_irqsave(&m->wait_lock, flags); ++ if (!atomic_read(&sem->readers)) { ++ atomic_set(&sem->readers, WRITER_BIAS); ++ raw_spin_unlock_irqrestore(&m->wait_lock, flags); ++ return 1; ++ } ++ __up_write_unlock(sem, 0, flags); ++ return 0; ++} ++ ++void __up_write(struct rw_semaphore *sem) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ unsigned long flags; ++ ++ raw_spin_lock_irqsave(&m->wait_lock, flags); ++ __up_write_unlock(sem, WRITER_BIAS, flags); ++} ++ ++void __downgrade_write(struct rw_semaphore *sem) ++{ ++ struct rt_mutex *m = &sem->rtmutex; ++ unsigned long flags; ++ ++ raw_spin_lock_irqsave(&m->wait_lock, flags); ++ /* Release it and account current as reader */ ++ __up_write_unlock(sem, WRITER_BIAS - 1, flags); ++} +diff -Nur linux-4.9.22.orig/kernel/locking/spinlock.c linux-4.9.22/kernel/locking/spinlock.c +--- linux-4.9.22.orig/kernel/locking/spinlock.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/spinlock.c 2017-04-18 17:19:16.690773540 +0200 @@ -124,8 +124,11 @@ * __[spin|read|write]_lock_bh() */ @@ -13439,9 +15277,9 @@ diff -Nur linux-4.9.6.orig/kernel/locking/spinlock.c linux-4.9.6/kernel/locking/ #ifdef CONFIG_DEBUG_LOCK_ALLOC void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) -diff -Nur linux-4.9.6.orig/kernel/locking/spinlock_debug.c linux-4.9.6/kernel/locking/spinlock_debug.c ---- linux-4.9.6.orig/kernel/locking/spinlock_debug.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/locking/spinlock_debug.c 2017-01-28 13:59:10.035660185 +0100 +diff -Nur linux-4.9.22.orig/kernel/locking/spinlock_debug.c linux-4.9.22/kernel/locking/spinlock_debug.c +--- linux-4.9.22.orig/kernel/locking/spinlock_debug.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/locking/spinlock_debug.c 2017-04-18 17:19:16.690773540 +0200 @@ -31,6 +31,7 @@ EXPORT_SYMBOL(__raw_spin_lock_init); @@ -13472,9 +15310,81 @@ diff -Nur linux-4.9.6.orig/kernel/locking/spinlock_debug.c linux-4.9.6/kernel/lo } + +#endif -diff -Nur linux-4.9.6.orig/kernel/panic.c linux-4.9.6/kernel/panic.c ---- linux-4.9.6.orig/kernel/panic.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/panic.c 2017-01-28 13:59:10.035660185 +0100 +diff -Nur linux-4.9.22.orig/kernel/module.c linux-4.9.22/kernel/module.c +--- linux-4.9.22.orig/kernel/module.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/module.c 2017-04-18 17:19:16.690773540 +0200 +@@ -660,16 +660,7 @@ + memcpy(per_cpu_ptr(mod->percpu, cpu), from, size); + } + +-/** +- * is_module_percpu_address - test whether address is from module static percpu +- * @addr: address to test +- * +- * Test whether @addr belongs to module static percpu area. +- * +- * RETURNS: +- * %true if @addr is from module static percpu area +- */ +-bool is_module_percpu_address(unsigned long addr) ++bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) + { + struct module *mod; + unsigned int cpu; +@@ -683,9 +674,15 @@ + continue; + for_each_possible_cpu(cpu) { + void *start = per_cpu_ptr(mod->percpu, cpu); ++ void *va = (void *)addr; + +- if ((void *)addr >= start && +- (void *)addr < start + mod->percpu_size) { ++ if (va >= start && va < start + mod->percpu_size) { ++ if (can_addr) { ++ *can_addr = (unsigned long) (va - start); ++ *can_addr += (unsigned long) ++ per_cpu_ptr(mod->percpu, ++ get_boot_cpu_id()); ++ } + preempt_enable(); + return true; + } +@@ -696,6 +693,20 @@ + return false; + } + ++/** ++ * is_module_percpu_address - test whether address is from module static percpu ++ * @addr: address to test ++ * ++ * Test whether @addr belongs to module static percpu area. ++ * ++ * RETURNS: ++ * %true if @addr is from module static percpu area ++ */ ++bool is_module_percpu_address(unsigned long addr) ++{ ++ return __is_module_percpu_address(addr, NULL); ++} ++ + #else /* ... !CONFIG_SMP */ + + static inline void __percpu *mod_percpu(struct module *mod) +@@ -726,6 +737,11 @@ + { + return false; + } ++ ++bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) ++{ ++ return false; ++} + + #endif /* CONFIG_SMP */ + +diff -Nur linux-4.9.22.orig/kernel/panic.c linux-4.9.22/kernel/panic.c +--- linux-4.9.22.orig/kernel/panic.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/panic.c 2017-04-18 17:19:16.690773540 +0200 @@ -482,9 +482,11 @@ static int init_oops_id(void) @@ -13487,9 +15397,9 @@ diff -Nur linux-4.9.6.orig/kernel/panic.c linux-4.9.6/kernel/panic.c oops_id++; return 0; -diff -Nur linux-4.9.6.orig/kernel/power/hibernate.c linux-4.9.6/kernel/power/hibernate.c ---- linux-4.9.6.orig/kernel/power/hibernate.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/power/hibernate.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/power/hibernate.c linux-4.9.22/kernel/power/hibernate.c +--- linux-4.9.22.orig/kernel/power/hibernate.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/power/hibernate.c 2017-04-18 17:19:16.690773540 +0200 @@ -286,6 +286,8 @@ local_irq_disable(); @@ -13567,9 +15477,9 @@ diff -Nur linux-4.9.6.orig/kernel/power/hibernate.c linux-4.9.6/kernel/power/hib return error; } -diff -Nur linux-4.9.6.orig/kernel/power/suspend.c linux-4.9.6/kernel/power/suspend.c ---- linux-4.9.6.orig/kernel/power/suspend.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/power/suspend.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/power/suspend.c linux-4.9.22/kernel/power/suspend.c +--- linux-4.9.22.orig/kernel/power/suspend.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/power/suspend.c 2017-04-18 17:19:16.690773540 +0200 @@ -369,6 +369,8 @@ arch_suspend_disable_irqs(); BUG_ON(!irqs_disabled()); @@ -13614,9 +15524,9 @@ diff -Nur linux-4.9.6.orig/kernel/power/suspend.c linux-4.9.6/kernel/power/suspe return error; } EXPORT_SYMBOL(pm_suspend); -diff -Nur linux-4.9.6.orig/kernel/printk/printk.c linux-4.9.6/kernel/printk/printk.c ---- linux-4.9.6.orig/kernel/printk/printk.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/printk/printk.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/printk/printk.c linux-4.9.22/kernel/printk/printk.c +--- linux-4.9.22.orig/kernel/printk/printk.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/printk/printk.c 2017-04-18 17:19:16.690773540 +0200 @@ -351,6 +351,65 @@ */ DEFINE_RAW_SPINLOCK(logbuf_lock); @@ -13879,9 +15789,9 @@ diff -Nur linux-4.9.6.orig/kernel/printk/printk.c linux-4.9.6/kernel/printk/prin /* * console_unblank can no longer be called in interrupt context unless * oops_in_progress is set to 1.. -diff -Nur linux-4.9.6.orig/kernel/ptrace.c linux-4.9.6/kernel/ptrace.c ---- linux-4.9.6.orig/kernel/ptrace.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/ptrace.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/ptrace.c linux-4.9.22/kernel/ptrace.c +--- linux-4.9.22.orig/kernel/ptrace.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/ptrace.c 2017-04-18 17:19:16.690773540 +0200 @@ -166,7 +166,14 @@ spin_lock_irq(&task->sighand->siglock); @@ -13898,9 +15808,9 @@ diff -Nur linux-4.9.6.orig/kernel/ptrace.c linux-4.9.6/kernel/ptrace.c ret = true; } spin_unlock_irq(&task->sighand->siglock); -diff -Nur linux-4.9.6.orig/kernel/rcu/rcutorture.c linux-4.9.6/kernel/rcu/rcutorture.c ---- linux-4.9.6.orig/kernel/rcu/rcutorture.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/rcu/rcutorture.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/rcu/rcutorture.c linux-4.9.22/kernel/rcu/rcutorture.c +--- linux-4.9.22.orig/kernel/rcu/rcutorture.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/rcu/rcutorture.c 2017-04-18 17:19:16.694773696 +0200 @@ -404,6 +404,7 @@ .name = "rcu" }; @@ -13922,9 +15832,9 @@ diff -Nur linux-4.9.6.orig/kernel/rcu/rcutorture.c linux-4.9.6/kernel/rcu/rcutor /* * Don't even think about trying any of these in real life!!! * The names includes "busted", and they really means it! -diff -Nur linux-4.9.6.orig/kernel/rcu/tree.c linux-4.9.6/kernel/rcu/tree.c ---- linux-4.9.6.orig/kernel/rcu/tree.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/rcu/tree.c 2017-01-28 13:59:10.039660339 +0100 +diff -Nur linux-4.9.22.orig/kernel/rcu/tree.c linux-4.9.22/kernel/rcu/tree.c +--- linux-4.9.22.orig/kernel/rcu/tree.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/rcu/tree.c 2017-04-18 17:19:16.694773696 +0200 @@ -55,6 +55,11 @@ #include <linux/random.h> #include <linux/trace_events.h> @@ -14225,9 +16135,9 @@ diff -Nur linux-4.9.6.orig/kernel/rcu/tree.c linux-4.9.6/kernel/rcu/tree.c /* * We don't need protection against CPU-hotplug here because -diff -Nur linux-4.9.6.orig/kernel/rcu/tree.h linux-4.9.6/kernel/rcu/tree.h ---- linux-4.9.6.orig/kernel/rcu/tree.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/rcu/tree.h 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/rcu/tree.h linux-4.9.22/kernel/rcu/tree.h +--- linux-4.9.22.orig/kernel/rcu/tree.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/rcu/tree.h 2017-04-18 17:19:16.694773696 +0200 @@ -588,18 +588,18 @@ */ extern struct rcu_state rcu_sched_state; @@ -14261,9 +16171,9 @@ diff -Nur linux-4.9.6.orig/kernel/rcu/tree.h linux-4.9.6/kernel/rcu/tree.h static int rcu_spawn_one_boost_kthread(struct rcu_state *rsp, struct rcu_node *rnp); #endif /* #ifdef CONFIG_RCU_BOOST */ -diff -Nur linux-4.9.6.orig/kernel/rcu/tree_plugin.h linux-4.9.6/kernel/rcu/tree_plugin.h ---- linux-4.9.6.orig/kernel/rcu/tree_plugin.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/rcu/tree_plugin.h 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/rcu/tree_plugin.h linux-4.9.22/kernel/rcu/tree_plugin.h +--- linux-4.9.22.orig/kernel/rcu/tree_plugin.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/rcu/tree_plugin.h 2017-04-18 17:19:16.694773696 +0200 @@ -24,25 +24,10 @@ * Paul E. McKenney <paulmck@linux.vnet.ibm.com> */ @@ -14534,9 +16444,9 @@ diff -Nur linux-4.9.6.orig/kernel/rcu/tree_plugin.h linux-4.9.6/kernel/rcu/tree_ /* * Prepare a CPU for idle from an RCU perspective. The first major task -diff -Nur linux-4.9.6.orig/kernel/rcu/update.c linux-4.9.6/kernel/rcu/update.c ---- linux-4.9.6.orig/kernel/rcu/update.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/rcu/update.c 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/rcu/update.c linux-4.9.22/kernel/rcu/update.c +--- linux-4.9.22.orig/kernel/rcu/update.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/rcu/update.c 2017-04-18 17:19:16.694773696 +0200 @@ -62,7 +62,7 @@ #ifndef CONFIG_TINY_RCU module_param(rcu_expedited, int, 0); @@ -14582,9 +16492,9 @@ diff -Nur linux-4.9.6.orig/kernel/rcu/update.c linux-4.9.6/kernel/rcu/update.c #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ -diff -Nur linux-4.9.6.orig/kernel/sched/completion.c linux-4.9.6/kernel/sched/completion.c ---- linux-4.9.6.orig/kernel/sched/completion.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/completion.c 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/completion.c linux-4.9.22/kernel/sched/completion.c +--- linux-4.9.22.orig/kernel/sched/completion.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/completion.c 2017-04-18 17:19:16.694773696 +0200 @@ -30,10 +30,10 @@ { unsigned long flags; @@ -14675,9 +16585,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/completion.c linux-4.9.6/kernel/sched/co return true; } EXPORT_SYMBOL(completion_done); -diff -Nur linux-4.9.6.orig/kernel/sched/core.c linux-4.9.6/kernel/sched/core.c ---- linux-4.9.6.orig/kernel/sched/core.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/core.c 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/core.c linux-4.9.22/kernel/sched/core.c +--- linux-4.9.22.orig/kernel/sched/core.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/core.c 2017-04-18 17:19:16.694773696 +0200 @@ -129,7 +129,11 @@ * Number of tasks to iterate in a single balance run. * Limited because this is done with IRQs disabled. @@ -15365,9 +17275,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/core.c linux-4.9.6/kernel/sched/core.c return (nested == preempt_offset); } -diff -Nur linux-4.9.6.orig/kernel/sched/deadline.c linux-4.9.6/kernel/sched/deadline.c ---- linux-4.9.6.orig/kernel/sched/deadline.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/deadline.c 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/deadline.c linux-4.9.22/kernel/sched/deadline.c +--- linux-4.9.22.orig/kernel/sched/deadline.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/deadline.c 2017-04-18 17:19:16.694773696 +0200 @@ -687,6 +687,7 @@ hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); @@ -15376,9 +17286,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/deadline.c linux-4.9.6/kernel/sched/dead } static -diff -Nur linux-4.9.6.orig/kernel/sched/debug.c linux-4.9.6/kernel/sched/debug.c ---- linux-4.9.6.orig/kernel/sched/debug.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/debug.c 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/debug.c linux-4.9.22/kernel/sched/debug.c +--- linux-4.9.22.orig/kernel/sched/debug.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/debug.c 2017-04-18 17:19:16.694773696 +0200 @@ -558,6 +558,9 @@ P(rt_throttled); PN(rt_time); @@ -15400,9 +17310,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/debug.c linux-4.9.6/kernel/sched/debug.c #undef PN_SCHEDSTAT #undef PN #undef __PN -diff -Nur linux-4.9.6.orig/kernel/sched/fair.c linux-4.9.6/kernel/sched/fair.c ---- linux-4.9.6.orig/kernel/sched/fair.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/fair.c 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/fair.c linux-4.9.22/kernel/sched/fair.c +--- linux-4.9.22.orig/kernel/sched/fair.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/fair.c 2017-04-18 17:19:16.698773851 +0200 @@ -3518,7 +3518,7 @@ ideal_runtime = sched_slice(cfs_rq, curr); delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; @@ -15475,9 +17385,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/fair.c linux-4.9.6/kernel/sched/fair.c } else check_preempt_curr(rq, p, 0); } -diff -Nur linux-4.9.6.orig/kernel/sched/features.h linux-4.9.6/kernel/sched/features.h ---- linux-4.9.6.orig/kernel/sched/features.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/features.h 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/features.h linux-4.9.22/kernel/sched/features.h +--- linux-4.9.22.orig/kernel/sched/features.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/features.h 2017-04-18 17:19:16.698773851 +0200 @@ -45,11 +45,19 @@ */ SCHED_FEAT(NONTASK_CAPACITY, true) @@ -15498,9 +17408,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/features.h linux-4.9.6/kernel/sched/feat #ifdef HAVE_RT_PUSH_IPI /* -diff -Nur linux-4.9.6.orig/kernel/sched/Makefile linux-4.9.6/kernel/sched/Makefile ---- linux-4.9.6.orig/kernel/sched/Makefile 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/Makefile 2017-01-28 13:59:10.043660493 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/Makefile linux-4.9.22/kernel/sched/Makefile +--- linux-4.9.22.orig/kernel/sched/Makefile 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/Makefile 2017-04-18 17:19:16.694773696 +0200 @@ -17,7 +17,7 @@ obj-y += core.o loadavg.o clock.o cputime.o @@ -15510,9 +17420,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/Makefile linux-4.9.6/kernel/sched/Makefi obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o obj-$(CONFIG_SCHEDSTATS) += stats.o -diff -Nur linux-4.9.6.orig/kernel/sched/rt.c linux-4.9.6/kernel/sched/rt.c ---- linux-4.9.6.orig/kernel/sched/rt.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/rt.c 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/rt.c linux-4.9.22/kernel/sched/rt.c +--- linux-4.9.22.orig/kernel/sched/rt.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/rt.c 2017-04-18 17:19:16.698773851 +0200 @@ -47,6 +47,7 @@ hrtimer_init(&rt_b->rt_period_timer, @@ -15529,9 +17439,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/rt.c linux-4.9.6/kernel/sched/rt.c #endif #endif /* CONFIG_SMP */ /* We start is dequeued state, because no RT tasks are queued */ -diff -Nur linux-4.9.6.orig/kernel/sched/sched.h linux-4.9.6/kernel/sched/sched.h ---- linux-4.9.6.orig/kernel/sched/sched.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/sched.h 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/sched.h linux-4.9.22/kernel/sched/sched.h +--- linux-4.9.22.orig/kernel/sched/sched.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/sched.h 2017-04-18 17:19:16.698773851 +0200 @@ -1163,6 +1163,7 @@ #define WF_SYNC 0x01 /* waker goes to sleep after wakeup */ #define WF_FORK 0x02 /* child wakeup after fork */ @@ -15556,9 +17466,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/sched.h linux-4.9.6/kernel/sched/sched.h extern struct rt_bandwidth def_rt_bandwidth; extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime); -diff -Nur linux-4.9.6.orig/kernel/sched/swait.c linux-4.9.6/kernel/sched/swait.c ---- linux-4.9.6.orig/kernel/sched/swait.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/sched/swait.c 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/swait.c linux-4.9.22/kernel/sched/swait.c +--- linux-4.9.22.orig/kernel/sched/swait.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/sched/swait.c 2017-04-18 17:19:16.698773851 +0200 @@ -1,5 +1,6 @@ #include <linux/sched.h> #include <linux/swait.h> @@ -15600,9 +17510,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/swait.c linux-4.9.6/kernel/sched/swait.c raw_spin_lock_irq(&q->lock); list_splice_init(&q->task_list, &tmp); while (!list_empty(&tmp)) { -diff -Nur linux-4.9.6.orig/kernel/sched/swork.c linux-4.9.6/kernel/sched/swork.c ---- linux-4.9.6.orig/kernel/sched/swork.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/kernel/sched/swork.c 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/sched/swork.c linux-4.9.22/kernel/sched/swork.c +--- linux-4.9.22.orig/kernel/sched/swork.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/kernel/sched/swork.c 2017-04-18 17:19:16.698773851 +0200 @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner daniel.wagner@bmw-carit.de @@ -15777,9 +17687,9 @@ diff -Nur linux-4.9.6.orig/kernel/sched/swork.c linux-4.9.6/kernel/sched/swork.c + mutex_unlock(&worker_mutex); +} +EXPORT_SYMBOL_GPL(swork_put); -diff -Nur linux-4.9.6.orig/kernel/signal.c linux-4.9.6/kernel/signal.c ---- linux-4.9.6.orig/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/signal.c 2017-01-28 13:59:10.047660646 +0100 +diff -Nur linux-4.9.22.orig/kernel/signal.c linux-4.9.22/kernel/signal.c +--- linux-4.9.22.orig/kernel/signal.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/signal.c 2017-04-18 17:19:16.698773851 +0200 @@ -14,6 +14,7 @@ #include <linux/export.h> #include <linux/init.h> @@ -16009,9 +17919,9 @@ diff -Nur linux-4.9.6.orig/kernel/signal.c linux-4.9.6/kernel/signal.c freezable_schedule(); } else { /* -diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c ---- linux-4.9.6.orig/kernel/softirq.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/softirq.c 2017-01-28 13:59:10.083662028 +0100 +diff -Nur linux-4.9.22.orig/kernel/softirq.c linux-4.9.22/kernel/softirq.c +--- linux-4.9.22.orig/kernel/softirq.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/softirq.c 2017-04-18 17:19:16.698773851 +0200 @@ -21,10 +21,12 @@ #include <linux/freezer.h> #include <linux/kthread.h> @@ -16134,7 +18044,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c /* * we cannot loop indefinitely here to avoid userspace starvation, * but we also don't want to introduce a worst case 1/HZ latency -@@ -77,6 +175,37 @@ +@@ -77,6 +175,38 @@ wake_up_process(tsk); } @@ -16169,14 +18079,14 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c + } +} + ++#ifndef CONFIG_PREEMPT_RT_FULL /* * If ksoftirqd is scheduled, we do not want to process pending softirqs * right now. Let ksoftirqd handle this at its own rate, to get fairness. -@@ -88,6 +217,48 @@ +@@ -88,6 +218,47 @@ return tsk && (tsk->state == TASK_RUNNING); } -+#ifndef CONFIG_PREEMPT_RT_FULL +static inline int ksoftirqd_softirq_pending(void) +{ + return local_softirq_pending(); @@ -16592,26 +18502,20 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c } __irq_enter(); -@@ -351,9 +794,13 @@ +@@ -351,6 +794,7 @@ static inline void invoke_softirq(void) { -+#ifdef CONFIG_PREEMPT_RT_FULL -+ unsigned long flags; -+#endif -+ ++#ifndef CONFIG_PREEMPT_RT_FULL if (ksoftirqd_running()) return; -- -+#ifndef CONFIG_PREEMPT_RT_FULL - if (!force_irqthreads) { - #ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK - /* -@@ -373,6 +820,17 @@ + +@@ -373,6 +817,18 @@ } else { wakeup_softirqd(); } +#else /* PREEMPT_RT_FULL */ ++ unsigned long flags; + + local_irq_save(flags); + if (__this_cpu_read(ksoftirqd) && @@ -16625,7 +18529,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c } static inline void tick_irq_exit(void) -@@ -409,26 +867,6 @@ +@@ -409,26 +865,6 @@ trace_hardirq_exit(); /* must be last! */ } @@ -16652,7 +18556,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c void raise_softirq(unsigned int nr) { unsigned long flags; -@@ -438,12 +876,6 @@ +@@ -438,12 +874,6 @@ local_irq_restore(flags); } @@ -16665,7 +18569,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c void open_softirq(int nr, void (*action)(struct softirq_action *)) { softirq_vec[nr].action = action; -@@ -460,15 +892,45 @@ +@@ -460,15 +890,45 @@ static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec); static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec); @@ -16715,7 +18619,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c local_irq_restore(flags); } EXPORT_SYMBOL(__tasklet_schedule); -@@ -478,10 +940,7 @@ +@@ -478,10 +938,7 @@ unsigned long flags; local_irq_save(flags); @@ -16727,7 +18631,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c local_irq_restore(flags); } EXPORT_SYMBOL(__tasklet_hi_schedule); -@@ -490,82 +949,122 @@ +@@ -490,82 +947,122 @@ { BUG_ON(!irqs_disabled()); @@ -16899,7 +18803,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c } void tasklet_init(struct tasklet_struct *t, -@@ -586,7 +1085,7 @@ +@@ -586,7 +1083,7 @@ while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { do { @@ -16908,7 +18812,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c } while (test_bit(TASKLET_STATE_SCHED, &t->state)); } tasklet_unlock_wait(t); -@@ -660,25 +1159,26 @@ +@@ -660,25 +1157,26 @@ open_softirq(HI_SOFTIRQ, tasklet_hi_action); } @@ -16950,7 +18854,7 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c } #ifdef CONFIG_HOTPLUG_CPU -@@ -745,17 +1245,31 @@ +@@ -745,17 +1243,31 @@ static struct smp_hotplug_thread softirq_threads = { .store = &ksoftirqd, @@ -16983,9 +18887,9 @@ diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c return 0; } early_initcall(spawn_ksoftirqd); -diff -Nur linux-4.9.6.orig/kernel/stop_machine.c linux-4.9.6/kernel/stop_machine.c ---- linux-4.9.6.orig/kernel/stop_machine.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/stop_machine.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/stop_machine.c linux-4.9.22/kernel/stop_machine.c +--- linux-4.9.22.orig/kernel/stop_machine.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/stop_machine.c 2017-04-18 17:19:16.698773851 +0200 @@ -36,7 +36,7 @@ struct cpu_stopper { struct task_struct *thread; @@ -17080,9 +18984,9 @@ diff -Nur linux-4.9.6.orig/kernel/stop_machine.c linux-4.9.6/kernel/stop_machine INIT_LIST_HEAD(&stopper->works); } -diff -Nur linux-4.9.6.orig/kernel/time/hrtimer.c linux-4.9.6/kernel/time/hrtimer.c ---- linux-4.9.6.orig/kernel/time/hrtimer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/hrtimer.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/hrtimer.c linux-4.9.22/kernel/time/hrtimer.c +--- linux-4.9.22.orig/kernel/time/hrtimer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/hrtimer.c 2017-04-18 17:19:16.698773851 +0200 @@ -53,6 +53,7 @@ #include <asm/uaccess.h> @@ -17510,9 +19414,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/hrtimer.c linux-4.9.6/kernel/time/hrtimer } /** -diff -Nur linux-4.9.6.orig/kernel/time/itimer.c linux-4.9.6/kernel/time/itimer.c ---- linux-4.9.6.orig/kernel/time/itimer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/itimer.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/itimer.c linux-4.9.22/kernel/time/itimer.c +--- linux-4.9.22.orig/kernel/time/itimer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/itimer.c 2017-04-18 17:19:16.698773851 +0200 @@ -213,6 +213,7 @@ /* We are sharing ->siglock with it_real_fn() */ if (hrtimer_try_to_cancel(timer) < 0) { @@ -17521,9 +19425,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/itimer.c linux-4.9.6/kernel/time/itimer.c goto again; } expires = timeval_to_ktime(value->it_value); -diff -Nur linux-4.9.6.orig/kernel/time/jiffies.c linux-4.9.6/kernel/time/jiffies.c ---- linux-4.9.6.orig/kernel/time/jiffies.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/jiffies.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/jiffies.c linux-4.9.22/kernel/time/jiffies.c +--- linux-4.9.22.orig/kernel/time/jiffies.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/jiffies.c 2017-04-18 17:19:16.698773851 +0200 @@ -74,7 +74,8 @@ .max_cycles = 10, }; @@ -17546,9 +19450,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/jiffies.c linux-4.9.6/kernel/time/jiffies return ret; } EXPORT_SYMBOL(get_jiffies_64); -diff -Nur linux-4.9.6.orig/kernel/time/ntp.c linux-4.9.6/kernel/time/ntp.c ---- linux-4.9.6.orig/kernel/time/ntp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/ntp.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/ntp.c linux-4.9.22/kernel/time/ntp.c +--- linux-4.9.22.orig/kernel/time/ntp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/ntp.c 2017-04-18 17:19:16.702774006 +0200 @@ -17,6 +17,7 @@ #include <linux/module.h> #include <linux/rtc.h> @@ -17593,9 +19497,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/ntp.c linux-4.9.6/kernel/time/ntp.c #else void ntp_notify_cmos_timer(void) { } -diff -Nur linux-4.9.6.orig/kernel/time/posix-cpu-timers.c linux-4.9.6/kernel/time/posix-cpu-timers.c ---- linux-4.9.6.orig/kernel/time/posix-cpu-timers.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/posix-cpu-timers.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/posix-cpu-timers.c linux-4.9.22/kernel/time/posix-cpu-timers.c +--- linux-4.9.22.orig/kernel/time/posix-cpu-timers.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/posix-cpu-timers.c 2017-04-18 17:19:16.702774006 +0200 @@ -3,6 +3,7 @@ */ @@ -17829,9 +19733,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/posix-cpu-timers.c linux-4.9.6/kernel/tim /* * Set one of the process-wide special case CPU timers or RLIMIT_CPU. * The tsk->sighand->siglock must be held by the caller. -diff -Nur linux-4.9.6.orig/kernel/time/posix-timers.c linux-4.9.6/kernel/time/posix-timers.c ---- linux-4.9.6.orig/kernel/time/posix-timers.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/posix-timers.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/posix-timers.c linux-4.9.22/kernel/time/posix-timers.c +--- linux-4.9.22.orig/kernel/time/posix-timers.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/posix-timers.c 2017-04-18 17:19:16.702774006 +0200 @@ -506,6 +506,7 @@ static struct pid *good_sigevent(sigevent_t * event) { @@ -17927,9 +19831,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/posix-timers.c linux-4.9.6/kernel/time/po goto retry_delete; } list_del(&timer->list); -diff -Nur linux-4.9.6.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.9.6/kernel/time/tick-broadcast-hrtimer.c ---- linux-4.9.6.orig/kernel/time/tick-broadcast-hrtimer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/tick-broadcast-hrtimer.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.9.22/kernel/time/tick-broadcast-hrtimer.c +--- linux-4.9.22.orig/kernel/time/tick-broadcast-hrtimer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/tick-broadcast-hrtimer.c 2017-04-18 17:19:16.702774006 +0200 @@ -107,5 +107,6 @@ { hrtimer_init(&bctimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); @@ -17937,9 +19841,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.9.6/kern + bctimer.irqsafe = true; clockevents_register_device(&ce_broadcast_hrtimer); } -diff -Nur linux-4.9.6.orig/kernel/time/tick-common.c linux-4.9.6/kernel/time/tick-common.c ---- linux-4.9.6.orig/kernel/time/tick-common.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/tick-common.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/tick-common.c linux-4.9.22/kernel/time/tick-common.c +--- linux-4.9.22.orig/kernel/time/tick-common.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/tick-common.c 2017-04-18 17:19:16.702774006 +0200 @@ -79,13 +79,15 @@ static void tick_periodic(int cpu) { @@ -17970,9 +19874,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/tick-common.c linux-4.9.6/kernel/time/tic clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT); -diff -Nur linux-4.9.6.orig/kernel/time/tick-sched.c linux-4.9.6/kernel/time/tick-sched.c ---- linux-4.9.6.orig/kernel/time/tick-sched.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/tick-sched.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/tick-sched.c linux-4.9.22/kernel/time/tick-sched.c +--- linux-4.9.22.orig/kernel/time/tick-sched.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/tick-sched.c 2017-04-18 17:19:16.702774006 +0200 @@ -62,7 +62,8 @@ return; @@ -18060,9 +19964,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/tick-sched.c linux-4.9.6/kernel/time/tick ts->sched_timer.function = tick_sched_timer; /* Get the next period (per-CPU) */ -diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.c linux-4.9.6/kernel/time/timekeeping.c ---- linux-4.9.6.orig/kernel/time/timekeeping.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/timekeeping.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/timekeeping.c linux-4.9.22/kernel/time/timekeeping.c +--- linux-4.9.22.orig/kernel/time/timekeeping.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/timekeeping.c 2017-04-18 17:19:16.702774006 +0200 @@ -2328,8 +2328,10 @@ */ void xtime_update(unsigned long ticks) @@ -18076,9 +19980,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.c linux-4.9.6/kernel/time/tim + raw_spin_unlock(&jiffies_lock); update_wall_time(); } -diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.h linux-4.9.6/kernel/time/timekeeping.h ---- linux-4.9.6.orig/kernel/time/timekeeping.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/timekeeping.h 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/timekeeping.h linux-4.9.22/kernel/time/timekeeping.h +--- linux-4.9.22.orig/kernel/time/timekeeping.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/timekeeping.h 2017-04-18 17:19:16.702774006 +0200 @@ -19,7 +19,8 @@ extern void do_timer(unsigned long ticks); extern void update_wall_time(void); @@ -18089,9 +19993,9 @@ diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.h linux-4.9.6/kernel/time/tim #define CS_NAME_LEN 32 -diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c ---- linux-4.9.6.orig/kernel/time/timer.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/time/timer.c 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/time/timer.c linux-4.9.22/kernel/time/timer.c +--- linux-4.9.22.orig/kernel/time/timer.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/time/timer.c 2017-04-18 17:19:16.702774006 +0200 @@ -193,8 +193,11 @@ #endif @@ -18105,7 +20009,16 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c unsigned long clk; unsigned long next_expiry; unsigned int cpu; -@@ -948,10 +951,10 @@ +@@ -203,6 +206,8 @@ + bool is_idle; + DECLARE_BITMAP(pending_map, WHEEL_SIZE); + struct hlist_head vectors[WHEEL_SIZE]; ++ struct hlist_head expired_lists[LVL_DEPTH]; ++ int expired_count; + } ____cacheline_aligned; + + static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]); +@@ -948,10 +953,10 @@ if (!(tf & TIMER_MIGRATING)) { base = get_timer_base(tf); @@ -18118,7 +20031,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c } cpu_relax(); } -@@ -1023,9 +1026,9 @@ +@@ -1023,9 +1028,9 @@ /* See the comment in lock_timer_base() */ timer->flags |= TIMER_MIGRATING; @@ -18130,7 +20043,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c WRITE_ONCE(timer->flags, (timer->flags & ~TIMER_BASEMASK) | base->cpu); } -@@ -1050,7 +1053,7 @@ +@@ -1050,7 +1055,7 @@ } out_unlock: @@ -18139,7 +20052,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c return ret; } -@@ -1144,19 +1147,46 @@ +@@ -1144,19 +1149,46 @@ if (base != new_base) { timer->flags |= TIMER_MIGRATING; @@ -18189,7 +20102,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c /** * del_timer - deactive a timer. * @timer: the timer to be deactivated -@@ -1180,7 +1210,7 @@ +@@ -1180,7 +1212,7 @@ if (timer_pending(timer)) { base = lock_timer_base(timer, &flags); ret = detach_if_pending(timer, base, true); @@ -18198,7 +20111,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c } return ret; -@@ -1208,13 +1238,13 @@ +@@ -1208,13 +1240,13 @@ timer_stats_timer_clear_start_info(timer); ret = detach_if_pending(timer, base, true); } @@ -18214,7 +20127,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c /** * del_timer_sync - deactivate a timer and wait for the handler to finish. * @timer: the timer to be deactivated -@@ -1274,7 +1304,7 @@ +@@ -1274,7 +1306,7 @@ int ret = try_to_del_timer_sync(timer); if (ret >= 0) return ret; @@ -18223,7 +20136,17 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c } } EXPORT_SYMBOL(del_timer_sync); -@@ -1339,14 +1369,17 @@ +@@ -1323,7 +1355,8 @@ + } + } + +-static void expire_timers(struct timer_base *base, struct hlist_head *head) ++static inline void __expire_timers(struct timer_base *base, ++ struct hlist_head *head) + { + while (!hlist_empty(head)) { + struct timer_list *timer; +@@ -1339,33 +1372,53 @@ fn = timer->function; data = timer->data; @@ -18246,7 +20169,56 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c } } } -@@ -1515,7 +1548,7 @@ + +-static int __collect_expired_timers(struct timer_base *base, +- struct hlist_head *heads) ++static void expire_timers(struct timer_base *base) ++{ ++ struct hlist_head *head; ++ ++ while (base->expired_count--) { ++ head = base->expired_lists + base->expired_count; ++ __expire_timers(base, head); ++ } ++ base->expired_count = 0; ++} ++ ++static void __collect_expired_timers(struct timer_base *base) + { + unsigned long clk = base->clk; + struct hlist_head *vec; +- int i, levels = 0; ++ int i; + unsigned int idx; + ++ /* ++ * expire_timers() must be called at least once before we can ++ * collect more timers ++ */ ++ if (WARN_ON(base->expired_count)) ++ return; ++ + for (i = 0; i < LVL_DEPTH; i++) { + idx = (clk & LVL_MASK) + i * LVL_SIZE; + + if (__test_and_clear_bit(idx, base->pending_map)) { + vec = base->vectors + idx; +- hlist_move_list(vec, heads++); +- levels++; ++ hlist_move_list(vec, ++ &base->expired_lists[base->expired_count++]); + } + /* Is it time to look at the next level? */ + if (clk & LVL_CLK_MASK) +@@ -1373,7 +1426,6 @@ + /* Shift clock for the next level granularity */ + clk >>= LVL_CLK_SHIFT; + } +- return levels; + } + + #ifdef CONFIG_NO_HZ_COMMON +@@ -1515,7 +1567,7 @@ if (cpu_is_offline(smp_processor_id())) return expires; @@ -18255,7 +20227,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c nextevt = __next_timer_interrupt(base); is_max_delta = (nextevt == base->clk + NEXT_TIMER_MAX_DELTA); base->next_expiry = nextevt; -@@ -1543,7 +1576,7 @@ +@@ -1543,7 +1595,7 @@ if ((expires - basem) > TICK_NSEC) base->is_idle = true; } @@ -18264,7 +20236,72 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c return cmp_next_hrtimer_event(basem, expires); } -@@ -1608,13 +1641,13 @@ +@@ -1566,8 +1618,7 @@ + base->is_idle = false; + } + +-static int collect_expired_timers(struct timer_base *base, +- struct hlist_head *heads) ++static void collect_expired_timers(struct timer_base *base) + { + /* + * NOHZ optimization. After a long idle sleep we need to forward the +@@ -1584,20 +1635,49 @@ + if (time_after(next, jiffies)) { + /* The call site will increment clock! */ + base->clk = jiffies - 1; +- return 0; ++ return; + } + base->clk = next; + } +- return __collect_expired_timers(base, heads); ++ __collect_expired_timers(base); + } + #else +-static inline int collect_expired_timers(struct timer_base *base, +- struct hlist_head *heads) ++static inline void collect_expired_timers(struct timer_base *base) + { +- return __collect_expired_timers(base, heads); ++ __collect_expired_timers(base); + } + #endif + ++static int find_expired_timers(struct timer_base *base) ++{ ++ const unsigned long int end_clk = jiffies; ++ ++ while (!base->expired_count && time_after_eq(end_clk, base->clk)) { ++ collect_expired_timers(base); ++ base->clk++; ++ } ++ ++ return base->expired_count; ++} ++ ++/* Called from CPU tick routine to quickly collect expired timers */ ++static int tick_find_expired(struct timer_base *base) ++{ ++ int count; ++ ++ raw_spin_lock(&base->lock); ++ ++ if (unlikely(time_after(jiffies, base->clk + HZ))) { ++ /* defer to ktimersoftd; don't spend too long in irq context */ ++ count = -1; ++ } else ++ count = find_expired_timers(base); ++ ++ raw_spin_unlock(&base->lock); ++ ++ return count; ++} ++ + /* + * Called from the timer interrupt handler to charge one tick to the current + * process. user_tick is 1 if the tick is user time, 0 for system. +@@ -1608,13 +1688,13 @@ /* Note: this timer irq context must be accounted for as well. */ account_process_tick(p, user_tick); @@ -18280,19 +20317,29 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c run_posix_cpu_timers(p); } -@@ -1630,7 +1663,7 @@ - if (!time_after_eq(jiffies, base->clk)) - return; - -- spin_lock_irq(&base->lock); +@@ -1624,24 +1704,13 @@ + */ + static inline void __run_timers(struct timer_base *base) + { +- struct hlist_head heads[LVL_DEPTH]; +- int levels; +- +- if (!time_after_eq(jiffies, base->clk)) +- return; + raw_spin_lock_irq(&base->lock); - while (time_after_eq(jiffies, base->clk)) { +- spin_lock_irq(&base->lock); ++ while (find_expired_timers(base)) ++ expire_timers(base); -@@ -1640,8 +1673,8 @@ - while (levels--) - expire_timers(base, heads + levels); - } +- while (time_after_eq(jiffies, base->clk)) { +- +- levels = collect_expired_timers(base, heads); +- base->clk++; +- +- while (levels--) +- expire_timers(base, heads + levels); +- } - base->running_timer = NULL; - spin_unlock_irq(&base->lock); + raw_spin_unlock_irq(&base->lock); @@ -18300,7 +20347,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c } /* -@@ -1651,6 +1684,8 @@ +@@ -1651,6 +1720,8 @@ { struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); @@ -18309,7 +20356,22 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c __run_timers(base); if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active) __run_timers(this_cpu_ptr(&timer_bases[BASE_DEF])); -@@ -1836,16 +1871,16 @@ +@@ -1665,12 +1736,12 @@ + + hrtimer_run_queues(); + /* Raise the softirq only if required. */ +- if (time_before(jiffies, base->clk)) { ++ if (time_before(jiffies, base->clk) || !tick_find_expired(base)) { + if (!IS_ENABLED(CONFIG_NO_HZ_COMMON) || !base->nohz_active) + return; + /* CPU is awake, so check the deferrable base. */ + base++; +- if (time_before(jiffies, base->clk)) ++ if (time_before(jiffies, base->clk) || !tick_find_expired(base)) + return; + } + raise_softirq(TIMER_SOFTIRQ); +@@ -1836,16 +1907,17 @@ * The caller is globally serialized and nobody else * takes two locks at once, deadlock is not possible. */ @@ -18319,6 +20381,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c + raw_spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); BUG_ON(old_base->running_timer); ++ BUG_ON(old_base->expired_count); for (i = 0; i < WHEEL_SIZE; i++) migrate_timer_list(new_base, old_base->vectors + i); @@ -18330,7 +20393,7 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c put_cpu_ptr(&timer_bases); } return 0; -@@ -1861,8 +1896,11 @@ +@@ -1861,8 +1933,12 @@ for (i = 0; i < NR_BASES; i++) { base = per_cpu_ptr(&timer_bases[i], cpu); base->cpu = cpu; @@ -18340,12 +20403,13 @@ diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c +#ifdef CONFIG_PREEMPT_RT_FULL + init_swait_queue_head(&base->wait_for_running_timer); +#endif ++ base->expired_count = 0; } } -diff -Nur linux-4.9.6.orig/kernel/trace/Kconfig linux-4.9.6/kernel/trace/Kconfig ---- linux-4.9.6.orig/kernel/trace/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/Kconfig 2017-01-28 13:59:10.087662182 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/Kconfig linux-4.9.22/kernel/trace/Kconfig +--- linux-4.9.22.orig/kernel/trace/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/Kconfig 2017-04-18 17:19:16.702774006 +0200 @@ -182,6 +182,24 @@ enabled. This option and the preempt-off timing option can be used together or separately.) @@ -18471,9 +20535,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/Kconfig linux-4.9.6/kernel/trace/Kconfig config ENABLE_DEFAULT_TRACERS bool "Trace process context switches and events" depends on !GENERIC_TRACER -diff -Nur linux-4.9.6.orig/kernel/trace/latency_hist.c linux-4.9.6/kernel/trace/latency_hist.c ---- linux-4.9.6.orig/kernel/trace/latency_hist.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.9.6/kernel/trace/latency_hist.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/latency_hist.c linux-4.9.22/kernel/trace/latency_hist.c +--- linux-4.9.22.orig/kernel/trace/latency_hist.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.22/kernel/trace/latency_hist.c 2017-04-18 17:19:16.702774006 +0200 @@ -0,0 +1,1178 @@ +/* + * kernel/trace/latency_hist.c @@ -19653,9 +21717,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/latency_hist.c linux-4.9.6/kernel/trace/ +} + +device_initcall(latency_hist_init); -diff -Nur linux-4.9.6.orig/kernel/trace/Makefile linux-4.9.6/kernel/trace/Makefile ---- linux-4.9.6.orig/kernel/trace/Makefile 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/Makefile 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/Makefile linux-4.9.22/kernel/trace/Makefile +--- linux-4.9.22.orig/kernel/trace/Makefile 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/Makefile 2017-04-18 17:19:16.702774006 +0200 @@ -38,6 +38,10 @@ obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o @@ -19667,9 +21731,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/Makefile linux-4.9.6/kernel/trace/Makefi obj-$(CONFIG_NOP_TRACER) += trace_nop.o obj-$(CONFIG_STACK_TRACER) += trace_stack.o obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o -diff -Nur linux-4.9.6.orig/kernel/trace/trace.c linux-4.9.6/kernel/trace/trace.c ---- linux-4.9.6.orig/kernel/trace/trace.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/trace.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/trace.c linux-4.9.22/kernel/trace/trace.c +--- linux-4.9.22.orig/kernel/trace/trace.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/trace.c 2017-04-18 17:19:16.706774161 +0200 @@ -1897,6 +1897,7 @@ struct task_struct *tsk = current; @@ -19737,9 +21801,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/trace.c linux-4.9.6/kernel/trace/trace.c } void -diff -Nur linux-4.9.6.orig/kernel/trace/trace_events.c linux-4.9.6/kernel/trace/trace_events.c ---- linux-4.9.6.orig/kernel/trace/trace_events.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/trace_events.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/trace_events.c linux-4.9.22/kernel/trace/trace_events.c +--- linux-4.9.22.orig/kernel/trace/trace_events.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/trace_events.c 2017-04-18 17:19:16.706774161 +0200 @@ -187,6 +187,8 @@ __common_field(unsigned char, flags); __common_field(unsigned char, preempt_count); @@ -19749,9 +21813,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/trace_events.c linux-4.9.6/kernel/trace/ return ret; } -diff -Nur linux-4.9.6.orig/kernel/trace/trace.h linux-4.9.6/kernel/trace/trace.h ---- linux-4.9.6.orig/kernel/trace/trace.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/trace.h 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/trace.h linux-4.9.22/kernel/trace/trace.h +--- linux-4.9.22.orig/kernel/trace/trace.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/trace.h 2017-04-18 17:19:16.706774161 +0200 @@ -124,6 +124,7 @@ * NEED_RESCHED - reschedule is requested * HARDIRQ - inside an interrupt handler @@ -19768,9 +21832,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/trace.h linux-4.9.6/kernel/trace/trace.h }; #define TRACE_BUF_SIZE 1024 -diff -Nur linux-4.9.6.orig/kernel/trace/trace_irqsoff.c linux-4.9.6/kernel/trace/trace_irqsoff.c ---- linux-4.9.6.orig/kernel/trace/trace_irqsoff.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/trace_irqsoff.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/trace_irqsoff.c linux-4.9.22/kernel/trace/trace_irqsoff.c +--- linux-4.9.22.orig/kernel/trace/trace_irqsoff.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/trace_irqsoff.c 2017-04-18 17:19:16.706774161 +0200 @@ -13,6 +13,7 @@ #include <linux/uaccess.h> #include <linux/module.h> @@ -19854,9 +21918,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/trace_irqsoff.c linux-4.9.6/kernel/trace if (preempt_trace() && !irq_trace()) start_critical_timing(a0, a1); } -diff -Nur linux-4.9.6.orig/kernel/trace/trace_output.c linux-4.9.6/kernel/trace/trace_output.c ---- linux-4.9.6.orig/kernel/trace/trace_output.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/trace/trace_output.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/trace/trace_output.c linux-4.9.22/kernel/trace/trace_output.c +--- linux-4.9.22.orig/kernel/trace/trace_output.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/trace/trace_output.c 2017-04-18 17:19:16.706774161 +0200 @@ -386,6 +386,7 @@ { char hardsoft_irq; @@ -19903,9 +21967,9 @@ diff -Nur linux-4.9.6.orig/kernel/trace/trace_output.c linux-4.9.6/kernel/trace/ return !trace_seq_has_overflowed(s); } -diff -Nur linux-4.9.6.orig/kernel/user.c linux-4.9.6/kernel/user.c ---- linux-4.9.6.orig/kernel/user.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/user.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/user.c linux-4.9.22/kernel/user.c +--- linux-4.9.22.orig/kernel/user.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/user.c 2017-04-18 17:19:16.706774161 +0200 @@ -161,11 +161,11 @@ if (!up) return; @@ -19920,9 +21984,9 @@ diff -Nur linux-4.9.6.orig/kernel/user.c linux-4.9.6/kernel/user.c } struct user_struct *alloc_uid(kuid_t uid) -diff -Nur linux-4.9.6.orig/kernel/watchdog.c linux-4.9.6/kernel/watchdog.c ---- linux-4.9.6.orig/kernel/watchdog.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/watchdog.c 2017-01-28 13:59:10.091662336 +0100 +diff -Nur linux-4.9.22.orig/kernel/watchdog.c linux-4.9.22/kernel/watchdog.c +--- linux-4.9.22.orig/kernel/watchdog.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/watchdog.c 2017-04-18 17:19:16.706774161 +0200 @@ -315,6 +315,8 @@ #ifdef CONFIG_HARDLOCKUP_DETECTOR @@ -19962,9 +22026,9 @@ diff -Nur linux-4.9.6.orig/kernel/watchdog.c linux-4.9.6/kernel/watchdog.c /* Enable the perf event */ watchdog_nmi_enable(cpu); -diff -Nur linux-4.9.6.orig/kernel/workqueue.c linux-4.9.6/kernel/workqueue.c ---- linux-4.9.6.orig/kernel/workqueue.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/workqueue.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/kernel/workqueue.c linux-4.9.22/kernel/workqueue.c +--- linux-4.9.22.orig/kernel/workqueue.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/workqueue.c 2017-04-18 17:19:16.706774161 +0200 @@ -48,6 +48,8 @@ #include <linux/nodemask.h> #include <linux/moduleparam.h> @@ -20607,9 +22671,9 @@ diff -Nur linux-4.9.6.orig/kernel/workqueue.c linux-4.9.6/kernel/workqueue.c return written; } -diff -Nur linux-4.9.6.orig/kernel/workqueue_internal.h linux-4.9.6/kernel/workqueue_internal.h ---- linux-4.9.6.orig/kernel/workqueue_internal.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/kernel/workqueue_internal.h 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/kernel/workqueue_internal.h linux-4.9.22/kernel/workqueue_internal.h +--- linux-4.9.22.orig/kernel/workqueue_internal.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/kernel/workqueue_internal.h 2017-04-18 17:19:16.706774161 +0200 @@ -43,6 +43,7 @@ unsigned long last_active; /* L: last active timestamp */ unsigned int flags; /* X: flags */ @@ -20628,9 +22692,9 @@ diff -Nur linux-4.9.6.orig/kernel/workqueue_internal.h linux-4.9.6/kernel/workqu +void wq_worker_sleeping(struct task_struct *task); #endif /* _KERNEL_WORKQUEUE_INTERNAL_H */ -diff -Nur linux-4.9.6.orig/lib/debugobjects.c linux-4.9.6/lib/debugobjects.c ---- linux-4.9.6.orig/lib/debugobjects.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/debugobjects.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/debugobjects.c linux-4.9.22/lib/debugobjects.c +--- linux-4.9.22.orig/lib/debugobjects.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/debugobjects.c 2017-04-18 17:19:16.706774161 +0200 @@ -308,7 +308,10 @@ struct debug_obj *obj; unsigned long flags; @@ -20643,9 +22707,9 @@ diff -Nur linux-4.9.6.orig/lib/debugobjects.c linux-4.9.6/lib/debugobjects.c db = get_bucket((unsigned long) addr); -diff -Nur linux-4.9.6.orig/lib/idr.c linux-4.9.6/lib/idr.c ---- linux-4.9.6.orig/lib/idr.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/idr.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/idr.c linux-4.9.22/lib/idr.c +--- linux-4.9.22.orig/lib/idr.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/idr.c 2017-04-18 17:19:16.706774161 +0200 @@ -30,6 +30,7 @@ #include <linux/idr.h> #include <linux/spinlock.h> @@ -20738,9 +22802,9 @@ diff -Nur linux-4.9.6.orig/lib/idr.c linux-4.9.6/lib/idr.c if (!new) break; -diff -Nur linux-4.9.6.orig/lib/irq_poll.c linux-4.9.6/lib/irq_poll.c ---- linux-4.9.6.orig/lib/irq_poll.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/irq_poll.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/irq_poll.c linux-4.9.22/lib/irq_poll.c +--- linux-4.9.22.orig/lib/irq_poll.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/irq_poll.c 2017-04-18 17:19:16.706774161 +0200 @@ -36,6 +36,7 @@ list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll)); __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); @@ -20781,9 +22845,9 @@ diff -Nur linux-4.9.6.orig/lib/irq_poll.c linux-4.9.6/lib/irq_poll.c return 0; } -diff -Nur linux-4.9.6.orig/lib/Kconfig linux-4.9.6/lib/Kconfig ---- linux-4.9.6.orig/lib/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/Kconfig 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/Kconfig linux-4.9.22/lib/Kconfig +--- linux-4.9.22.orig/lib/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/Kconfig 2017-04-18 17:19:16.706774161 +0200 @@ -400,6 +400,7 @@ config CPUMASK_OFFSTACK @@ -20792,9 +22856,9 @@ diff -Nur linux-4.9.6.orig/lib/Kconfig linux-4.9.6/lib/Kconfig help Use dynamic allocation for cpumask_var_t, instead of putting them on the stack. This is a bit more expensive, but avoids -diff -Nur linux-4.9.6.orig/lib/locking-selftest.c linux-4.9.6/lib/locking-selftest.c ---- linux-4.9.6.orig/lib/locking-selftest.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/locking-selftest.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/locking-selftest.c linux-4.9.22/lib/locking-selftest.c +--- linux-4.9.22.orig/lib/locking-selftest.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/locking-selftest.c 2017-04-18 17:19:16.706774161 +0200 @@ -590,6 +590,8 @@ #include "locking-selftest-spin-hardirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin) @@ -20943,9 +23007,9 @@ diff -Nur linux-4.9.6.orig/lib/locking-selftest.c linux-4.9.6/lib/locking-selfte ww_tests(); -diff -Nur linux-4.9.6.orig/lib/percpu_ida.c linux-4.9.6/lib/percpu_ida.c ---- linux-4.9.6.orig/lib/percpu_ida.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/percpu_ida.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/percpu_ida.c linux-4.9.22/lib/percpu_ida.c +--- linux-4.9.22.orig/lib/percpu_ida.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/percpu_ida.c 2017-04-18 17:19:16.706774161 +0200 @@ -26,6 +26,9 @@ #include <linux/string.h> #include <linux/spinlock.h> @@ -21034,44 +23098,94 @@ diff -Nur linux-4.9.6.orig/lib/percpu_ida.c linux-4.9.6/lib/percpu_ida.c return err; } EXPORT_SYMBOL_GPL(percpu_ida_for_each_free); -diff -Nur linux-4.9.6.orig/lib/radix-tree.c linux-4.9.6/lib/radix-tree.c ---- linux-4.9.6.orig/lib/radix-tree.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/radix-tree.c 2017-01-28 13:59:10.095662491 +0100 -@@ -290,13 +290,14 @@ +diff -Nur linux-4.9.22.orig/lib/radix-tree.c linux-4.9.22/lib/radix-tree.c +--- linux-4.9.22.orig/lib/radix-tree.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/radix-tree.c 2017-04-18 17:19:16.710774317 +0200 +@@ -36,7 +36,7 @@ + #include <linux/bitops.h> + #include <linux/rcupdate.h> + #include <linux/preempt.h> /* in_interrupt() */ +- ++#include <linux/locallock.h> + + /* Number of nodes in fully populated tree of given height */ + static unsigned long height_to_maxnodes[RADIX_TREE_MAX_PATH + 1] __read_mostly; +@@ -68,6 +68,7 @@ + struct radix_tree_node *nodes; + }; + static DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, }; ++static DEFINE_LOCAL_IRQ_LOCK(radix_tree_preloads_lock); + + static inline void *node_to_entry(void *ptr) + { +@@ -290,13 +291,14 @@ * succeed in getting a node here (and never reach * kmem_cache_alloc) */ - rtp = this_cpu_ptr(&radix_tree_preloads); -+ rtp = &get_cpu_var(radix_tree_preloads); ++ rtp = &get_locked_var(radix_tree_preloads_lock, radix_tree_preloads); if (rtp->nr) { ret = rtp->nodes; rtp->nodes = ret->private_data; ret->private_data = NULL; rtp->nr--; } -+ put_cpu_var(radix_tree_preloads); ++ put_locked_var(radix_tree_preloads_lock, radix_tree_preloads); /* * Update the allocation stack trace as this is more useful * for debugging. -@@ -336,6 +337,7 @@ - call_rcu(&node->rcu_head, radix_tree_node_rcu_free); +@@ -357,14 +359,14 @@ + */ + gfp_mask &= ~__GFP_ACCOUNT; + +- preempt_disable(); ++ local_lock(radix_tree_preloads_lock); + rtp = this_cpu_ptr(&radix_tree_preloads); + while (rtp->nr < nr) { +- preempt_enable(); ++ local_unlock(radix_tree_preloads_lock); + node = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); + if (node == NULL) + goto out; +- preempt_disable(); ++ local_lock(radix_tree_preloads_lock); + rtp = this_cpu_ptr(&radix_tree_preloads); + if (rtp->nr < nr) { + node->private_data = rtp->nodes; +@@ -406,7 +408,7 @@ + if (gfpflags_allow_blocking(gfp_mask)) + return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE); + /* Preloading doesn't help anything with this gfp mask, skip it */ +- preempt_disable(); ++ local_lock(radix_tree_preloads_lock); + return 0; } + EXPORT_SYMBOL(radix_tree_maybe_preload); +@@ -422,7 +424,7 @@ -+#ifndef CONFIG_PREEMPT_RT_FULL - /* - * Load up this CPU's radix_tree_node buffer with sufficient objects to - * ensure that the addition of a single element in the tree cannot fail. On -@@ -455,6 +457,7 @@ + /* Preloading doesn't help anything with this gfp mask, skip it */ + if (!gfpflags_allow_blocking(gfp_mask)) { +- preempt_disable(); ++ local_lock(radix_tree_preloads_lock); + return 0; + } +@@ -456,6 +458,12 @@ return __radix_tree_preload(gfp_mask, nr_nodes); } -+#endif ++void radix_tree_preload_end(void) ++{ ++ local_unlock(radix_tree_preloads_lock); ++} ++EXPORT_SYMBOL(radix_tree_preload_end); ++ /* * The maximum index which can be stored in a radix tree -diff -Nur linux-4.9.6.orig/lib/scatterlist.c linux-4.9.6/lib/scatterlist.c ---- linux-4.9.6.orig/lib/scatterlist.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/scatterlist.c 2017-01-28 13:59:10.095662491 +0100 + */ +diff -Nur linux-4.9.22.orig/lib/scatterlist.c linux-4.9.22/lib/scatterlist.c +--- linux-4.9.22.orig/lib/scatterlist.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/scatterlist.c 2017-04-18 17:19:16.710774317 +0200 @@ -620,7 +620,7 @@ flush_kernel_dcache_page(miter->page); @@ -21099,9 +23213,9 @@ diff -Nur linux-4.9.6.orig/lib/scatterlist.c linux-4.9.6/lib/scatterlist.c return offset; } EXPORT_SYMBOL(sg_copy_buffer); -diff -Nur linux-4.9.6.orig/lib/smp_processor_id.c linux-4.9.6/lib/smp_processor_id.c ---- linux-4.9.6.orig/lib/smp_processor_id.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/lib/smp_processor_id.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/lib/smp_processor_id.c linux-4.9.22/lib/smp_processor_id.c +--- linux-4.9.22.orig/lib/smp_processor_id.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/lib/smp_processor_id.c 2017-04-18 17:19:16.710774317 +0200 @@ -39,8 +39,9 @@ if (!printk_ratelimit()) goto out_enable; @@ -21114,9 +23228,9 @@ diff -Nur linux-4.9.6.orig/lib/smp_processor_id.c linux-4.9.6/lib/smp_processor_ print_symbol("caller is %s\n", (long)__builtin_return_address(0)); dump_stack(); -diff -Nur linux-4.9.6.orig/mm/backing-dev.c linux-4.9.6/mm/backing-dev.c ---- linux-4.9.6.orig/mm/backing-dev.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/backing-dev.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/mm/backing-dev.c linux-4.9.22/mm/backing-dev.c +--- linux-4.9.22.orig/mm/backing-dev.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/backing-dev.c 2017-04-18 17:19:16.710774317 +0200 @@ -457,9 +457,9 @@ { unsigned long flags; @@ -21129,9 +23243,9 @@ diff -Nur linux-4.9.6.orig/mm/backing-dev.c linux-4.9.6/mm/backing-dev.c return; } -diff -Nur linux-4.9.6.orig/mm/compaction.c linux-4.9.6/mm/compaction.c ---- linux-4.9.6.orig/mm/compaction.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/compaction.c 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/mm/compaction.c linux-4.9.22/mm/compaction.c +--- linux-4.9.22.orig/mm/compaction.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/compaction.c 2017-04-18 17:19:16.710774317 +0200 @@ -1593,10 +1593,12 @@ block_start_pfn(cc->migrate_pfn, cc->order); @@ -21147,9 +23261,9 @@ diff -Nur linux-4.9.6.orig/mm/compaction.c linux-4.9.6/mm/compaction.c /* No more flushing until we migrate again */ cc->last_migrated_pfn = 0; } -diff -Nur linux-4.9.6.orig/mm/filemap.c linux-4.9.6/mm/filemap.c ---- linux-4.9.6.orig/mm/filemap.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/filemap.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/filemap.c linux-4.9.22/mm/filemap.c +--- linux-4.9.22.orig/mm/filemap.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/filemap.c 2017-04-18 17:19:16.710774317 +0200 @@ -159,9 +159,12 @@ * node->private_list is protected by * mapping->tree_lock. @@ -21178,9 +23292,9 @@ diff -Nur linux-4.9.6.orig/mm/filemap.c linux-4.9.6/mm/filemap.c } } -diff -Nur linux-4.9.6.orig/mm/highmem.c linux-4.9.6/mm/highmem.c ---- linux-4.9.6.orig/mm/highmem.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/highmem.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/highmem.c linux-4.9.22/mm/highmem.c +--- linux-4.9.22.orig/mm/highmem.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/highmem.c 2017-04-18 17:19:16.710774317 +0200 @@ -29,10 +29,11 @@ #include <linux/kgdb.h> #include <asm/tlbflush.h> @@ -21205,9 +23319,9 @@ diff -Nur linux-4.9.6.orig/mm/highmem.c linux-4.9.6/mm/highmem.c unsigned int nr_free_highpages (void) { -diff -Nur linux-4.9.6.orig/mm/Kconfig linux-4.9.6/mm/Kconfig ---- linux-4.9.6.orig/mm/Kconfig 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/Kconfig 2017-01-28 13:59:10.095662491 +0100 +diff -Nur linux-4.9.22.orig/mm/Kconfig linux-4.9.22/mm/Kconfig +--- linux-4.9.22.orig/mm/Kconfig 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/Kconfig 2017-04-18 17:19:16.710774317 +0200 @@ -410,7 +410,7 @@ config TRANSPARENT_HUGEPAGE @@ -21217,9 +23331,9 @@ diff -Nur linux-4.9.6.orig/mm/Kconfig linux-4.9.6/mm/Kconfig select COMPACTION select RADIX_TREE_MULTIORDER help -diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c ---- linux-4.9.6.orig/mm/memcontrol.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/memcontrol.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/memcontrol.c linux-4.9.22/mm/memcontrol.c +--- linux-4.9.22.orig/mm/memcontrol.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/memcontrol.c 2017-04-18 17:19:16.710774317 +0200 @@ -67,6 +67,7 @@ #include <net/sock.h> #include <net/ip.h> @@ -21315,7 +23429,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c put_online_cpus(); mutex_unlock(&percpu_charge_mutex); } -@@ -4548,12 +4552,12 @@ +@@ -4553,12 +4557,12 @@ ret = 0; @@ -21330,7 +23444,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c out_unlock: unlock_page(page); out: -@@ -5428,10 +5432,10 @@ +@@ -5433,10 +5437,10 @@ commit_charge(page, memcg, lrucare); @@ -21343,7 +23457,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c if (do_memsw_account() && PageSwapCache(page)) { swp_entry_t entry = { .val = page_private(page) }; -@@ -5487,14 +5491,14 @@ +@@ -5492,14 +5496,14 @@ memcg_oom_recover(memcg); } @@ -21360,7 +23474,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c if (!mem_cgroup_is_root(memcg)) css_put_many(&memcg->css, nr_pages); -@@ -5649,10 +5653,10 @@ +@@ -5654,10 +5658,10 @@ commit_charge(newpage, memcg, false); @@ -21373,7 +23487,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c } DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); -@@ -5832,6 +5836,7 @@ +@@ -5837,6 +5841,7 @@ { struct mem_cgroup *memcg, *swap_memcg; unsigned short oldid; @@ -21381,7 +23495,7 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -5872,12 +5877,16 @@ +@@ -5877,12 +5882,16 @@ * important here to have the interrupts disabled because it is the * only synchronisation we have for udpating the per-CPU variables. */ @@ -21398,9 +23512,9 @@ diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c } /* -diff -Nur linux-4.9.6.orig/mm/mmu_context.c linux-4.9.6/mm/mmu_context.c ---- linux-4.9.6.orig/mm/mmu_context.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/mmu_context.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/mmu_context.c linux-4.9.22/mm/mmu_context.c +--- linux-4.9.22.orig/mm/mmu_context.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/mmu_context.c 2017-04-18 17:19:16.710774317 +0200 @@ -23,6 +23,7 @@ struct task_struct *tsk = current; @@ -21417,9 +23531,9 @@ diff -Nur linux-4.9.6.orig/mm/mmu_context.c linux-4.9.6/mm/mmu_context.c task_unlock(tsk); #ifdef finish_arch_post_lock_switch finish_arch_post_lock_switch(); -diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c ---- linux-4.9.6.orig/mm/page_alloc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/page_alloc.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/page_alloc.c linux-4.9.22/mm/page_alloc.c +--- linux-4.9.22.orig/mm/page_alloc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/page_alloc.c 2017-04-18 17:19:16.710774317 +0200 @@ -61,6 +61,7 @@ #include <linux/page_ext.h> #include <linux/hugetlb.h> @@ -21732,7 +23846,7 @@ diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c return NULL; } -@@ -6505,7 +6567,9 @@ +@@ -6531,7 +6593,9 @@ int cpu = (unsigned long)hcpu; if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { @@ -21742,7 +23856,7 @@ diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c drain_pages(cpu); /* -@@ -6531,6 +6595,7 @@ +@@ -6557,6 +6621,7 @@ void __init page_alloc_init(void) { hotcpu_notifier(page_alloc_cpu_notify, 0); @@ -21750,7 +23864,7 @@ diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c } /* -@@ -7359,7 +7424,7 @@ +@@ -7385,7 +7450,7 @@ struct per_cpu_pageset *pset; /* avoid races with drain_pages() */ @@ -21759,7 +23873,7 @@ diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c if (zone->pageset != &boot_pageset) { for_each_online_cpu(cpu) { pset = per_cpu_ptr(zone->pageset, cpu); -@@ -7368,7 +7433,7 @@ +@@ -7394,7 +7459,7 @@ free_percpu(zone->pageset); zone->pageset = &boot_pageset; } @@ -21768,9 +23882,74 @@ diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c } #ifdef CONFIG_MEMORY_HOTREMOVE -diff -Nur linux-4.9.6.orig/mm/slab.h linux-4.9.6/mm/slab.h ---- linux-4.9.6.orig/mm/slab.h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/slab.h 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/percpu.c linux-4.9.22/mm/percpu.c +--- linux-4.9.22.orig/mm/percpu.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/percpu.c 2017-04-18 17:19:16.714774471 +0200 +@@ -1283,18 +1283,7 @@ + } + EXPORT_SYMBOL_GPL(free_percpu); + +-/** +- * is_kernel_percpu_address - test whether address is from static percpu area +- * @addr: address to test +- * +- * Test whether @addr belongs to in-kernel static percpu area. Module +- * static percpu areas are not considered. For those, use +- * is_module_percpu_address(). +- * +- * RETURNS: +- * %true if @addr is from in-kernel static percpu area, %false otherwise. +- */ +-bool is_kernel_percpu_address(unsigned long addr) ++bool __is_kernel_percpu_address(unsigned long addr, unsigned long *can_addr) + { + #ifdef CONFIG_SMP + const size_t static_size = __per_cpu_end - __per_cpu_start; +@@ -1303,16 +1292,39 @@ + + for_each_possible_cpu(cpu) { + void *start = per_cpu_ptr(base, cpu); ++ void *va = (void *)addr; + +- if ((void *)addr >= start && (void *)addr < start + static_size) ++ if (va >= start && va < start + static_size) { ++ if (can_addr) { ++ *can_addr = (unsigned long) (va - start); ++ *can_addr += (unsigned long) ++ per_cpu_ptr(base, get_boot_cpu_id()); ++ } + return true; +- } ++ } ++ } + #endif + /* on UP, can't distinguish from other static vars, always false */ + return false; + } + + /** ++ * is_kernel_percpu_address - test whether address is from static percpu area ++ * @addr: address to test ++ * ++ * Test whether @addr belongs to in-kernel static percpu area. Module ++ * static percpu areas are not considered. For those, use ++ * is_module_percpu_address(). ++ * ++ * RETURNS: ++ * %true if @addr is from in-kernel static percpu area, %false otherwise. ++ */ ++bool is_kernel_percpu_address(unsigned long addr) ++{ ++ return __is_kernel_percpu_address(addr, NULL); ++} ++ ++/** + * per_cpu_ptr_to_phys - convert translated percpu address to physical address + * @addr: the address to be converted to physical address + * +diff -Nur linux-4.9.22.orig/mm/slab.h linux-4.9.22/mm/slab.h +--- linux-4.9.22.orig/mm/slab.h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/slab.h 2017-04-18 17:19:16.714774471 +0200 @@ -426,7 +426,11 @@ * The slab lists for all objects. */ @@ -21783,9 +23962,9 @@ diff -Nur linux-4.9.6.orig/mm/slab.h linux-4.9.6/mm/slab.h #ifdef CONFIG_SLAB struct list_head slabs_partial; /* partial list first, better asm code */ -diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c ---- linux-4.9.6.orig/mm/slub.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/slub.c 2017-01-28 13:59:10.099662644 +0100 +diff -Nur linux-4.9.22.orig/mm/slub.c linux-4.9.22/mm/slub.c +--- linux-4.9.22.orig/mm/slub.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/slub.c 2017-04-18 17:19:16.714774471 +0200 @@ -1141,7 +1141,7 @@ unsigned long uninitialized_var(flags); int ret = 0; @@ -21817,7 +23996,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c /* * Hooks for other subsystems that check memory allocations. In a typical * production configuration these hooks all should produce no code at all. -@@ -1523,10 +1529,17 @@ +@@ -1527,10 +1533,17 @@ void *start, *p; int idx, order; bool shuffle; @@ -21835,7 +24014,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c local_irq_enable(); flags |= s->allocflags; -@@ -1601,7 +1614,7 @@ +@@ -1605,7 +1618,7 @@ page->frozen = 1; out: @@ -21844,7 +24023,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c local_irq_disable(); if (!page) return NULL; -@@ -1660,6 +1673,16 @@ +@@ -1664,6 +1677,16 @@ __free_pages(page, order); } @@ -21861,7 +24040,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c #define need_reserve_slab_rcu \ (sizeof(((struct page *)NULL)->lru) < sizeof(struct rcu_head)) -@@ -1691,6 +1714,12 @@ +@@ -1695,6 +1718,12 @@ } call_rcu(head, rcu_free_slab); @@ -21874,7 +24053,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } else __free_slab(s, page); } -@@ -1798,7 +1827,7 @@ +@@ -1802,7 +1831,7 @@ if (!n || !n->nr_partial) return NULL; @@ -21883,7 +24062,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c list_for_each_entry_safe(page, page2, &n->partial, lru) { void *t; -@@ -1823,7 +1852,7 @@ +@@ -1827,7 +1856,7 @@ break; } @@ -21892,7 +24071,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return object; } -@@ -2069,7 +2098,7 @@ +@@ -2073,7 +2102,7 @@ * that acquire_slab() will see a slab page that * is frozen */ @@ -21901,7 +24080,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } } else { m = M_FULL; -@@ -2080,7 +2109,7 @@ +@@ -2084,7 +2113,7 @@ * slabs from diagnostic functions will not see * any frozen slabs. */ @@ -21910,7 +24089,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } } -@@ -2115,7 +2144,7 @@ +@@ -2119,7 +2148,7 @@ goto redo; if (lock) @@ -21919,7 +24098,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c if (m == M_FREE) { stat(s, DEACTIVATE_EMPTY); -@@ -2147,10 +2176,10 @@ +@@ -2151,10 +2180,10 @@ n2 = get_node(s, page_to_nid(page)); if (n != n2) { if (n) @@ -21932,7 +24111,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } do { -@@ -2179,7 +2208,7 @@ +@@ -2183,7 +2212,7 @@ } if (n) @@ -21941,7 +24120,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c while (discard_page) { page = discard_page; -@@ -2218,14 +2247,21 @@ +@@ -2222,14 +2251,21 @@ pobjects = oldpage->pobjects; pages = oldpage->pages; if (drain && pobjects > s->cpu_partial) { @@ -21963,7 +24142,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c oldpage = NULL; pobjects = 0; pages = 0; -@@ -2297,7 +2333,22 @@ +@@ -2301,7 +2337,22 @@ static void flush_all(struct kmem_cache *s) { @@ -21986,7 +24165,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } /* -@@ -2352,10 +2403,10 @@ +@@ -2356,10 +2407,10 @@ unsigned long x = 0; struct page *page; @@ -21999,7 +24178,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return x; } #endif /* CONFIG_SLUB_DEBUG || CONFIG_SYSFS */ -@@ -2493,8 +2544,10 @@ +@@ -2497,8 +2548,10 @@ * already disabled (which is the case for bulk allocation). */ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, @@ -22011,7 +24190,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c void *freelist; struct page *page; -@@ -2554,6 +2607,13 @@ +@@ -2558,6 +2611,13 @@ VM_BUG_ON(!c->page->frozen); c->freelist = get_freepointer(s, freelist); c->tid = next_tid(c->tid); @@ -22025,7 +24204,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return freelist; new_slab: -@@ -2585,7 +2645,7 @@ +@@ -2589,7 +2649,7 @@ deactivate_slab(s, page, get_freepointer(s, freelist)); c->page = NULL; c->freelist = NULL; @@ -22034,7 +24213,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } /* -@@ -2597,6 +2657,7 @@ +@@ -2601,6 +2661,7 @@ { void *p; unsigned long flags; @@ -22042,7 +24221,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c local_irq_save(flags); #ifdef CONFIG_PREEMPT -@@ -2608,8 +2669,9 @@ +@@ -2612,8 +2673,9 @@ c = this_cpu_ptr(s->cpu_slab); #endif @@ -22053,7 +24232,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return p; } -@@ -2795,7 +2857,7 @@ +@@ -2799,7 +2861,7 @@ do { if (unlikely(n)) { @@ -22062,7 +24241,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c n = NULL; } prior = page->freelist; -@@ -2827,7 +2889,7 @@ +@@ -2831,7 +2893,7 @@ * Otherwise the list_lock will synchronize with * other processors updating the list of slabs. */ @@ -22071,7 +24250,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } } -@@ -2869,7 +2931,7 @@ +@@ -2873,7 +2935,7 @@ add_partial(n, page, DEACTIVATE_TO_TAIL); stat(s, FREE_ADD_PARTIAL); } @@ -22080,7 +24259,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return; slab_empty: -@@ -2884,7 +2946,7 @@ +@@ -2888,7 +2950,7 @@ remove_full(s, n, page); } @@ -22089,7 +24268,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c stat(s, FREE_SLAB); discard_slab(s, page); } -@@ -3089,6 +3151,7 @@ +@@ -3093,6 +3155,7 @@ void **p) { struct kmem_cache_cpu *c; @@ -22097,7 +24276,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c int i; /* memcg and kmem_cache debug support */ -@@ -3112,7 +3175,7 @@ +@@ -3116,7 +3179,7 @@ * of re-populating per CPU c->freelist */ p[i] = ___slab_alloc(s, flags, NUMA_NO_NODE, @@ -22106,7 +24285,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c if (unlikely(!p[i])) goto error; -@@ -3124,6 +3187,7 @@ +@@ -3128,6 +3191,7 @@ } c->tid = next_tid(c->tid); local_irq_enable(); @@ -22114,7 +24293,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c /* Clear memory outside IRQ disabled fastpath loop */ if (unlikely(flags & __GFP_ZERO)) { -@@ -3271,7 +3335,7 @@ +@@ -3275,7 +3339,7 @@ init_kmem_cache_node(struct kmem_cache_node *n) { n->nr_partial = 0; @@ -22123,7 +24302,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c INIT_LIST_HEAD(&n->partial); #ifdef CONFIG_SLUB_DEBUG atomic_long_set(&n->nr_slabs, 0); -@@ -3615,6 +3679,10 @@ +@@ -3619,6 +3683,10 @@ const char *text) { #ifdef CONFIG_SLUB_DEBUG @@ -22134,7 +24313,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c void *addr = page_address(page); void *p; unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) * -@@ -3635,6 +3703,7 @@ +@@ -3639,6 +3707,7 @@ slab_unlock(page); kfree(map); #endif @@ -22142,7 +24321,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } /* -@@ -3648,7 +3717,7 @@ +@@ -3652,7 +3721,7 @@ struct page *page, *h; BUG_ON(irqs_disabled()); @@ -22151,7 +24330,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c list_for_each_entry_safe(page, h, &n->partial, lru) { if (!page->inuse) { remove_partial(n, page); -@@ -3658,7 +3727,7 @@ +@@ -3662,7 +3731,7 @@ "Objects remaining in %s on __kmem_cache_shutdown()"); } } @@ -22160,7 +24339,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c list_for_each_entry_safe(page, h, &discard, lru) discard_slab(s, page); -@@ -3916,7 +3985,7 @@ +@@ -3905,7 +3974,7 @@ for (i = 0; i < SHRINK_PROMOTE_MAX; i++) INIT_LIST_HEAD(promote + i); @@ -22169,7 +24348,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c /* * Build lists of slabs to discard or promote. -@@ -3947,7 +4016,7 @@ +@@ -3936,7 +4005,7 @@ for (i = SHRINK_PROMOTE_MAX - 1; i >= 0; i--) list_splice(promote + i, &n->partial); @@ -22178,7 +24357,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c /* Release empty slabs */ list_for_each_entry_safe(page, t, &discard, lru) -@@ -4123,6 +4192,12 @@ +@@ -4112,6 +4181,12 @@ { static __initdata struct kmem_cache boot_kmem_cache, boot_kmem_cache_node; @@ -22191,7 +24370,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c if (debug_guardpage_minorder()) slub_max_order = 0; -@@ -4331,7 +4406,7 @@ +@@ -4320,7 +4395,7 @@ struct page *page; unsigned long flags; @@ -22200,7 +24379,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c list_for_each_entry(page, &n->partial, lru) { validate_slab_slab(s, page, map); -@@ -4353,7 +4428,7 @@ +@@ -4342,7 +4417,7 @@ s->name, count, atomic_long_read(&n->nr_slabs)); out: @@ -22209,7 +24388,7 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c return count; } -@@ -4541,12 +4616,12 @@ +@@ -4530,12 +4605,12 @@ if (!atomic_long_read(&n->nr_slabs)) continue; @@ -22224,9 +24403,9 @@ diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c } for (i = 0; i < t.count; i++) { -diff -Nur linux-4.9.6.orig/mm/swap.c linux-4.9.6/mm/swap.c ---- linux-4.9.6.orig/mm/swap.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/swap.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/swap.c linux-4.9.22/mm/swap.c +--- linux-4.9.22.orig/mm/swap.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/swap.c 2017-04-18 17:19:16.714774471 +0200 @@ -32,6 +32,7 @@ #include <linux/memcontrol.h> #include <linux/gfp.h> @@ -22428,9 +24607,9 @@ diff -Nur linux-4.9.6.orig/mm/swap.c linux-4.9.6/mm/swap.c put_online_cpus(); mutex_unlock(&lock); -diff -Nur linux-4.9.6.orig/mm/truncate.c linux-4.9.6/mm/truncate.c ---- linux-4.9.6.orig/mm/truncate.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/truncate.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/truncate.c linux-4.9.22/mm/truncate.c +--- linux-4.9.22.orig/mm/truncate.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/truncate.c 2017-04-18 17:19:16.714774471 +0200 @@ -62,9 +62,12 @@ * protected by mapping->tree_lock. */ @@ -22446,9 +24625,9 @@ diff -Nur linux-4.9.6.orig/mm/truncate.c linux-4.9.6/mm/truncate.c __radix_tree_delete_node(&mapping->page_tree, node); unlock: spin_unlock_irq(&mapping->tree_lock); -diff -Nur linux-4.9.6.orig/mm/vmalloc.c linux-4.9.6/mm/vmalloc.c ---- linux-4.9.6.orig/mm/vmalloc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/vmalloc.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/vmalloc.c linux-4.9.22/mm/vmalloc.c +--- linux-4.9.22.orig/mm/vmalloc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/vmalloc.c 2017-04-18 17:19:16.714774471 +0200 @@ -845,7 +845,7 @@ struct vmap_block *vb; struct vmap_area *va; @@ -22500,9 +24679,9 @@ diff -Nur linux-4.9.6.orig/mm/vmalloc.c linux-4.9.6/mm/vmalloc.c rcu_read_unlock(); /* Allocate new block if nothing was found */ -diff -Nur linux-4.9.6.orig/mm/vmstat.c linux-4.9.6/mm/vmstat.c ---- linux-4.9.6.orig/mm/vmstat.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/vmstat.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/vmstat.c linux-4.9.22/mm/vmstat.c +--- linux-4.9.22.orig/mm/vmstat.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/vmstat.c 2017-04-18 17:19:16.714774471 +0200 @@ -245,6 +245,7 @@ long x; long t; @@ -22599,9 +24778,9 @@ diff -Nur linux-4.9.6.orig/mm/vmstat.c linux-4.9.6/mm/vmstat.c } void __dec_zone_page_state(struct page *page, enum zone_stat_item item) -diff -Nur linux-4.9.6.orig/mm/workingset.c linux-4.9.6/mm/workingset.c ---- linux-4.9.6.orig/mm/workingset.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/workingset.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/workingset.c linux-4.9.22/mm/workingset.c +--- linux-4.9.22.orig/mm/workingset.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/workingset.c 2017-04-18 17:20:59.078743513 +0200 @@ -334,7 +334,8 @@ * point where they would still be useful. */ @@ -22655,8 +24834,8 @@ diff -Nur linux-4.9.6.orig/mm/workingset.c linux-4.9.6/mm/workingset.c pr_info("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n", timestamp_bits, max_order, bucket_order); -- ret = list_lru_init_key(&workingset_shadow_nodes, &shadow_nodes_key); -+ ret = list_lru_init_key(&__workingset_shadow_nodes, &shadow_nodes_key); +- ret = __list_lru_init(&workingset_shadow_nodes, true, &shadow_nodes_key); ++ ret = __list_lru_init(&__workingset_shadow_nodes, true, &shadow_nodes_key); if (ret) goto err; ret = register_shrinker(&workingset_shadow_shrinker); @@ -22669,9 +24848,9 @@ diff -Nur linux-4.9.6.orig/mm/workingset.c linux-4.9.6/mm/workingset.c err: return ret; } -diff -Nur linux-4.9.6.orig/mm/zsmalloc.c linux-4.9.6/mm/zsmalloc.c ---- linux-4.9.6.orig/mm/zsmalloc.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/mm/zsmalloc.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/mm/zsmalloc.c linux-4.9.22/mm/zsmalloc.c +--- linux-4.9.22.orig/mm/zsmalloc.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/mm/zsmalloc.c 2017-04-18 17:19:16.714774471 +0200 @@ -53,6 +53,7 @@ #include <linux/mount.h> #include <linux/migrate.h> @@ -22849,9 +25028,9 @@ diff -Nur linux-4.9.6.orig/mm/zsmalloc.c linux-4.9.6/mm/zsmalloc.c migrate_read_unlock(zspage); unpin_tag(handle); -diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c ---- linux-4.9.6.orig/net/core/dev.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/dev.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/net/core/dev.c linux-4.9.22/net/core/dev.c +--- linux-4.9.22.orig/net/core/dev.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/dev.c 2017-04-18 17:19:16.718774627 +0200 @@ -190,6 +190,7 @@ static DEFINE_READ_MOSTLY_HASHTABLE(napi_hash, 8); @@ -22952,7 +25131,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } /** -@@ -2263,6 +2269,7 @@ +@@ -2285,6 +2291,7 @@ sd->output_queue_tailp = &q->next_sched; raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -22960,7 +25139,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } void __netif_schedule(struct Qdisc *q) -@@ -2344,6 +2351,7 @@ +@@ -2366,6 +2373,7 @@ __this_cpu_write(softnet_data.completion_queue, skb); raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -22968,7 +25147,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -3078,7 +3086,11 @@ +@@ -3100,7 +3108,11 @@ * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. */ @@ -22980,7 +25159,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c if (unlikely(contended)) spin_lock(&q->busylock); -@@ -3141,8 +3153,10 @@ +@@ -3163,8 +3175,10 @@ #define skb_update_prio(skb) #endif @@ -22991,7 +25170,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c /** * dev_loopback_xmit - loop back @skb -@@ -3376,8 +3390,7 @@ +@@ -3398,8 +3412,7 @@ int cpu = smp_processor_id(); /* ok because BHs are off */ if (txq->xmit_lock_owner != cpu) { @@ -23001,7 +25180,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c goto recursion_alert; skb = validate_xmit_skb(skb, dev); -@@ -3387,9 +3400,9 @@ +@@ -3409,9 +3422,9 @@ HARD_TX_LOCK(dev, txq, cpu); if (!netif_xmit_stopped(txq)) { @@ -23013,7 +25192,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c if (dev_xmit_complete(rc)) { HARD_TX_UNLOCK(dev, txq); goto out; -@@ -3763,6 +3776,7 @@ +@@ -3785,6 +3798,7 @@ rps_unlock(sd); local_irq_restore(flags); @@ -23021,7 +25200,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -3781,7 +3795,7 @@ +@@ -3803,7 +3817,7 @@ struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -23030,7 +25209,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -3791,13 +3805,13 @@ +@@ -3813,13 +3827,13 @@ ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); @@ -23047,7 +25226,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } return ret; } -@@ -3831,11 +3845,9 @@ +@@ -3853,11 +3867,9 @@ trace_netif_rx_ni_entry(skb); @@ -23061,7 +25240,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c return err; } -@@ -4314,7 +4326,7 @@ +@@ -4336,7 +4348,7 @@ skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->input_pkt_queue); @@ -23070,7 +25249,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c input_queue_head_incr(sd); } } -@@ -4324,11 +4336,14 @@ +@@ -4346,11 +4358,14 @@ skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->process_queue); @@ -23086,7 +25265,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } static void flush_all_backlogs(void) -@@ -4809,6 +4824,7 @@ +@@ -4831,6 +4846,7 @@ sd->rps_ipi_list = NULL; local_irq_enable(); @@ -23094,7 +25273,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c /* Send pending IPI's to kick RPS processing on remote cpus. */ while (remsd) { -@@ -4822,6 +4838,7 @@ +@@ -4844,6 +4860,7 @@ } else #endif local_irq_enable(); @@ -23102,7 +25281,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -4851,7 +4868,9 @@ +@@ -4873,7 +4890,9 @@ while (again) { struct sk_buff *skb; @@ -23112,7 +25291,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c rcu_read_lock(); __netif_receive_skb(skb); rcu_read_unlock(); -@@ -4859,9 +4878,9 @@ +@@ -4881,9 +4900,9 @@ if (++work >= quota) return work; @@ -23123,7 +25302,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c rps_lock(sd); if (skb_queue_empty(&sd->input_pkt_queue)) { /* -@@ -4899,9 +4918,11 @@ +@@ -4921,9 +4940,11 @@ local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -23135,7 +25314,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c /** * __napi_schedule_irqoff - schedule for receive * @n: entry to schedule -@@ -4913,6 +4934,7 @@ +@@ -4935,6 +4956,7 @@ ____napi_schedule(this_cpu_ptr(&softnet_data), n); } EXPORT_SYMBOL(__napi_schedule_irqoff); @@ -23143,7 +25322,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c void __napi_complete(struct napi_struct *n) { -@@ -5202,13 +5224,21 @@ +@@ -5224,13 +5246,21 @@ struct softnet_data *sd = this_cpu_ptr(&softnet_data); unsigned long time_limit = jiffies + 2; int budget = netdev_budget; @@ -23165,7 +25344,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c for (;;) { struct napi_struct *n; -@@ -5239,7 +5269,7 @@ +@@ -5261,7 +5291,7 @@ list_splice_tail(&repoll, &list); list_splice(&list, &sd->poll_list); if (!list_empty(&sd->poll_list)) @@ -23174,7 +25353,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c net_rps_action_and_irq_enable(sd); } -@@ -8000,16 +8030,20 @@ +@@ -8022,16 +8052,20 @@ raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -23196,7 +25375,7 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c return NOTIFY_OK; } -@@ -8314,8 +8348,9 @@ +@@ -8336,8 +8370,9 @@ INIT_WORK(flush, flush_backlog); @@ -23208,9 +25387,9 @@ diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c INIT_LIST_HEAD(&sd->poll_list); sd->output_queue_tailp = &sd->output_queue; #ifdef CONFIG_RPS -diff -Nur linux-4.9.6.orig/net/core/filter.c linux-4.9.6/net/core/filter.c ---- linux-4.9.6.orig/net/core/filter.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/filter.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/net/core/filter.c linux-4.9.22/net/core/filter.c +--- linux-4.9.22.orig/net/core/filter.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/filter.c 2017-04-18 17:19:16.718774627 +0200 @@ -1645,7 +1645,7 @@ { int ret; @@ -23232,9 +25411,9 @@ diff -Nur linux-4.9.6.orig/net/core/filter.c linux-4.9.6/net/core/filter.c return ret; } -diff -Nur linux-4.9.6.orig/net/core/gen_estimator.c linux-4.9.6/net/core/gen_estimator.c ---- linux-4.9.6.orig/net/core/gen_estimator.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/gen_estimator.c 2017-01-28 13:59:10.103662798 +0100 +diff -Nur linux-4.9.22.orig/net/core/gen_estimator.c linux-4.9.22/net/core/gen_estimator.c +--- linux-4.9.22.orig/net/core/gen_estimator.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/gen_estimator.c 2017-04-18 17:19:16.718774627 +0200 @@ -84,7 +84,7 @@ struct gnet_stats_basic_packed *bstats; struct gnet_stats_rate_est64 *rate_est; @@ -23262,9 +25441,9 @@ diff -Nur linux-4.9.6.orig/net/core/gen_estimator.c linux-4.9.6/net/core/gen_est { gen_kill_estimator(bstats, rate_est); return gen_new_estimator(bstats, cpu_bstats, rate_est, stats_lock, running, opt); -diff -Nur linux-4.9.6.orig/net/core/gen_stats.c linux-4.9.6/net/core/gen_stats.c ---- linux-4.9.6.orig/net/core/gen_stats.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/gen_stats.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/core/gen_stats.c linux-4.9.22/net/core/gen_stats.c +--- linux-4.9.22.orig/net/core/gen_stats.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/gen_stats.c 2017-04-18 17:19:16.718774627 +0200 @@ -130,7 +130,7 @@ } @@ -23296,9 +25475,9 @@ diff -Nur linux-4.9.6.orig/net/core/gen_stats.c linux-4.9.6/net/core/gen_stats.c struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b) -diff -Nur linux-4.9.6.orig/net/core/skbuff.c linux-4.9.6/net/core/skbuff.c ---- linux-4.9.6.orig/net/core/skbuff.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/skbuff.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/core/skbuff.c linux-4.9.22/net/core/skbuff.c +--- linux-4.9.22.orig/net/core/skbuff.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/skbuff.c 2017-04-18 17:19:16.718774627 +0200 @@ -64,6 +64,7 @@ #include <linux/errqueue.h> #include <linux/prefetch.h> @@ -23430,10 +25609,10 @@ diff -Nur linux-4.9.6.orig/net/core/skbuff.c linux-4.9.6/net/core/skbuff.c } void __kfree_skb_defer(struct sk_buff *skb) { -diff -Nur linux-4.9.6.orig/net/core/sock.c linux-4.9.6/net/core/sock.c ---- linux-4.9.6.orig/net/core/sock.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/core/sock.c 2017-01-28 13:59:10.107662951 +0100 -@@ -2488,12 +2488,11 @@ +diff -Nur linux-4.9.22.orig/net/core/sock.c linux-4.9.22/net/core/sock.c +--- linux-4.9.22.orig/net/core/sock.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/core/sock.c 2017-04-18 17:19:16.718774627 +0200 +@@ -2499,12 +2499,11 @@ if (sk->sk_lock.owned) __lock_sock(sk); sk->sk_lock.owned = 1; @@ -23447,9 +25626,9 @@ diff -Nur linux-4.9.6.orig/net/core/sock.c linux-4.9.6/net/core/sock.c } EXPORT_SYMBOL(lock_sock_nested); -diff -Nur linux-4.9.6.orig/net/ipv4/icmp.c linux-4.9.6/net/ipv4/icmp.c ---- linux-4.9.6.orig/net/ipv4/icmp.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/ipv4/icmp.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/ipv4/icmp.c linux-4.9.22/net/ipv4/icmp.c +--- linux-4.9.22.orig/net/ipv4/icmp.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/ipv4/icmp.c 2017-04-18 17:19:16.718774627 +0200 @@ -69,6 +69,7 @@ #include <linux/jiffies.h> #include <linux/kernel.h> @@ -23557,9 +25736,9 @@ diff -Nur linux-4.9.6.orig/net/ipv4/icmp.c linux-4.9.6/net/ipv4/icmp.c } /* should there be an ICMP stat for ignored echos? */ return true; -diff -Nur linux-4.9.6.orig/net/ipv4/sysctl_net_ipv4.c linux-4.9.6/net/ipv4/sysctl_net_ipv4.c ---- linux-4.9.6.orig/net/ipv4/sysctl_net_ipv4.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/ipv4/sysctl_net_ipv4.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/ipv4/sysctl_net_ipv4.c linux-4.9.22/net/ipv4/sysctl_net_ipv4.c +--- linux-4.9.22.orig/net/ipv4/sysctl_net_ipv4.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/ipv4/sysctl_net_ipv4.c 2017-04-18 17:19:16.718774627 +0200 @@ -681,6 +681,13 @@ .proc_handler = proc_dointvec }, @@ -23574,9 +25753,9 @@ diff -Nur linux-4.9.6.orig/net/ipv4/sysctl_net_ipv4.c linux-4.9.6/net/ipv4/sysct .procname = "icmp_ignore_bogus_error_responses", .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, .maxlen = sizeof(int), -diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c ---- linux-4.9.6.orig/net/ipv4/tcp_ipv4.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/ipv4/tcp_ipv4.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/ipv4/tcp_ipv4.c linux-4.9.22/net/ipv4/tcp_ipv4.c +--- linux-4.9.22.orig/net/ipv4/tcp_ipv4.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/ipv4/tcp_ipv4.c 2017-04-18 17:19:16.718774627 +0200 @@ -62,6 +62,7 @@ #include <linux/init.h> #include <linux/times.h> @@ -23585,7 +25764,7 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c #include <net/net_namespace.h> #include <net/icmp.h> -@@ -564,6 +565,7 @@ +@@ -568,6 +569,7 @@ } EXPORT_SYMBOL(tcp_v4_send_check); @@ -23593,7 +25772,7 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c /* * This routine will send an RST to the other tcp. * -@@ -691,6 +693,8 @@ +@@ -695,6 +697,8 @@ offsetof(struct inet_timewait_sock, tw_bound_dev_if)); arg.tos = ip_hdr(skb)->tos; @@ -23602,7 +25781,7 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c local_bh_disable(); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), skb, &TCP_SKB_CB(skb)->header.h4.opt, -@@ -700,6 +704,7 @@ +@@ -704,6 +708,7 @@ __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); local_bh_enable(); @@ -23610,7 +25789,7 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c #ifdef CONFIG_TCP_MD5SIG out: -@@ -775,6 +780,7 @@ +@@ -779,6 +784,7 @@ if (oif) arg.bound_dev_if = oif; arg.tos = tos; @@ -23618,7 +25797,7 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c local_bh_disable(); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), skb, &TCP_SKB_CB(skb)->header.h4.opt, -@@ -783,6 +789,7 @@ +@@ -787,6 +793,7 @@ __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); local_bh_enable(); @@ -23626,10 +25805,10 @@ diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c } static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb) -diff -Nur linux-4.9.6.orig/net/mac80211/rx.c linux-4.9.6/net/mac80211/rx.c ---- linux-4.9.6.orig/net/mac80211/rx.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/mac80211/rx.c 2017-01-28 13:59:10.107662951 +0100 -@@ -4166,7 +4166,7 @@ +diff -Nur linux-4.9.22.orig/net/mac80211/rx.c linux-4.9.22/net/mac80211/rx.c +--- linux-4.9.22.orig/net/mac80211/rx.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/mac80211/rx.c 2017-04-18 17:19:16.718774627 +0200 +@@ -4180,7 +4180,7 @@ struct ieee80211_supported_band *sband; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); @@ -23638,9 +25817,9 @@ diff -Nur linux-4.9.6.orig/net/mac80211/rx.c linux-4.9.6/net/mac80211/rx.c if (WARN_ON(status->band >= NUM_NL80211_BANDS)) goto drop; -diff -Nur linux-4.9.6.orig/net/netfilter/core.c linux-4.9.6/net/netfilter/core.c ---- linux-4.9.6.orig/net/netfilter/core.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/netfilter/core.c 2017-01-28 13:59:10.107662951 +0100 +diff -Nur linux-4.9.22.orig/net/netfilter/core.c linux-4.9.22/net/netfilter/core.c +--- linux-4.9.22.orig/net/netfilter/core.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/netfilter/core.c 2017-04-18 17:19:16.722774781 +0200 @@ -22,12 +22,18 @@ #include <linux/proc_fs.h> #include <linux/mutex.h> @@ -23660,9 +25839,9 @@ diff -Nur linux-4.9.6.orig/net/netfilter/core.c linux-4.9.6/net/netfilter/core.c static DEFINE_MUTEX(afinfo_mutex); const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly; -diff -Nur linux-4.9.6.orig/net/packet/af_packet.c linux-4.9.6/net/packet/af_packet.c ---- linux-4.9.6.orig/net/packet/af_packet.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/packet/af_packet.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/packet/af_packet.c linux-4.9.22/net/packet/af_packet.c +--- linux-4.9.22.orig/net/packet/af_packet.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/packet/af_packet.c 2017-04-18 17:19:16.722774781 +0200 @@ -63,6 +63,7 @@ #include <linux/if_packet.h> #include <linux/wireless.h> @@ -23689,9 +25868,9 @@ diff -Nur linux-4.9.6.orig/net/packet/af_packet.c linux-4.9.6/net/packet/af_pack } } prb_close_block(pkc, pbd, po, status); -diff -Nur linux-4.9.6.orig/net/rds/ib_rdma.c linux-4.9.6/net/rds/ib_rdma.c ---- linux-4.9.6.orig/net/rds/ib_rdma.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/rds/ib_rdma.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/rds/ib_rdma.c linux-4.9.22/net/rds/ib_rdma.c +--- linux-4.9.22.orig/net/rds/ib_rdma.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/rds/ib_rdma.c 2017-04-18 17:19:16.722774781 +0200 @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <linux/rculist.h> @@ -23709,9 +25888,9 @@ diff -Nur linux-4.9.6.orig/net/rds/ib_rdma.c linux-4.9.6/net/rds/ib_rdma.c } } -diff -Nur linux-4.9.6.orig/net/rxrpc/security.c linux-4.9.6/net/rxrpc/security.c ---- linux-4.9.6.orig/net/rxrpc/security.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/rxrpc/security.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/rxrpc/security.c linux-4.9.22/net/rxrpc/security.c +--- linux-4.9.22.orig/net/rxrpc/security.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/rxrpc/security.c 2017-04-18 17:19:16.722774781 +0200 @@ -19,9 +19,6 @@ #include <keys/rxrpc-type.h> #include "ar-internal.h" @@ -23722,9 +25901,9 @@ diff -Nur linux-4.9.6.orig/net/rxrpc/security.c linux-4.9.6/net/rxrpc/security.c static const struct rxrpc_security *rxrpc_security_types[] = { [RXRPC_SECURITY_NONE] = &rxrpc_no_security, #ifdef CONFIG_RXKAD -diff -Nur linux-4.9.6.orig/net/sched/sch_api.c linux-4.9.6/net/sched/sch_api.c ---- linux-4.9.6.orig/net/sched/sch_api.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/sched/sch_api.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/sched/sch_api.c linux-4.9.22/net/sched/sch_api.c +--- linux-4.9.22.orig/net/sched/sch_api.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/sched/sch_api.c 2017-04-18 17:19:16.722774781 +0200 @@ -981,7 +981,7 @@ rcu_assign_pointer(sch->stab, stab); } @@ -23734,9 +25913,9 @@ diff -Nur linux-4.9.6.orig/net/sched/sch_api.c linux-4.9.6/net/sched/sch_api.c err = -EOPNOTSUPP; if (sch->flags & TCQ_F_MQROOT) -diff -Nur linux-4.9.6.orig/net/sched/sch_generic.c linux-4.9.6/net/sched/sch_generic.c ---- linux-4.9.6.orig/net/sched/sch_generic.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/sched/sch_generic.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/sched/sch_generic.c linux-4.9.22/net/sched/sch_generic.c +--- linux-4.9.22.orig/net/sched/sch_generic.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/sched/sch_generic.c 2017-04-18 17:19:16.722774781 +0200 @@ -425,7 +425,11 @@ .ops = &noop_qdisc_ops, .q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock), @@ -23776,9 +25955,9 @@ diff -Nur linux-4.9.6.orig/net/sched/sch_generic.c linux-4.9.6/net/sched/sch_gen } void dev_deactivate(struct net_device *dev) -diff -Nur linux-4.9.6.orig/net/sunrpc/svc_xprt.c linux-4.9.6/net/sunrpc/svc_xprt.c ---- linux-4.9.6.orig/net/sunrpc/svc_xprt.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/net/sunrpc/svc_xprt.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/net/sunrpc/svc_xprt.c linux-4.9.22/net/sunrpc/svc_xprt.c +--- linux-4.9.22.orig/net/sunrpc/svc_xprt.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/net/sunrpc/svc_xprt.c 2017-04-18 17:19:16.722774781 +0200 @@ -396,7 +396,7 @@ goto out; } @@ -23806,9 +25985,9 @@ diff -Nur linux-4.9.6.orig/net/sunrpc/svc_xprt.c linux-4.9.6/net/sunrpc/svc_xprt out: trace_svc_xprt_do_enqueue(xprt, rqstp); } -diff -Nur linux-4.9.6.orig/scripts/mkcompile_h linux-4.9.6/scripts/mkcompile_h ---- linux-4.9.6.orig/scripts/mkcompile_h 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/scripts/mkcompile_h 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/scripts/mkcompile_h linux-4.9.22/scripts/mkcompile_h +--- linux-4.9.22.orig/scripts/mkcompile_h 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/scripts/mkcompile_h 2017-04-18 17:19:16.722774781 +0200 @@ -4,7 +4,8 @@ ARCH=$2 SMP=$3 @@ -23827,9 +26006,9 @@ diff -Nur linux-4.9.6.orig/scripts/mkcompile_h linux-4.9.6/scripts/mkcompile_h UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" # Truncate to maximum length -diff -Nur linux-4.9.6.orig/sound/core/pcm_native.c linux-4.9.6/sound/core/pcm_native.c ---- linux-4.9.6.orig/sound/core/pcm_native.c 2017-01-26 08:25:24.000000000 +0100 -+++ linux-4.9.6/sound/core/pcm_native.c 2017-01-28 13:59:10.111663104 +0100 +diff -Nur linux-4.9.22.orig/sound/core/pcm_native.c linux-4.9.22/sound/core/pcm_native.c +--- linux-4.9.22.orig/sound/core/pcm_native.c 2017-04-12 12:41:42.000000000 +0200 ++++ linux-4.9.22/sound/core/pcm_native.c 2017-04-18 17:19:16.722774781 +0200 @@ -135,7 +135,7 @@ void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream) { |