diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm/boot/dts/exynos3250.dtsi linux-libre-4.14.106-gnu/arch/arm/boot/dts/exynos3250.dtsi
--- linux-libre-4.14.105-gnu/arch/arm/boot/dts/exynos3250.dtsi	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm/boot/dts/exynos3250.dtsi	2019-03-13 17:03:24.000000000 -0400
@@ -172,6 +172,9 @@
 			interrupt-controller;
 			#interrupt-cells = <3>;
 			interrupt-parent = <&gic>;
+			clock-names = "clkout8";
+			clocks = <&cmu CLK_FIN_PLL>;
+			#clock-cells = <1>;
 		};
 
 		mipi_phy: video-phy {
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm/boot/dts/exynos4412-odroid-common.dtsi linux-libre-4.14.106-gnu/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
--- linux-libre-4.14.105-gnu/arch/arm/boot/dts/exynos4412-odroid-common.dtsi	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm/boot/dts/exynos4412-odroid-common.dtsi	2019-03-13 17:03:24.000000000 -0400
@@ -60,7 +60,7 @@
 	};
 
 	emmc_pwrseq: pwrseq {
-		pinctrl-0 = <&sd1_cd>;
+		pinctrl-0 = <&emmc_rstn>;
 		pinctrl-names = "default";
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&gpk1 2 GPIO_ACTIVE_LOW>;
@@ -161,12 +161,6 @@
 	cpu0-supply = <&buck2_reg>;
 };
 
-/* RSTN signal for eMMC */
-&sd1_cd {
-	samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
-	samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
-};
-
 &pinctrl_1 {
 	gpio_power_key: power_key {
 		samsung,pins = "gpx1-3";
@@ -184,6 +178,11 @@
 		samsung,pins = "gpx3-7";
 		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
 	};
+
+	emmc_rstn: emmc-rstn {
+		samsung,pins = "gpk1-2";
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+	};
 };
 
 &ehci {
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi linux-libre-4.14.106-gnu/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi
--- linux-libre-4.14.105-gnu/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi	2019-03-13 17:03:24.000000000 -0400
@@ -92,7 +92,7 @@
 			interrupts-extended = <
 				&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
 				&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
-				&cpcap 48 1
+				&cpcap 48 0
 			>;
 			interrupt-names =
 				"id_ground", "id_float", "se0conn", "vbusvld",
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm/kernel/entry-common.S linux-libre-4.14.106-gnu/arch/arm/kernel/entry-common.S
--- linux-libre-4.14.105-gnu/arch/arm/kernel/entry-common.S	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm/kernel/entry-common.S	2019-03-13 17:03:24.000000000 -0400
@@ -46,6 +46,7 @@ saved_pc	.req	lr
  * features make this path too inefficient.
  */
 ret_fast_syscall:
+__ret_fast_syscall:
  UNWIND(.fnstart	)
  UNWIND(.cantunwind	)
 	disable_irq_notrace			@ disable interrupts
@@ -75,6 +76,7 @@ fast_work_pending:
  * r0 first to avoid needing to save registers around each C function call.
  */
 ret_fast_syscall:
+__ret_fast_syscall:
  UNWIND(.fnstart	)
  UNWIND(.cantunwind	)
 	str	r0, [sp, #S_R0 + S_OFF]!	@ save returned r0
@@ -241,7 +243,7 @@ local_restart:
 	tst	r10, #_TIF_SYSCALL_WORK		@ are we tracing syscalls?
 	bne	__sys_trace
 
-	invoke_syscall tbl, scno, r10, ret_fast_syscall
+	invoke_syscall tbl, scno, r10, __ret_fast_syscall
 
 	add	r1, sp, #S_OFF
 2:	cmp	scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm/plat-pxa/ssp.c linux-libre-4.14.106-gnu/arch/arm/plat-pxa/ssp.c
--- linux-libre-4.14.105-gnu/arch/arm/plat-pxa/ssp.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm/plat-pxa/ssp.c	2019-03-13 17:03:24.000000000 -0400
@@ -237,8 +237,6 @@ static int pxa_ssp_remove(struct platfor
 	if (ssp == NULL)
 		return -ENODEV;
 
-	iounmap(ssp->mmio_base);
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	release_mem_region(res->start, resource_size(res));
 
@@ -248,7 +246,6 @@ static int pxa_ssp_remove(struct platfor
 	list_del(&ssp->node);
 	mutex_unlock(&ssp_lock);
 
-	kfree(ssp);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts linux-libre-4.14.106-gnu/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
--- linux-libre-4.14.105-gnu/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts	2019-03-13 17:03:24.000000000 -0400
@@ -118,6 +118,7 @@
 		reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
 		clocks = <&pmic>;
 		clock-names = "ext_clock";
+		post-power-on-delay-ms = <10>;
 		power-off-delay-us = <10>;
 	};
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm64/boot/dts/qcom/msm8996.dtsi linux-libre-4.14.106-gnu/arch/arm64/boot/dts/qcom/msm8996.dtsi
--- linux-libre-4.14.105-gnu/arch/arm64/boot/dts/qcom/msm8996.dtsi	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm64/boot/dts/qcom/msm8996.dtsi	2019-03-13 17:03:24.000000000 -0400
@@ -359,7 +359,7 @@
 		};
 
 		intc: interrupt-controller@9bc0000 {
-			compatible = "arm,gic-v3";
+			compatible = "qcom,msm8996-gic-v3", "arm,gic-v3";
 			#interrupt-cells = <3>;
 			interrupt-controller;
 			#redistributor-regions = <1>;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm64/boot/dts/renesas/r8a7796.dtsi linux-libre-4.14.106-gnu/arch/arm64/boot/dts/renesas/r8a7796.dtsi
--- linux-libre-4.14.105-gnu/arch/arm64/boot/dts/renesas/r8a7796.dtsi	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm64/boot/dts/renesas/r8a7796.dtsi	2019-03-13 17:03:24.000000000 -0400
@@ -937,6 +937,9 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x13>, <&dmac1 0x12>,
+			       <&dmac2 0x13>, <&dmac2 0x12>;
+			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			resets = <&cpg 310>;
 			status = "disabled";
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/arm64/kernel/probes/kprobes.c linux-libre-4.14.106-gnu/arch/arm64/kernel/probes/kprobes.c
--- linux-libre-4.14.105-gnu/arch/arm64/kernel/probes/kprobes.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/arm64/kernel/probes/kprobes.c	2019-03-13 17:03:24.000000000 -0400
@@ -554,13 +554,13 @@ bool arch_within_kprobe_blacklist(unsign
 	    addr < (unsigned long)__entry_text_end) ||
 	    (addr >= (unsigned long)__idmap_text_start &&
 	    addr < (unsigned long)__idmap_text_end) ||
+	    (addr >= (unsigned long)__hyp_text_start &&
+	    addr < (unsigned long)__hyp_text_end) ||
 	    !!search_exception_tables(addr))
 		return true;
 
 	if (!is_kernel_in_hyp_mode()) {
-		if ((addr >= (unsigned long)__hyp_text_start &&
-		    addr < (unsigned long)__hyp_text_end) ||
-		    (addr >= (unsigned long)__hyp_idmap_text_start &&
+		if ((addr >= (unsigned long)__hyp_idmap_text_start &&
 		    addr < (unsigned long)__hyp_idmap_text_end))
 			return true;
 	}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/mips/boot/dts/ingenic/ci20.dts linux-libre-4.14.106-gnu/arch/mips/boot/dts/ingenic/ci20.dts
--- linux-libre-4.14.105-gnu/arch/mips/boot/dts/ingenic/ci20.dts	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/mips/boot/dts/ingenic/ci20.dts	2019-03-13 17:03:24.000000000 -0400
@@ -54,7 +54,7 @@
 	status = "okay";
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&pins_uart2>;
+	pinctrl-0 = <&pins_uart3>;
 };
 
 &uart4 {
@@ -174,9 +174,9 @@
 		bias-disable;
 	};
 
-	pins_uart2: uart2 {
-		function = "uart2";
-		groups = "uart2-data", "uart2-hwflow";
+	pins_uart3: uart3 {
+		function = "uart3";
+		groups = "uart3-data", "uart3-hwflow";
 		bias-disable;
 	};
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/mips/kernel/irq.c linux-libre-4.14.106-gnu/arch/mips/kernel/irq.c
--- linux-libre-4.14.105-gnu/arch/mips/kernel/irq.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/mips/kernel/irq.c	2019-03-13 17:03:24.000000000 -0400
@@ -52,6 +52,7 @@ asmlinkage void spurious_interrupt(void)
 void __init init_IRQ(void)
 {
 	int i;
+	unsigned int order = get_order(IRQ_STACK_SIZE);
 
 	for (i = 0; i < NR_IRQS; i++)
 		irq_set_noprobe(i);
@@ -62,8 +63,7 @@ void __init init_IRQ(void)
 	arch_init_irq();
 
 	for_each_possible_cpu(i) {
-		int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE;
-		void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages);
+		void *s = (void *)__get_free_pages(GFP_KERNEL, order);
 
 		irq_stack[i] = s;
 		pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/mips/kernel/process.c linux-libre-4.14.106-gnu/arch/mips/kernel/process.c
--- linux-libre-4.14.105-gnu/arch/mips/kernel/process.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/mips/kernel/process.c	2019-03-13 17:03:24.000000000 -0400
@@ -370,7 +370,7 @@ static inline int is_sp_move_ins(union m
 static int get_frame_info(struct mips_frame_info *info)
 {
 	bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
-	union mips_instruction insn, *ip, *ip_end;
+	union mips_instruction insn, *ip;
 	const unsigned int max_insns = 128;
 	unsigned int last_insn_size = 0;
 	unsigned int i;
@@ -383,10 +383,9 @@ static int get_frame_info(struct mips_fr
 	if (!ip)
 		goto err;
 
-	ip_end = (void *)ip + info->func_size;
-
-	for (i = 0; i < max_insns && ip < ip_end; i++) {
+	for (i = 0; i < max_insns; i++) {
 		ip = (void *)ip + last_insn_size;
+
 		if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
 			insn.word = ip->halfword[0] << 16;
 			last_insn_size = 2;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/events/core.c linux-libre-4.14.106-gnu/arch/x86/events/core.c
--- linux-libre-4.14.105-gnu/arch/x86/events/core.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/events/core.c	2019-03-13 17:03:24.000000000 -0400
@@ -1968,7 +1968,7 @@ static int x86_pmu_commit_txn(struct pmu
  */
 static void free_fake_cpuc(struct cpu_hw_events *cpuc)
 {
-	kfree(cpuc->shared_regs);
+	intel_cpuc_finish(cpuc);
 	kfree(cpuc);
 }
 
@@ -1980,14 +1980,11 @@ static struct cpu_hw_events *allocate_fa
 	cpuc = kzalloc(sizeof(*cpuc), GFP_KERNEL);
 	if (!cpuc)
 		return ERR_PTR(-ENOMEM);
-
-	/* only needed, if we have extra_regs */
-	if (x86_pmu.extra_regs) {
-		cpuc->shared_regs = allocate_shared_regs(cpu);
-		if (!cpuc->shared_regs)
-			goto error;
-	}
 	cpuc->is_fake = 1;
+
+	if (intel_cpuc_prepare(cpuc, cpu))
+		goto error;
+
 	return cpuc;
 error:
 	free_fake_cpuc(cpuc);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/events/intel/core.c linux-libre-4.14.106-gnu/arch/x86/events/intel/core.c
--- linux-libre-4.14.105-gnu/arch/x86/events/intel/core.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/events/intel/core.c	2019-03-13 17:03:24.000000000 -0400
@@ -1995,6 +1995,39 @@ static void intel_pmu_nhm_enable_all(int
 	intel_pmu_enable_all(added);
 }
 
+static void intel_set_tfa(struct cpu_hw_events *cpuc, bool on)
+{
+	u64 val = on ? MSR_TFA_RTM_FORCE_ABORT : 0;
+
+	if (cpuc->tfa_shadow != val) {
+		cpuc->tfa_shadow = val;
+		wrmsrl(MSR_TSX_FORCE_ABORT, val);
+	}
+}
+
+static void intel_tfa_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr)
+{
+	/*
+	 * We're going to use PMC3, make sure TFA is set before we touch it.
+	 */
+	if (cntr == 3 && !cpuc->is_fake)
+		intel_set_tfa(cpuc, true);
+}
+
+static void intel_tfa_pmu_enable_all(int added)
+{
+	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
+
+	/*
+	 * If we find PMC3 is no longer used when we enable the PMU, we can
+	 * clear TFA.
+	 */
+	if (!test_bit(3, cpuc->active_mask))
+		intel_set_tfa(cpuc, false);
+
+	intel_pmu_enable_all(added);
+}
+
 static inline u64 intel_pmu_get_status(void)
 {
 	u64 status;
@@ -2640,6 +2673,35 @@ intel_stop_scheduling(struct cpu_hw_even
 }
 
 static struct event_constraint *
+dyn_constraint(struct cpu_hw_events *cpuc, struct event_constraint *c, int idx)
+{
+	WARN_ON_ONCE(!cpuc->constraint_list);
+
+	if (!(c->flags & PERF_X86_EVENT_DYNAMIC)) {
+		struct event_constraint *cx;
+
+		/*
+		 * grab pre-allocated constraint entry
+		 */
+		cx = &cpuc->constraint_list[idx];
+
+		/*
+		 * initialize dynamic constraint
+		 * with static constraint
+		 */
+		*cx = *c;
+
+		/*
+		 * mark constraint as dynamic
+		 */
+		cx->flags |= PERF_X86_EVENT_DYNAMIC;
+		c = cx;
+	}
+
+	return c;
+}
+
+static struct event_constraint *
 intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event,
 			   int idx, struct event_constraint *c)
 {
@@ -2669,27 +2731,7 @@ intel_get_excl_constraints(struct cpu_hw
 	 * only needed when constraint has not yet
 	 * been cloned (marked dynamic)
 	 */
-	if (!(c->flags & PERF_X86_EVENT_DYNAMIC)) {
-		struct event_constraint *cx;
-
-		/*
-		 * grab pre-allocated constraint entry
-		 */
-		cx = &cpuc->constraint_list[idx];
-
-		/*
-		 * initialize dynamic constraint
-		 * with static constraint
-		 */
-		*cx = *c;
-
-		/*
-		 * mark constraint as dynamic, so we
-		 * can free it later on
-		 */
-		cx->flags |= PERF_X86_EVENT_DYNAMIC;
-		c = cx;
-	}
+	c = dyn_constraint(cpuc, c, idx);
 
 	/*
 	 * From here on, the constraint is dynamic.
@@ -3209,6 +3251,26 @@ glp_get_event_constraints(struct cpu_hw_
 	return c;
 }
 
+static bool allow_tsx_force_abort = true;
+
+static struct event_constraint *
+tfa_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
+			  struct perf_event *event)
+{
+	struct event_constraint *c = hsw_get_event_constraints(cpuc, idx, event);
+
+	/*
+	 * Without TFA we must not use PMC3.
+	 */
+	if (!allow_tsx_force_abort && test_bit(3, c->idxmsk)) {
+		c = dyn_constraint(cpuc, c, idx);
+		c->idxmsk64 &= ~(1ULL << 3);
+		c->weight--;
+	}
+
+	return c;
+}
+
 /*
  * Broadwell:
  *
@@ -3262,7 +3324,7 @@ ssize_t intel_event_sysfs_show(char *pag
 	return x86_event_sysfs_show(page, config, event);
 }
 
-struct intel_shared_regs *allocate_shared_regs(int cpu)
+static struct intel_shared_regs *allocate_shared_regs(int cpu)
 {
 	struct intel_shared_regs *regs;
 	int i;
@@ -3294,23 +3356,24 @@ static struct intel_excl_cntrs *allocate
 	return c;
 }
 
-static int intel_pmu_cpu_prepare(int cpu)
-{
-	struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
 
+int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu)
+{
 	if (x86_pmu.extra_regs || x86_pmu.lbr_sel_map) {
 		cpuc->shared_regs = allocate_shared_regs(cpu);
 		if (!cpuc->shared_regs)
 			goto err;
 	}
 
-	if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
+	if (x86_pmu.flags & (PMU_FL_EXCL_CNTRS | PMU_FL_TFA)) {
 		size_t sz = X86_PMC_IDX_MAX * sizeof(struct event_constraint);
 
-		cpuc->constraint_list = kzalloc(sz, GFP_KERNEL);
+		cpuc->constraint_list = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
 		if (!cpuc->constraint_list)
 			goto err_shared_regs;
+	}
 
+	if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
 		cpuc->excl_cntrs = allocate_excl_cntrs(cpu);
 		if (!cpuc->excl_cntrs)
 			goto err_constraint_list;
@@ -3332,6 +3395,11 @@ err:
 	return -ENOMEM;
 }
 
+static int intel_pmu_cpu_prepare(int cpu)
+{
+	return intel_cpuc_prepare(&per_cpu(cpu_hw_events, cpu), cpu);
+}
+
 static void flip_smm_bit(void *data)
 {
 	unsigned long set = *(unsigned long *)data;
@@ -3403,9 +3471,8 @@ static void intel_pmu_cpu_starting(int c
 	}
 }
 
-static void free_excl_cntrs(int cpu)
+static void free_excl_cntrs(struct cpu_hw_events *cpuc)
 {
-	struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
 	struct intel_excl_cntrs *c;
 
 	c = cpuc->excl_cntrs;
@@ -3413,9 +3480,10 @@ static void free_excl_cntrs(int cpu)
 		if (c->core_id == -1 || --c->refcnt == 0)
 			kfree(c);
 		cpuc->excl_cntrs = NULL;
-		kfree(cpuc->constraint_list);
-		cpuc->constraint_list = NULL;
 	}
+
+	kfree(cpuc->constraint_list);
+	cpuc->constraint_list = NULL;
 }
 
 static void intel_pmu_cpu_dying(int cpu)
@@ -3423,9 +3491,8 @@ static void intel_pmu_cpu_dying(int cpu)
 	fini_debug_store_on_cpu(cpu);
 }
 
-static void intel_pmu_cpu_dead(int cpu)
+void intel_cpuc_finish(struct cpu_hw_events *cpuc)
 {
-	struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
 	struct intel_shared_regs *pc;
 
 	pc = cpuc->shared_regs;
@@ -3435,7 +3502,12 @@ static void intel_pmu_cpu_dead(int cpu)
 		cpuc->shared_regs = NULL;
 	}
 
-	free_excl_cntrs(cpu);
+	free_excl_cntrs(cpuc);
+}
+
+static void intel_pmu_cpu_dead(int cpu)
+{
+	intel_cpuc_finish(&per_cpu(cpu_hw_events, cpu));
 }
 
 static void intel_pmu_sched_task(struct perf_event_context *ctx,
@@ -3896,8 +3968,11 @@ static struct attribute *intel_pmu_caps_
        NULL
 };
 
+DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
+
 static struct attribute *intel_pmu_attrs[] = {
 	&dev_attr_freeze_on_smi.attr,
+	NULL, /* &dev_attr_allow_tsx_force_abort.attr.attr */
 	NULL,
 };
 
@@ -4353,6 +4428,15 @@ __init int intel_pmu_init(void)
 		x86_pmu.cpu_events = get_hsw_events_attrs();
 		intel_pmu_pebs_data_source_skl(
 			boot_cpu_data.x86_model == INTEL_FAM6_SKYLAKE_X);
+
+		if (boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
+			x86_pmu.flags |= PMU_FL_TFA;
+			x86_pmu.get_event_constraints = tfa_get_event_constraints;
+			x86_pmu.enable_all = intel_tfa_pmu_enable_all;
+			x86_pmu.commit_scheduling = intel_tfa_commit_scheduling;
+			intel_pmu_attrs[1] = &dev_attr_allow_tsx_force_abort.attr.attr;
+		}
+
 		pr_cont("Skylake events, ");
 		name = "skylake";
 		break;
@@ -4494,7 +4578,7 @@ static __init int fixup_ht_bug(void)
 	hardlockup_detector_perf_restart();
 
 	for_each_online_cpu(c)
-		free_excl_cntrs(c);
+		free_excl_cntrs(&per_cpu(cpu_hw_events, c));
 
 	cpus_read_unlock();
 	pr_info("PMU erratum BJ122, BV98, HSD29 workaround disabled, HT off\n");
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/events/perf_event.h linux-libre-4.14.106-gnu/arch/x86/events/perf_event.h
--- linux-libre-4.14.105-gnu/arch/x86/events/perf_event.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/events/perf_event.h	2019-03-13 17:03:24.000000000 -0400
@@ -239,6 +239,11 @@ struct cpu_hw_events {
 	int excl_thread_id; /* 0 or 1 */
 
 	/*
+	 * SKL TSX_FORCE_ABORT shadow
+	 */
+	u64				tfa_shadow;
+
+	/*
 	 * AMD specific bits
 	 */
 	struct amd_nb			*amd_nb;
@@ -672,6 +677,7 @@ do {									\
 #define PMU_FL_HAS_RSP_1	0x2 /* has 2 equivalent offcore_rsp regs   */
 #define PMU_FL_EXCL_CNTRS	0x4 /* has exclusive counter requirements  */
 #define PMU_FL_EXCL_ENABLED	0x8 /* exclusive counter active */
+#define PMU_FL_TFA		0x20 /* deal with TSX force abort */
 
 #define EVENT_VAR(_id)  event_attr_##_id
 #define EVENT_PTR(_id) &event_attr_##_id.attr.attr
@@ -880,7 +886,8 @@ struct event_constraint *
 x86_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
 			  struct perf_event *event);
 
-struct intel_shared_regs *allocate_shared_regs(int cpu);
+extern int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu);
+extern void intel_cpuc_finish(struct cpu_hw_events *cpuc);
 
 int intel_pmu_init(void);
 
@@ -1014,9 +1021,13 @@ static inline int intel_pmu_init(void)
 	return 0;
 }
 
-static inline struct intel_shared_regs *allocate_shared_regs(int cpu)
+static inline int intel_cpuc_prepare(struct cpu_hw_event *cpuc, int cpu)
+{
+	return 0;
+}
+
+static inline void intel_cpuc_finish(struct cpu_hw_event *cpuc)
 {
-	return NULL;
 }
 
 static inline int is_ht_workaround_enabled(void)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/include/asm/cpufeatures.h linux-libre-4.14.106-gnu/arch/x86/include/asm/cpufeatures.h
--- linux-libre-4.14.105-gnu/arch/x86/include/asm/cpufeatures.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/include/asm/cpufeatures.h	2019-03-13 17:03:24.000000000 -0400
@@ -339,6 +339,7 @@
 /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
 #define X86_FEATURE_AVX512_4VNNIW	(18*32+ 2) /* AVX-512 Neural Network Instructions */
 #define X86_FEATURE_AVX512_4FMAPS	(18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */
+#define X86_FEATURE_TSX_FORCE_ABORT	(18*32+13) /* "" TSX_FORCE_ABORT */
 #define X86_FEATURE_PCONFIG		(18*32+18) /* Intel PCONFIG */
 #define X86_FEATURE_SPEC_CTRL		(18*32+26) /* "" Speculation Control (IBRS + IBPB) */
 #define X86_FEATURE_INTEL_STIBP		(18*32+27) /* "" Single Thread Indirect Branch Predictors */
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/include/asm/msr-index.h linux-libre-4.14.106-gnu/arch/x86/include/asm/msr-index.h
--- linux-libre-4.14.105-gnu/arch/x86/include/asm/msr-index.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/include/asm/msr-index.h	2019-03-13 17:03:24.000000000 -0400
@@ -610,6 +610,12 @@
 
 #define MSR_IA32_TSC_DEADLINE		0x000006E0
 
+
+#define MSR_TSX_FORCE_ABORT		0x0000010F
+
+#define MSR_TFA_RTM_FORCE_ABORT_BIT	0
+#define MSR_TFA_RTM_FORCE_ABORT		BIT_ULL(MSR_TFA_RTM_FORCE_ABORT_BIT)
+
 /* P4/Xeon+ specific */
 #define MSR_IA32_MCG_EAX		0x00000180
 #define MSR_IA32_MCG_EBX		0x00000181
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/include/asm/page_64_types.h linux-libre-4.14.106-gnu/arch/x86/include/asm/page_64_types.h
--- linux-libre-4.14.105-gnu/arch/x86/include/asm/page_64_types.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/include/asm/page_64_types.h	2019-03-13 17:03:24.000000000 -0400
@@ -7,7 +7,11 @@
 #endif
 
 #ifdef CONFIG_KASAN
+#ifdef CONFIG_KASAN_EXTRA
+#define KASAN_STACK_ORDER 2
+#else
 #define KASAN_STACK_ORDER 1
+#endif
 #else
 #define KASAN_STACK_ORDER 0
 #endif
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/kernel/cpu/amd.c linux-libre-4.14.106-gnu/arch/x86/kernel/cpu/amd.c
--- linux-libre-4.14.105-gnu/arch/x86/kernel/cpu/amd.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/kernel/cpu/amd.c	2019-03-13 17:03:24.000000000 -0400
@@ -791,11 +791,9 @@ static void init_amd_bd(struct cpuinfo_x
 static void init_amd_zn(struct cpuinfo_x86 *c)
 {
 	set_cpu_cap(c, X86_FEATURE_ZEN);
-	/*
-	 * Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
-	 * all up to and including B1.
-	 */
-	if (c->x86_model <= 1 && c->x86_stepping <= 1)
+
+	/* Fix erratum 1076: CPB feature bit not being set in CPUID. */
+	if (!cpu_has(c, X86_FEATURE_CPB))
 		set_cpu_cap(c, X86_FEATURE_CPB);
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/kernel/cpu/microcode/amd.c linux-libre-4.14.106-gnu/arch/x86/kernel/cpu/microcode/amd.c
--- linux-libre-4.14.105-gnu/arch/x86/kernel/cpu/microcode/amd.c	2019-03-05 18:08:16.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/kernel/cpu/microcode/amd.c	2019-03-14 01:22:28.000000000 -0400
@@ -707,7 +707,7 @@ load_microcode_amd(bool save, u8 family,
 	if (!p) {
 		return ret;
 	} else {
-		if (boot_cpu_data.microcode == p->patch_id)
+		if (boot_cpu_data.microcode >= p->patch_id)
 			return ret;
 
 		ret = UCODE_NEW;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/x86/kernel/kexec-bzimage64.c linux-libre-4.14.106-gnu/arch/x86/kernel/kexec-bzimage64.c
--- linux-libre-4.14.105-gnu/arch/x86/kernel/kexec-bzimage64.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/x86/kernel/kexec-bzimage64.c	2019-03-13 17:03:24.000000000 -0400
@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *para
 	struct efi_info *current_ei = &boot_params.efi_info;
 	struct efi_info *ei = &params->efi_info;
 
+	if (!efi_enabled(EFI_RUNTIME_SERVICES))
+		return 0;
+
 	if (!current_ei->efi_memmap_size)
 		return 0;
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/xtensa/configs/smp_lx200_defconfig linux-libre-4.14.106-gnu/arch/xtensa/configs/smp_lx200_defconfig
--- linux-libre-4.14.105-gnu/arch/xtensa/configs/smp_lx200_defconfig	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/xtensa/configs/smp_lx200_defconfig	2019-03-13 17:03:24.000000000 -0400
@@ -34,6 +34,7 @@ CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is not set
 # CONFIG_PCI is not set
+CONFIG_VECTORS_OFFSET=0x00002000
 CONFIG_XTENSA_PLATFORM_XTFPGA=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="earlycon=uart8250,mmio32native,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug memmap=96M@0"
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/xtensa/kernel/head.S linux-libre-4.14.106-gnu/arch/xtensa/kernel/head.S
--- linux-libre-4.14.105-gnu/arch/xtensa/kernel/head.S	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/xtensa/kernel/head.S	2019-03-13 17:03:24.000000000 -0400
@@ -281,12 +281,13 @@ should_never_return:
 
 	movi	a2, cpu_start_ccount
 1:
+	memw
 	l32i	a3, a2, 0
 	beqi	a3, 0, 1b
 	movi	a3, 0
 	s32i	a3, a2, 0
-	memw
 1:
+	memw
 	l32i	a3, a2, 0
 	beqi	a3, 0, 1b
 	wsr	a3, ccount
@@ -323,11 +324,13 @@ ENTRY(cpu_restart)
 	rsr	a0, prid
 	neg	a2, a0
 	movi	a3, cpu_start_id
+	memw
 	s32i	a2, a3, 0
 #if XCHAL_DCACHE_IS_WRITEBACK
 	dhwbi	a3, 0
 #endif
 1:
+	memw
 	l32i	a2, a3, 0
 	dhi	a3, 0
 	bne	a2, a0, 1b
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/xtensa/kernel/process.c linux-libre-4.14.106-gnu/arch/xtensa/kernel/process.c
--- linux-libre-4.14.105-gnu/arch/xtensa/kernel/process.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/xtensa/kernel/process.c	2019-03-13 17:03:24.000000000 -0400
@@ -314,8 +314,8 @@ unsigned long get_wchan(struct task_stru
 
 		/* Stack layout: sp-4: ra, sp-3: sp' */
 
-		pc = MAKE_PC_FROM_RA(*(unsigned long*)sp - 4, sp);
-		sp = *(unsigned long *)sp - 3;
+		pc = MAKE_PC_FROM_RA(SPILL_SLOT(sp, 0), sp);
+		sp = SPILL_SLOT(sp, 1);
 	} while (count++ < 16);
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/xtensa/kernel/smp.c linux-libre-4.14.106-gnu/arch/xtensa/kernel/smp.c
--- linux-libre-4.14.105-gnu/arch/xtensa/kernel/smp.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/xtensa/kernel/smp.c	2019-03-13 17:03:24.000000000 -0400
@@ -83,7 +83,7 @@ void __init smp_prepare_cpus(unsigned in
 {
 	unsigned i;
 
-	for (i = 0; i < max_cpus; ++i)
+	for_each_possible_cpu(i)
 		set_cpu_present(i, true);
 }
 
@@ -96,6 +96,11 @@ void __init smp_init_cpus(void)
 	pr_info("%s: Core Count = %d\n", __func__, ncpus);
 	pr_info("%s: Core Id = %d\n", __func__, core_id);
 
+	if (ncpus > NR_CPUS) {
+		ncpus = NR_CPUS;
+		pr_info("%s: limiting core count by %d\n", __func__, ncpus);
+	}
+
 	for (i = 0; i < ncpus; ++i)
 		set_cpu_possible(i, true);
 }
@@ -195,9 +200,11 @@ static int boot_secondary(unsigned int c
 	int i;
 
 #ifdef CONFIG_HOTPLUG_CPU
-	cpu_start_id = cpu;
-	system_flush_invalidate_dcache_range(
-			(unsigned long)&cpu_start_id, sizeof(cpu_start_id));
+	WRITE_ONCE(cpu_start_id, cpu);
+	/* Pairs with the third memw in the cpu_restart */
+	mb();
+	system_flush_invalidate_dcache_range((unsigned long)&cpu_start_id,
+					     sizeof(cpu_start_id));
 #endif
 	smp_call_function_single(0, mx_cpu_start, (void *)cpu, 1);
 
@@ -206,18 +213,21 @@ static int boot_secondary(unsigned int c
 			ccount = get_ccount();
 		while (!ccount);
 
-		cpu_start_ccount = ccount;
+		WRITE_ONCE(cpu_start_ccount, ccount);
 
-		while (time_before(jiffies, timeout)) {
+		do {
+			/*
+			 * Pairs with the first two memws in the
+			 * .Lboot_secondary.
+			 */
 			mb();
-			if (!cpu_start_ccount)
-				break;
-		}
+			ccount = READ_ONCE(cpu_start_ccount);
+		} while (ccount && time_before(jiffies, timeout));
 
-		if (cpu_start_ccount) {
+		if (ccount) {
 			smp_call_function_single(0, mx_cpu_stop,
-					(void *)cpu, 1);
-			cpu_start_ccount = 0;
+						 (void *)cpu, 1);
+			WRITE_ONCE(cpu_start_ccount, 0);
 			return -EIO;
 		}
 	}
@@ -237,6 +247,7 @@ int __cpu_up(unsigned int cpu, struct ta
 	pr_debug("%s: Calling wakeup_secondary(cpu:%d, idle:%p, sp: %08lx)\n",
 			__func__, cpu, idle, start_info.stack);
 
+	init_completion(&cpu_running);
 	ret = boot_secondary(cpu, idle);
 	if (ret == 0) {
 		wait_for_completion_timeout(&cpu_running,
@@ -298,8 +309,10 @@ void __cpu_die(unsigned int cpu)
 	unsigned long timeout = jiffies + msecs_to_jiffies(1000);
 	while (time_before(jiffies, timeout)) {
 		system_invalidate_dcache_range((unsigned long)&cpu_start_id,
-				sizeof(cpu_start_id));
-		if (cpu_start_id == -cpu) {
+					       sizeof(cpu_start_id));
+		/* Pairs with the second memw in the cpu_restart */
+		mb();
+		if (READ_ONCE(cpu_start_id) == -cpu) {
 			platform_cpu_kill(cpu);
 			return;
 		}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/arch/xtensa/kernel/time.c linux-libre-4.14.106-gnu/arch/xtensa/kernel/time.c
--- linux-libre-4.14.105-gnu/arch/xtensa/kernel/time.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/arch/xtensa/kernel/time.c	2019-03-13 17:03:24.000000000 -0400
@@ -89,7 +89,7 @@ static int ccount_timer_shutdown(struct
 		container_of(evt, struct ccount_timer, evt);
 
 	if (timer->irq_enabled) {
-		disable_irq(evt->irq);
+		disable_irq_nosync(evt->irq);
 		timer->irq_enabled = 0;
 	}
 	return 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/base/dd.c linux-libre-4.14.106-gnu/drivers/base/dd.c
--- linux-libre-4.14.105-gnu/drivers/base/dd.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/base/dd.c	2019-03-13 17:03:24.000000000 -0400
@@ -850,9 +850,9 @@ static void __device_release_driver(stru
 			drv->remove(dev);
 
 		device_links_driver_cleanup(dev);
-		dma_deconfigure(dev);
 
 		devres_release_all(dev);
+		dma_deconfigure(dev);
 		dev->driver = NULL;
 		dev_set_drvdata(dev, NULL);
 		if (dev->pm_domain && dev->pm_domain->dismiss)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/char/applicom.c linux-libre-4.14.106-gnu/drivers/char/applicom.c
--- linux-libre-4.14.105-gnu/drivers/char/applicom.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/char/applicom.c	2019-03-13 17:03:24.000000000 -0400
@@ -32,6 +32,7 @@
 #include <linux/wait.h>
 #include <linux/init.h>
 #include <linux/fs.h>
+#include <linux/nospec.h>
 
 #include <asm/io.h>
 #include <linux/uaccess.h>
@@ -386,7 +387,11 @@ static ssize_t ac_write(struct file *fil
 	TicCard = st_loc.tic_des_from_pc;	/* tic number to send            */
 	IndexCard = NumCard - 1;
 
-	if((NumCard < 1) || (NumCard > MAX_BOARD) || !apbs[IndexCard].RamIO)
+	if (IndexCard >= MAX_BOARD)
+		return -EINVAL;
+	IndexCard = array_index_nospec(IndexCard, MAX_BOARD);
+
+	if (!apbs[IndexCard].RamIO)
 		return -EINVAL;
 
 #ifdef DEBUG
@@ -697,6 +702,7 @@ static long ac_ioctl(struct file *file,
 	unsigned char IndexCard;
 	void __iomem *pmem;
 	int ret = 0;
+	static int warncount = 10;
 	volatile unsigned char byte_reset_it;
 	struct st_ram_io *adgl;
 	void __user *argp = (void __user *)arg;
@@ -711,16 +717,12 @@ static long ac_ioctl(struct file *file,
 	mutex_lock(&ac_mutex);	
 	IndexCard = adgl->num_card-1;
 	 
-	if(cmd != 6 && ((IndexCard >= MAX_BOARD) || !apbs[IndexCard].RamIO)) {
-		static int warncount = 10;
-		if (warncount) {
-			printk( KERN_WARNING "APPLICOM driver IOCTL, bad board number %d\n",(int)IndexCard+1);
-			warncount--;
-		}
-		kfree(adgl);
-		mutex_unlock(&ac_mutex);
-		return -EINVAL;
-	}
+	if (cmd != 6 && IndexCard >= MAX_BOARD)
+		goto err;
+	IndexCard = array_index_nospec(IndexCard, MAX_BOARD);
+
+	if (cmd != 6 && !apbs[IndexCard].RamIO)
+		goto err;
 
 	switch (cmd) {
 		
@@ -838,5 +840,16 @@ static long ac_ioctl(struct file *file,
 	kfree(adgl);
 	mutex_unlock(&ac_mutex);
 	return 0;
+
+err:
+	if (warncount) {
+		pr_warn("APPLICOM driver IOCTL, bad board number %d\n",
+			(int)IndexCard + 1);
+		warncount--;
+	}
+	kfree(adgl);
+	mutex_unlock(&ac_mutex);
+	return -EINVAL;
+
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/cpufreq/cpufreq.c linux-libre-4.14.106-gnu/drivers/cpufreq/cpufreq.c
--- linux-libre-4.14.105-gnu/drivers/cpufreq/cpufreq.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/cpufreq/cpufreq.c	2019-03-13 17:03:24.000000000 -0400
@@ -554,13 +554,13 @@ EXPORT_SYMBOL_GPL(cpufreq_policy_transit
  *                          SYSFS INTERFACE                          *
  *********************************************************************/
 static ssize_t show_boost(struct kobject *kobj,
-				 struct attribute *attr, char *buf)
+			  struct kobj_attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
 }
 
-static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
-				  const char *buf, size_t count)
+static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr,
+			   const char *buf, size_t count)
 {
 	int ret, enable;
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/cpufreq/intel_pstate.c linux-libre-4.14.106-gnu/drivers/cpufreq/intel_pstate.c
--- linux-libre-4.14.105-gnu/drivers/cpufreq/intel_pstate.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/cpufreq/intel_pstate.c	2019-03-13 17:03:24.000000000 -0400
@@ -811,7 +811,7 @@ static void intel_pstate_update_policies
 /************************** sysfs begin ************************/
 #define show_one(file_name, object)					\
 	static ssize_t show_##file_name					\
-	(struct kobject *kobj, struct attribute *attr, char *buf)	\
+	(struct kobject *kobj, struct kobj_attribute *attr, char *buf)	\
 	{								\
 		return sprintf(buf, "%u\n", global.object);		\
 	}
@@ -820,7 +820,7 @@ static ssize_t intel_pstate_show_status(
 static int intel_pstate_update_status(const char *buf, size_t size);
 
 static ssize_t show_status(struct kobject *kobj,
-			   struct attribute *attr, char *buf)
+			   struct kobj_attribute *attr, char *buf)
 {
 	ssize_t ret;
 
@@ -831,7 +831,7 @@ static ssize_t show_status(struct kobjec
 	return ret;
 }
 
-static ssize_t store_status(struct kobject *a, struct attribute *b,
+static ssize_t store_status(struct kobject *a, struct kobj_attribute *b,
 			    const char *buf, size_t count)
 {
 	char *p = memchr(buf, '\n', count);
@@ -845,7 +845,7 @@ static ssize_t store_status(struct kobje
 }
 
 static ssize_t show_turbo_pct(struct kobject *kobj,
-				struct attribute *attr, char *buf)
+				struct kobj_attribute *attr, char *buf)
 {
 	struct cpudata *cpu;
 	int total, no_turbo, turbo_pct;
@@ -871,7 +871,7 @@ static ssize_t show_turbo_pct(struct kob
 }
 
 static ssize_t show_num_pstates(struct kobject *kobj,
-				struct attribute *attr, char *buf)
+				struct kobj_attribute *attr, char *buf)
 {
 	struct cpudata *cpu;
 	int total;
@@ -892,7 +892,7 @@ static ssize_t show_num_pstates(struct k
 }
 
 static ssize_t show_no_turbo(struct kobject *kobj,
-			     struct attribute *attr, char *buf)
+			     struct kobj_attribute *attr, char *buf)
 {
 	ssize_t ret;
 
@@ -914,7 +914,7 @@ static ssize_t show_no_turbo(struct kobj
 	return ret;
 }
 
-static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
+static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
 			      const char *buf, size_t count)
 {
 	unsigned int input;
@@ -961,7 +961,7 @@ static ssize_t store_no_turbo(struct kob
 	return count;
 }
 
-static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
+static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
 				  const char *buf, size_t count)
 {
 	unsigned int input;
@@ -991,7 +991,7 @@ static ssize_t store_max_perf_pct(struct
 	return count;
 }
 
-static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b,
+static ssize_t store_min_perf_pct(struct kobject *a, struct kobj_attribute *b,
 				  const char *buf, size_t count)
 {
 	unsigned int input;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/dma/at_xdmac.c linux-libre-4.14.106-gnu/drivers/dma/at_xdmac.c
--- linux-libre-4.14.105-gnu/drivers/dma/at_xdmac.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/dma/at_xdmac.c	2019-03-13 17:03:24.000000000 -0400
@@ -203,6 +203,7 @@ struct at_xdmac_chan {
 	u32				save_cim;
 	u32				save_cnda;
 	u32				save_cndc;
+	u32				irq_status;
 	unsigned long			status;
 	struct tasklet_struct		tasklet;
 	struct dma_slave_config		sconfig;
@@ -1580,8 +1581,8 @@ static void at_xdmac_tasklet(unsigned lo
 	struct at_xdmac_desc	*desc;
 	u32			error_mask;
 
-	dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08lx\n",
-		 __func__, atchan->status);
+	dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
+		__func__, atchan->irq_status);
 
 	error_mask = AT_XDMAC_CIS_RBEIS
 		     | AT_XDMAC_CIS_WBEIS
@@ -1589,15 +1590,15 @@ static void at_xdmac_tasklet(unsigned lo
 
 	if (at_xdmac_chan_is_cyclic(atchan)) {
 		at_xdmac_handle_cyclic(atchan);
-	} else if ((atchan->status & AT_XDMAC_CIS_LIS)
-		   || (atchan->status & error_mask)) {
+	} else if ((atchan->irq_status & AT_XDMAC_CIS_LIS)
+		   || (atchan->irq_status & error_mask)) {
 		struct dma_async_tx_descriptor  *txd;
 
-		if (atchan->status & AT_XDMAC_CIS_RBEIS)
+		if (atchan->irq_status & AT_XDMAC_CIS_RBEIS)
 			dev_err(chan2dev(&atchan->chan), "read bus error!!!");
-		if (atchan->status & AT_XDMAC_CIS_WBEIS)
+		if (atchan->irq_status & AT_XDMAC_CIS_WBEIS)
 			dev_err(chan2dev(&atchan->chan), "write bus error!!!");
-		if (atchan->status & AT_XDMAC_CIS_ROIS)
+		if (atchan->irq_status & AT_XDMAC_CIS_ROIS)
 			dev_err(chan2dev(&atchan->chan), "request overflow error!!!");
 
 		spin_lock_bh(&atchan->lock);
@@ -1652,7 +1653,7 @@ static irqreturn_t at_xdmac_interrupt(in
 			atchan = &atxdmac->chan[i];
 			chan_imr = at_xdmac_chan_read(atchan, AT_XDMAC_CIM);
 			chan_status = at_xdmac_chan_read(atchan, AT_XDMAC_CIS);
-			atchan->status = chan_status & chan_imr;
+			atchan->irq_status = chan_status & chan_imr;
 			dev_vdbg(atxdmac->dma.dev,
 				 "%s: chan%d: imr=0x%x, status=0x%x\n",
 				 __func__, i, chan_imr, chan_status);
@@ -1666,7 +1667,7 @@ static irqreturn_t at_xdmac_interrupt(in
 				 at_xdmac_chan_read(atchan, AT_XDMAC_CDA),
 				 at_xdmac_chan_read(atchan, AT_XDMAC_CUBC));
 
-			if (atchan->status & (AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS))
+			if (atchan->irq_status & (AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS))
 				at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask);
 
 			tasklet_schedule(&atchan->tasklet);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/dma/dmatest.c linux-libre-4.14.106-gnu/drivers/dma/dmatest.c
--- linux-libre-4.14.105-gnu/drivers/dma/dmatest.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/dma/dmatest.c	2019-03-13 17:03:24.000000000 -0400
@@ -626,11 +626,9 @@ static int dmatest_func(void *data)
 			srcs[i] = um->addr[i] + src_off;
 			ret = dma_mapping_error(dev->dev, um->addr[i]);
 			if (ret) {
-				dmaengine_unmap_put(um);
 				result("src mapping error", total_tests,
 				       src_off, dst_off, len, ret);
-				failed_tests++;
-				continue;
+				goto error_unmap_continue;
 			}
 			um->to_cnt++;
 		}
@@ -645,11 +643,9 @@ static int dmatest_func(void *data)
 					       DMA_BIDIRECTIONAL);
 			ret = dma_mapping_error(dev->dev, dsts[i]);
 			if (ret) {
-				dmaengine_unmap_put(um);
 				result("dst mapping error", total_tests,
 				       src_off, dst_off, len, ret);
-				failed_tests++;
-				continue;
+				goto error_unmap_continue;
 			}
 			um->bidi_cnt++;
 		}
@@ -679,12 +675,10 @@ static int dmatest_func(void *data)
 		}
 
 		if (!tx) {
-			dmaengine_unmap_put(um);
 			result("prep error", total_tests, src_off,
 			       dst_off, len, ret);
 			msleep(100);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 
 		done->done = false;
@@ -693,12 +687,10 @@ static int dmatest_func(void *data)
 		cookie = tx->tx_submit(tx);
 
 		if (dma_submit_error(cookie)) {
-			dmaengine_unmap_put(um);
 			result("submit error", total_tests, src_off,
 			       dst_off, len, ret);
 			msleep(100);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 		dma_async_issue_pending(chan);
 
@@ -711,16 +703,14 @@ static int dmatest_func(void *data)
 			dmaengine_unmap_put(um);
 			result("test timed out", total_tests, src_off, dst_off,
 			       len, 0);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		} else if (status != DMA_COMPLETE) {
 			dmaengine_unmap_put(um);
 			result(status == DMA_ERROR ?
 			       "completion error status" :
 			       "completion busy status", total_tests, src_off,
 			       dst_off, len, ret);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 
 		dmaengine_unmap_put(um);
@@ -765,6 +755,12 @@ static int dmatest_func(void *data)
 			verbose_result("test passed", total_tests, src_off,
 				       dst_off, len, 0);
 		}
+
+		continue;
+
+error_unmap_continue:
+		dmaengine_unmap_put(um);
+		failed_tests++;
 	}
 	ktime = ktime_sub(ktime_get(), ktime);
 	ktime = ktime_sub(ktime, comparetime);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/firmware/iscsi_ibft.c linux-libre-4.14.106-gnu/drivers/firmware/iscsi_ibft.c
--- linux-libre-4.14.105-gnu/drivers/firmware/iscsi_ibft.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/firmware/iscsi_ibft.c	2019-03-13 17:03:24.000000000 -0400
@@ -542,6 +542,7 @@ static umode_t __init ibft_check_tgt_for
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 	case ISCSI_BOOT_TGT_CHAP_TYPE:
 		rc = S_IRUGO;
+		break;
 	case ISCSI_BOOT_TGT_NAME:
 		if (tgt->tgt_name_len)
 			rc = S_IRUGO;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/gpio/gpio-vf610.c linux-libre-4.14.106-gnu/drivers/gpio/gpio-vf610.c
--- linux-libre-4.14.105-gnu/drivers/gpio/gpio-vf610.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/gpio/gpio-vf610.c	2019-03-13 17:03:24.000000000 -0400
@@ -261,6 +261,7 @@ static int vf610_gpio_probe(struct platf
 	struct vf610_gpio_port *port;
 	struct resource *iores;
 	struct gpio_chip *gc;
+	int i;
 	int ret;
 
 	port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL);
@@ -300,6 +301,10 @@ static int vf610_gpio_probe(struct platf
 	if (ret < 0)
 		return ret;
 
+	/* Mask all GPIO interrupts */
+	for (i = 0; i < gc->ngpio; i++)
+		vf610_gpio_writel(0, port->base + PORT_PCR(i));
+
 	/* Clear the interrupt status register for all GPIO's */
 	vf610_gpio_writel(~0, port->base + PORT_ISFR);
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c linux-libre-4.14.106-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c
--- linux-libre-4.14.105-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c	2019-03-13 17:03:24.000000000 -0400
@@ -371,6 +371,7 @@ static int sun4i_tcon_init_clocks(struct
 		dev_err(dev, "Couldn't get the TCON channel 0 clock\n");
 		return PTR_ERR(tcon->sclk0);
 	}
+	clk_prepare_enable(tcon->sclk0);
 
 	if (tcon->quirks->has_channel_1) {
 		tcon->sclk1 = devm_clk_get(dev, "tcon-ch1");
@@ -385,6 +386,7 @@ static int sun4i_tcon_init_clocks(struct
 
 static void sun4i_tcon_free_clocks(struct sun4i_tcon *tcon)
 {
+	clk_disable_unprepare(tcon->sclk0);
 	clk_disable_unprepare(tcon->clk);
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/i2c/busses/i2c-omap.c linux-libre-4.14.106-gnu/drivers/i2c/busses/i2c-omap.c
--- linux-libre-4.14.105-gnu/drivers/i2c/busses/i2c-omap.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/i2c/busses/i2c-omap.c	2019-03-13 17:03:24.000000000 -0400
@@ -1477,8 +1477,7 @@ static int omap_i2c_remove(struct platfo
 	return 0;
 }
 
-#ifdef CONFIG_PM
-static int omap_i2c_runtime_suspend(struct device *dev)
+static int __maybe_unused omap_i2c_runtime_suspend(struct device *dev)
 {
 	struct omap_i2c_dev *omap = dev_get_drvdata(dev);
 
@@ -1504,7 +1503,7 @@ static int omap_i2c_runtime_suspend(stru
 	return 0;
 }
 
-static int omap_i2c_runtime_resume(struct device *dev)
+static int __maybe_unused omap_i2c_runtime_resume(struct device *dev)
 {
 	struct omap_i2c_dev *omap = dev_get_drvdata(dev);
 
@@ -1519,20 +1518,18 @@ static int omap_i2c_runtime_resume(struc
 }
 
 static const struct dev_pm_ops omap_i2c_pm_ops = {
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+				      pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
 			   omap_i2c_runtime_resume, NULL)
 };
-#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
-#else
-#define OMAP_I2C_PM_OPS NULL
-#endif /* CONFIG_PM */
 
 static struct platform_driver omap_i2c_driver = {
 	.probe		= omap_i2c_probe,
 	.remove		= omap_i2c_remove,
 	.driver		= {
 		.name	= "omap_i2c",
-		.pm	= OMAP_I2C_PM_OPS,
+		.pm	= &omap_i2c_pm_ops,
 		.of_match_table = of_match_ptr(omap_i2c_of_match),
 	},
 };
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/infiniband/hw/hfi1/ud.c linux-libre-4.14.106-gnu/drivers/infiniband/hw/hfi1/ud.c
--- linux-libre-4.14.105-gnu/drivers/infiniband/hw/hfi1/ud.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/infiniband/hw/hfi1/ud.c	2019-03-13 17:03:24.000000000 -0400
@@ -954,7 +954,6 @@ void hfi1_ud_rcv(struct hfi1_packet *pac
 	    opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
 		wc.ex.imm_data = ohdr->u.ud.imm_data;
 		wc.wc_flags = IB_WC_WITH_IMM;
-		tlen -= sizeof(u32);
 	} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
 		wc.ex.imm_data = 0;
 		wc.wc_flags = 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/infiniband/hw/qib/qib_ud.c linux-libre-4.14.106-gnu/drivers/infiniband/hw/qib/qib_ud.c
--- linux-libre-4.14.105-gnu/drivers/infiniband/hw/qib/qib_ud.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/infiniband/hw/qib/qib_ud.c	2019-03-13 17:03:24.000000000 -0400
@@ -515,7 +515,6 @@ void qib_ud_rcv(struct qib_ibport *ibp,
 	    opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
 		wc.ex.imm_data = ohdr->u.ud.imm_data;
 		wc.wc_flags = IB_WC_WITH_IMM;
-		tlen -= sizeof(u32);
 	} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
 		wc.ex.imm_data = 0;
 		wc.wc_flags = 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/input/mouse/elan_i2c_core.c linux-libre-4.14.106-gnu/drivers/input/mouse/elan_i2c_core.c
--- linux-libre-4.14.105-gnu/drivers/input/mouse/elan_i2c_core.c	2019-03-05 18:33:26.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/input/mouse/elan_i2c_core.c	2019-03-14 01:43:05.000000000 -0400
@@ -1252,6 +1252,7 @@ static const struct acpi_device_id elan_
 	{ "ELAN0000", 0 },
 	{ "ELAN0100", 0 },
 	{ "ELAN0600", 0 },
+	{ "ELAN0601", 0 },
 	{ "ELAN0602", 0 },
 	{ "ELAN0605", 0 },
 	{ "ELAN0608", 0 },
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/input/tablet/wacom_serial4.c linux-libre-4.14.106-gnu/drivers/input/tablet/wacom_serial4.c
--- linux-libre-4.14.105-gnu/drivers/input/tablet/wacom_serial4.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/input/tablet/wacom_serial4.c	2019-03-13 17:03:24.000000000 -0400
@@ -187,6 +187,7 @@ enum {
 	MODEL_DIGITIZER_II	= 0x5544, /* UD */
 	MODEL_GRAPHIRE		= 0x4554, /* ET */
 	MODEL_PENPARTNER	= 0x4354, /* CT */
+	MODEL_ARTPAD_II		= 0x4B54, /* KT */
 };
 
 static void wacom_handle_model_response(struct wacom *wacom)
@@ -245,6 +246,7 @@ static void wacom_handle_model_response(
 		wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
 		break;
 
+	case MODEL_ARTPAD_II:
 	case MODEL_DIGITIZER_II:
 		wacom->dev->name = "Wacom Digitizer II";
 		wacom->dev->id.version = MODEL_DIGITIZER_II;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/iommu/amd_iommu.c linux-libre-4.14.106-gnu/drivers/iommu/amd_iommu.c
--- linux-libre-4.14.105-gnu/drivers/iommu/amd_iommu.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/iommu/amd_iommu.c	2019-03-13 17:03:24.000000000 -0400
@@ -1919,6 +1919,7 @@ static void do_attach(struct iommu_dev_d
 
 static void do_detach(struct iommu_dev_data *dev_data)
 {
+	struct protection_domain *domain = dev_data->domain;
 	struct amd_iommu *iommu;
 	u16 alias;
 
@@ -1934,10 +1935,6 @@ static void do_detach(struct iommu_dev_d
 	iommu = amd_iommu_rlookup_table[dev_data->devid];
 	alias = dev_data->alias;
 
-	/* decrease reference counters */
-	dev_data->domain->dev_iommu[iommu->index] -= 1;
-	dev_data->domain->dev_cnt                 -= 1;
-
 	/* Update data structures */
 	dev_data->domain = NULL;
 	list_del(&dev_data->list);
@@ -1947,6 +1944,16 @@ static void do_detach(struct iommu_dev_d
 
 	/* Flush the DTE entry */
 	device_flush_dte(dev_data);
+
+	/* Flush IOTLB */
+	domain_flush_tlb_pde(domain);
+
+	/* Wait for the flushes to finish */
+	domain_flush_complete(domain);
+
+	/* decrease reference counters - needs to happen after the flushes */
+	domain->dev_iommu[iommu->index] -= 1;
+	domain->dev_cnt                 -= 1;
 }
 
 /*
@@ -2560,13 +2567,13 @@ out_unmap:
 			bus_addr  = address + s->dma_address + (j << PAGE_SHIFT);
 			iommu_unmap_page(domain, bus_addr, PAGE_SIZE);
 
-			if (--mapped_pages)
+			if (--mapped_pages == 0)
 				goto out_free_iova;
 		}
 	}
 
 out_free_iova:
-	free_iova_fast(&dma_dom->iovad, address, npages);
+	free_iova_fast(&dma_dom->iovad, address >> PAGE_SHIFT, npages);
 
 out_err:
 	return 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/irqchip/irq-mmp.c linux-libre-4.14.106-gnu/drivers/irqchip/irq-mmp.c
--- linux-libre-4.14.105-gnu/drivers/irqchip/irq-mmp.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/irqchip/irq-mmp.c	2019-03-13 17:03:24.000000000 -0400
@@ -34,6 +34,9 @@
 #define SEL_INT_PENDING		(1 << 6)
 #define SEL_INT_NUM_MASK	0x3f
 
+#define MMP2_ICU_INT_ROUTE_PJ4_IRQ	(1 << 5)
+#define MMP2_ICU_INT_ROUTE_PJ4_FIQ	(1 << 6)
+
 struct icu_chip_data {
 	int			nr_irqs;
 	unsigned int		virq_base;
@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_co
 static const struct mmp_intc_conf mmp2_conf = {
 	.conf_enable	= 0x20,
 	.conf_disable	= 0x0,
-	.conf_mask	= 0x7f,
+	.conf_mask	= MMP2_ICU_INT_ROUTE_PJ4_IRQ |
+			  MMP2_ICU_INT_ROUTE_PJ4_FIQ,
 };
 
 static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/media/usb/uvc/uvc_driver.c linux-libre-4.14.106-gnu/drivers/media/usb/uvc/uvc_driver.c
--- linux-libre-4.14.105-gnu/drivers/media/usb/uvc/uvc_driver.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/media/usb/uvc/uvc_driver.c	2019-03-13 17:03:24.000000000 -0400
@@ -1054,11 +1054,19 @@ static int uvc_parse_standard_control(st
 			return -EINVAL;
 		}
 
-		/* Make sure the terminal type MSB is not null, otherwise it
-		 * could be confused with a unit.
+		/*
+		 * Reject invalid terminal types that would cause issues:
+		 *
+		 * - The high byte must be non-zero, otherwise it would be
+		 *   confused with a unit.
+		 *
+		 * - Bit 15 must be 0, as we use it internally as a terminal
+		 *   direction flag.
+		 *
+		 * Other unknown types are accepted.
 		 */
 		type = get_unaligned_le16(&buffer[4]);
-		if ((type & 0xff00) == 0) {
+		if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
 			uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
 				"interface %d INPUT_TERMINAL %d has invalid "
 				"type 0x%04x, skipping\n", udev->devnum,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/dsa/mv88e6xxx/chip.c linux-libre-4.14.106-gnu/drivers/net/dsa/mv88e6xxx/chip.c
--- linux-libre-4.14.105-gnu/drivers/net/dsa/mv88e6xxx/chip.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/dsa/mv88e6xxx/chip.c	2019-03-13 17:03:24.000000000 -0400
@@ -639,7 +639,7 @@ static uint64_t _mv88e6xxx_get_ethtool_s
 	default:
 		return UINT64_MAX;
 	}
-	value = (((u64)high) << 16) | low;
+	value = (((u64)high) << 32) | low;
 	return value;
 }
 
@@ -2569,7 +2569,7 @@ static const struct mv88e6xxx_ops mv88e6
 	.port_pause_limit = mv88e6097_port_pause_limit,
 	.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
 	.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
-	.stats_snapshot = mv88e6320_g1_stats_snapshot,
+	.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
 	.stats_get_sset_count = mv88e6095_stats_get_sset_count,
 	.stats_get_strings = mv88e6095_stats_get_strings,
 	.stats_get_stats = mv88e6095_stats_get_stats,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/dsa/mv88e6xxx/port.c linux-libre-4.14.106-gnu/drivers/net/dsa/mv88e6xxx/port.c
--- linux-libre-4.14.105-gnu/drivers/net/dsa/mv88e6xxx/port.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/dsa/mv88e6xxx/port.c	2019-03-13 17:03:24.000000000 -0400
@@ -165,7 +165,7 @@ int mv88e6xxx_port_set_duplex(struct mv8
 		/* normal duplex detection */
 		break;
 	default:
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	}
 
 	err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_MAC_CTL, reg);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/altera/altera_msgdma.c linux-libre-4.14.106-gnu/drivers/net/ethernet/altera/altera_msgdma.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/altera/altera_msgdma.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/altera/altera_msgdma.c	2019-03-13 17:03:24.000000000 -0400
@@ -145,7 +145,8 @@ u32 msgdma_tx_completions(struct altera_
 			& 0xffff;
 
 	if (inuse) { /* Tx FIFO is not empty */
-		ready = priv->tx_prod - priv->tx_cons - inuse - 1;
+		ready = max_t(int,
+			      priv->tx_prod - priv->tx_cons - inuse - 1, 0);
 	} else {
 		/* Check for buffered last packet */
 		status = csrrd32(priv->tx_dma_csr, msgdma_csroffs(status));
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c linux-libre-4.14.106-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2019-03-13 17:03:24.000000000 -0400
@@ -447,6 +447,12 @@ normal_tx:
 	}
 
 	length >>= 9;
+	if (unlikely(length >= ARRAY_SIZE(bnxt_lhint_arr))) {
+		dev_warn_ratelimited(&pdev->dev, "Dropped oversize %d bytes TX packet.\n",
+				     skb->len);
+		i = 0;
+		goto tx_dma_error;
+	}
 	flags |= bnxt_lhint_arr[length];
 	txbd->tx_bd_len_flags_type = cpu_to_le32(flags);
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns/hns_enet.c linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns/hns_enet.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns/hns_enet.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns/hns_enet.c	2019-03-13 17:03:24.000000000 -0400
@@ -2532,6 +2532,8 @@ static int hns_nic_dev_probe(struct plat
 out_notify_fail:
 	(void)cancel_work_sync(&priv->service_task);
 out_read_prop_fail:
+	/* safe for ACPI FW */
+	of_node_put(to_of_node(priv->fwnode));
 	free_netdev(ndev);
 	return ret;
 }
@@ -2561,6 +2563,9 @@ static int hns_nic_dev_remove(struct pla
 	set_bit(NIC_STATE_REMOVING, &priv->state);
 	(void)cancel_work_sync(&priv->service_task);
 
+	/* safe for ACPI FW */
+	of_node_put(to_of_node(priv->fwnode));
+
 	free_netdev(ndev);
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c	2019-03-13 17:03:24.000000000 -0400
@@ -1154,16 +1154,18 @@ static int hns_get_regs_len(struct net_d
  */
 static int hns_nic_nway_reset(struct net_device *netdev)
 {
-	int ret = 0;
 	struct phy_device *phy = netdev->phydev;
 
-	if (netif_running(netdev)) {
-		/* if autoneg is disabled, don't restart auto-negotiation */
-		if (phy && phy->autoneg == AUTONEG_ENABLE)
-			ret = genphy_restart_aneg(phy);
-	}
+	if (!netif_running(netdev))
+		return 0;
 
-	return ret;
+	if (!phy)
+		return -EOPNOTSUPP;
+
+	if (phy->autoneg != AUTONEG_ENABLE)
+		return -EINVAL;
+
+	return genphy_restart_aneg(phy);
 }
 
 static u32
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c	2019-03-13 17:03:24.000000000 -0400
@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus
 		}
 
 		hns_mdio_cmd_write(mdio_dev, is_c45,
-				   MDIO_C45_WRITE_ADDR, phy_id, devad);
+				   MDIO_C45_READ, phy_id, devad);
 	}
 
 	/* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/marvell/sky2.c linux-libre-4.14.106-gnu/drivers/net/ethernet/marvell/sky2.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/marvell/sky2.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/marvell/sky2.c	2019-03-13 17:03:24.000000000 -0400
@@ -46,6 +46,7 @@
 #include <linux/mii.h>
 #include <linux/of_device.h>
 #include <linux/of_net.h>
+#include <linux/dmi.h>
 
 #include <asm/irq.h>
 
@@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128
 module_param(copybreak, int, 0);
 MODULE_PARM_DESC(copybreak, "Receive copy threshold");
 
-static int disable_msi = 0;
+static int disable_msi = -1;
 module_param(disable_msi, int, 0);
 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
 
@@ -4931,6 +4932,24 @@ static const char *sky2_name(u8 chipid,
 	return buf;
 }
 
+static const struct dmi_system_id msi_blacklist[] = {
+	{
+		.ident = "Dell Inspiron 1545",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"),
+		},
+	},
+	{
+		.ident = "Gateway P-79",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Gateway"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "P-79"),
+		},
+	},
+	{}
+};
+
 static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct net_device *dev, *dev1;
@@ -5042,6 +5061,9 @@ static int sky2_probe(struct pci_dev *pd
 		goto err_out_free_pci;
 	}
 
+	if (disable_msi == -1)
+		disable_msi = !!dmi_check_system(msi_blacklist);
+
 	if (!disable_msi && pci_enable_msi(pdev) == 0) {
 		err = sky2_test_msi(hw);
 		if (err) {
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_dev.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_dev.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_dev.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_dev.c	2019-03-13 17:03:24.000000000 -0400
@@ -435,19 +435,19 @@ static void qed_init_qm_pq(struct qed_hw
 
 /* get pq index according to PQ_FLAGS */
 static u16 *qed_init_qm_get_idx_from_flags(struct qed_hwfn *p_hwfn,
-					   u32 pq_flags)
+					   unsigned long pq_flags)
 {
 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
 
 	/* Can't have multiple flags set here */
-	if (bitmap_weight((unsigned long *)&pq_flags,
+	if (bitmap_weight(&pq_flags,
 			  sizeof(pq_flags) * BITS_PER_BYTE) > 1) {
-		DP_ERR(p_hwfn, "requested multiple pq flags 0x%x\n", pq_flags);
+		DP_ERR(p_hwfn, "requested multiple pq flags 0x%lx\n", pq_flags);
 		goto err;
 	}
 
 	if (!(qed_get_pq_flags(p_hwfn) & pq_flags)) {
-		DP_ERR(p_hwfn, "pq flag 0x%x is not set\n", pq_flags);
+		DP_ERR(p_hwfn, "pq flag 0x%lx is not set\n", pq_flags);
 		goto err;
 	}
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c	2019-03-13 17:03:24.000000000 -0400
@@ -607,6 +607,10 @@ qed_sp_update_accept_mode(struct qed_hwf
 			  (!!(accept_filter & QED_ACCEPT_MCAST_MATCHED) &&
 			   !!(accept_filter & QED_ACCEPT_MCAST_UNMATCHED)));
 
+		SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL,
+			  (!!(accept_filter & QED_ACCEPT_UCAST_MATCHED) &&
+			   !!(accept_filter & QED_ACCEPT_UCAST_UNMATCHED)));
+
 		SET_FIELD(state, ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL,
 			  !!(accept_filter & QED_ACCEPT_BCAST));
 
@@ -743,6 +747,11 @@ int qed_sp_vport_update(struct qed_hwfn
 		return rc;
 	}
 
+	if (p_params->update_ctl_frame_check) {
+		p_cmn->ctl_frame_mac_check_en = p_params->mac_chk_en;
+		p_cmn->ctl_frame_ethtype_check_en = p_params->ethtype_chk_en;
+	}
+
 	/* Update mcast bins for VFs, PF doesn't use this functionality */
 	qed_sp_update_mcast_bin(p_hwfn, p_ramrod, p_params);
 
@@ -2161,7 +2170,7 @@ static int qed_fill_eth_dev_info(struct
 			u16 num_queues = 0;
 
 			/* Since the feature controls only queue-zones,
-			 * make sure we have the contexts [rx, tx, xdp] to
+			 * make sure we have the contexts [rx, xdp, tcs] to
 			 * match.
 			 */
 			for_each_hwfn(cdev, i) {
@@ -2171,7 +2180,8 @@ static int qed_fill_eth_dev_info(struct
 				u16 cids;
 
 				cids = hwfn->pf_params.eth_pf_params.num_cons;
-				num_queues += min_t(u16, l2_queues, cids / 3);
+				cids /= (2 + info->num_tc);
+				num_queues += min_t(u16, l2_queues, cids);
 			}
 
 			/* queues might theoretically be >256, but interrupts'
@@ -2640,7 +2650,8 @@ static int qed_configure_filter_rx_mode(
 	if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
 		accept_flags.rx_accept_filter |= QED_ACCEPT_UCAST_UNMATCHED |
 						 QED_ACCEPT_MCAST_UNMATCHED;
-		accept_flags.tx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
+		accept_flags.tx_accept_filter |= QED_ACCEPT_UCAST_UNMATCHED |
+						 QED_ACCEPT_MCAST_UNMATCHED;
 	} else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC) {
 		accept_flags.rx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
 		accept_flags.tx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.h linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.h
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.h	2019-03-13 17:03:24.000000000 -0400
@@ -218,6 +218,9 @@ struct qed_sp_vport_update_params {
 	struct qed_rss_params		*rss_params;
 	struct qed_filter_accept_flags	accept_flags;
 	struct qed_sge_tpa_params	*sge_tpa_params;
+	u8				update_ctl_frame_check;
+	u8				mac_chk_en;
+	u8				ethtype_chk_en;
 };
 
 int qed_sp_vport_update(struct qed_hwfn *p_hwfn,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_ll2.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_ll2.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_ll2.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_ll2.c	2019-03-13 17:03:24.000000000 -0400
@@ -2299,19 +2299,24 @@ static int qed_ll2_start_xmit(struct qed
 {
 	struct qed_ll2_tx_pkt_info pkt;
 	const skb_frag_t *frag;
+	u8 flags = 0, nr_frags;
 	int rc = -EINVAL, i;
 	dma_addr_t mapping;
 	u16 vlan = 0;
-	u8 flags = 0;
 
 	if (unlikely(skb->ip_summed != CHECKSUM_NONE)) {
 		DP_INFO(cdev, "Cannot transmit a checksumed packet\n");
 		return -EINVAL;
 	}
 
-	if (1 + skb_shinfo(skb)->nr_frags > CORE_LL2_TX_MAX_BDS_PER_PACKET) {
+	/* Cache number of fragments from SKB since SKB may be freed by
+	 * the completion routine after calling qed_ll2_prepare_tx_packet()
+	 */
+	nr_frags = skb_shinfo(skb)->nr_frags;
+
+	if (1 + nr_frags > CORE_LL2_TX_MAX_BDS_PER_PACKET) {
 		DP_ERR(cdev, "Cannot transmit a packet with %d fragments\n",
-		       1 + skb_shinfo(skb)->nr_frags);
+		       1 + nr_frags);
 		return -EINVAL;
 	}
 
@@ -2333,7 +2338,7 @@ static int qed_ll2_start_xmit(struct qed
 	}
 
 	memset(&pkt, 0, sizeof(pkt));
-	pkt.num_of_bds = 1 + skb_shinfo(skb)->nr_frags;
+	pkt.num_of_bds = 1 + nr_frags;
 	pkt.vlan = vlan;
 	pkt.bd_flags = flags;
 	pkt.tx_dest = QED_LL2_TX_DEST_NW;
@@ -2341,12 +2346,17 @@ static int qed_ll2_start_xmit(struct qed
 	pkt.first_frag_len = skb->len;
 	pkt.cookie = skb;
 
+	/* qed_ll2_prepare_tx_packet() may actually send the packet if
+	 * there are no fragments in the skb and subsequently the completion
+	 * routine may run and free the SKB, so no dereferencing the SKB
+	 * beyond this point unless skb has any fragments.
+	 */
 	rc = qed_ll2_prepare_tx_packet(&cdev->hwfns[0], cdev->ll2->handle,
 				       &pkt, 1);
 	if (rc)
 		goto err;
 
-	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+	for (i = 0; i < nr_frags; i++) {
 		frag = &skb_shinfo(skb)->frags[i];
 
 		mapping = skb_frag_dma_map(&cdev->pdev->dev, frag, 0,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_sp.h linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_sp.h
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_sp.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_sp.h	2019-03-13 17:03:24.000000000 -0400
@@ -380,6 +380,7 @@ void qed_consq_setup(struct qed_hwfn *p_
  * @param p_hwfn
  */
 void qed_consq_free(struct qed_hwfn *p_hwfn);
+int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
 
 /**
  * @file
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_spq.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_spq.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_spq.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_spq.c	2019-03-13 17:03:24.000000000 -0400
@@ -404,6 +404,11 @@ int qed_eq_completion(struct qed_hwfn *p
 
 	qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
 
+	/* Attempt to post pending requests */
+	spin_lock_bh(&p_hwfn->p_spq->lock);
+	rc = qed_spq_pend_post(p_hwfn);
+	spin_unlock_bh(&p_hwfn->p_spq->lock);
+
 	return rc;
 }
 
@@ -747,7 +752,7 @@ static int qed_spq_post_list(struct qed_
 	return 0;
 }
 
-static int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
+int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
 {
 	struct qed_spq *p_spq = p_hwfn->p_spq;
 	struct qed_spq_entry *p_ent = NULL;
@@ -879,7 +884,6 @@ int qed_spq_completion(struct qed_hwfn *
 	struct qed_spq_entry	*p_ent = NULL;
 	struct qed_spq_entry	*tmp;
 	struct qed_spq_entry	*found = NULL;
-	int			rc;
 
 	if (!p_hwfn)
 		return -EINVAL;
@@ -937,12 +941,7 @@ int qed_spq_completion(struct qed_hwfn *
 		 */
 		qed_spq_return_entry(p_hwfn, found);
 
-	/* Attempt to post pending requests */
-	spin_lock_bh(&p_spq->lock);
-	rc = qed_spq_pend_post(p_hwfn);
-	spin_unlock_bh(&p_spq->lock);
-
-	return rc;
+	return 0;
 }
 
 int qed_consq_alloc(struct qed_hwfn *p_hwfn)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_sriov.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_sriov.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_sriov.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_sriov.c	2019-03-13 17:03:24.000000000 -0400
@@ -1963,7 +1963,9 @@ static void qed_iov_vf_mbx_start_vport(s
 	params.vport_id = vf->vport_id;
 	params.max_buffers_per_cqe = start->max_buffers_per_cqe;
 	params.mtu = vf->mtu;
-	params.check_mac = true;
+
+	/* Non trusted VFs should enable control frame filtering */
+	params.check_mac = !vf->p_vf_info.is_trusted_configured;
 
 	rc = qed_sp_eth_vport_start(p_hwfn, &params);
 	if (rc) {
@@ -4910,6 +4912,9 @@ static void qed_iov_handle_trust_change(
 		params.opaque_fid = vf->opaque_fid;
 		params.vport_id = vf->vport_id;
 
+		params.update_ctl_frame_check = 1;
+		params.mac_chk_en = !vf_info->is_trusted_configured;
+
 		if (vf_info->rx_accept_mode & mask) {
 			flags->update_rx_mode_config = 1;
 			flags->rx_accept_filter = vf_info->rx_accept_mode;
@@ -4927,7 +4932,8 @@ static void qed_iov_handle_trust_change(
 		}
 
 		if (flags->update_rx_mode_config ||
-		    flags->update_tx_mode_config)
+		    flags->update_tx_mode_config ||
+		    params.update_ctl_frame_check)
 			qed_sp_vport_update(hwfn, &params,
 					    QED_SPQ_MODE_EBLOCK, NULL);
 	}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_vf.c linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_vf.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/qlogic/qed/qed_vf.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/qlogic/qed/qed_vf.c	2019-03-13 17:03:24.000000000 -0400
@@ -261,6 +261,7 @@ static int qed_vf_pf_acquire(struct qed_
 	struct pfvf_acquire_resp_tlv *resp = &p_iov->pf2vf_reply->acquire_resp;
 	struct pf_vf_pfdev_info *pfdev_info = &resp->pfdev_info;
 	struct vf_pf_resc_request *p_resc;
+	u8 retry_cnt = VF_ACQUIRE_THRESH;
 	bool resources_acquired = false;
 	struct vfpf_acquire_tlv *req;
 	int rc = 0, attempts = 0;
@@ -314,6 +315,15 @@ static int qed_vf_pf_acquire(struct qed_
 
 		/* send acquire request */
 		rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
+
+		/* Re-try acquire in case of vf-pf hw channel timeout */
+		if (retry_cnt && rc == -EBUSY) {
+			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
+				   "VF retrying to acquire due to VPC timeout\n");
+			retry_cnt--;
+			continue;
+		}
+
 		if (rc)
 			goto exit;
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c	2019-03-13 17:03:24.000000000 -0400
@@ -1284,8 +1284,10 @@ static int rk_gmac_powerup(struct rk_pri
 	}
 
 	ret = phy_power_on(bsp_priv, true);
-	if (ret)
+	if (ret) {
+		gmac_clk_enable(bsp_priv, false);
 		return ret;
+	}
 
 	pm_runtime_enable(dev);
 	pm_runtime_get_sync(dev);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c	2019-03-13 17:03:24.000000000 -0400
@@ -702,8 +702,11 @@ static u32 stmmac_usec2riwt(u32 usec, st
 {
 	unsigned long clk = clk_get_rate(priv->plat->stmmac_clk);
 
-	if (!clk)
-		return 0;
+	if (!clk) {
+		clk = priv->plat->clk_ref_rate;
+		if (!clk)
+			return 0;
+	}
 
 	return (usec * (clk / 1000000)) / 256;
 }
@@ -712,8 +715,11 @@ static u32 stmmac_riwt2usec(u32 riwt, st
 {
 	unsigned long clk = clk_get_rate(priv->plat->stmmac_clk);
 
-	if (!clk)
-		return 0;
+	if (!clk) {
+		clk = priv->plat->clk_ref_rate;
+		if (!clk)
+			return 0;
+	}
 
 	return (riwt * 256) / (clk / 1000000);
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
--- linux-libre-4.14.105-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2019-03-13 17:03:24.000000000 -0400
@@ -3017,10 +3017,22 @@ static netdev_tx_t stmmac_xmit(struct sk
 
 	tx_q = &priv->tx_queue[queue];
 
+	if (priv->tx_path_in_lpi_mode)
+		stmmac_disable_eee_mode(priv);
+
 	/* Manage oversized TCP frames for GMAC4 device */
 	if (skb_is_gso(skb) && priv->tso) {
-		if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
+		if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
+			/*
+			 * There is no way to determine the number of TSO
+			 * capable Queues. Let's use always the Queue 0
+			 * because if TSO is supported then at least this
+			 * one will be capable.
+			 */
+			skb_set_queue_mapping(skb, 0);
+
 			return stmmac_tso_xmit(skb, dev);
+		}
 	}
 
 	if (unlikely(stmmac_tx_avail(priv, queue) < nfrags + 1)) {
@@ -3035,9 +3047,6 @@ static netdev_tx_t stmmac_xmit(struct sk
 		return NETDEV_TX_BUSY;
 	}
 
-	if (priv->tx_path_in_lpi_mode)
-		stmmac_disable_eee_mode(priv);
-
 	entry = tx_q->cur_tx;
 	first_entry = entry;
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/geneve.c linux-libre-4.14.106-gnu/drivers/net/geneve.c
--- linux-libre-4.14.105-gnu/drivers/net/geneve.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/geneve.c	2019-03-13 17:03:24.000000000 -0400
@@ -632,15 +632,20 @@ out:
 static int geneve_open(struct net_device *dev)
 {
 	struct geneve_dev *geneve = netdev_priv(dev);
-	bool ipv6 = !!(geneve->info.mode & IP_TUNNEL_INFO_IPV6);
 	bool metadata = geneve->collect_md;
+	bool ipv4, ipv6;
 	int ret = 0;
 
+	ipv6 = geneve->info.mode & IP_TUNNEL_INFO_IPV6 || metadata;
+	ipv4 = !ipv6 || metadata;
 #if IS_ENABLED(CONFIG_IPV6)
-	if (ipv6 || metadata)
+	if (ipv6) {
 		ret = geneve_sock_add(geneve, true);
+		if (ret < 0 && ret != -EAFNOSUPPORT)
+			ipv4 = false;
+	}
 #endif
-	if (!ret && (!ipv6 || metadata))
+	if (ipv4)
 		ret = geneve_sock_add(geneve, false);
 	if (ret < 0)
 		geneve_sock_release(geneve);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/hyperv/netvsc_drv.c linux-libre-4.14.106-gnu/drivers/net/hyperv/netvsc_drv.c
--- linux-libre-4.14.105-gnu/drivers/net/hyperv/netvsc_drv.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/hyperv/netvsc_drv.c	2019-03-13 17:03:24.000000000 -0400
@@ -741,6 +741,14 @@ void netvsc_linkstatus_callback(struct h
 	schedule_delayed_work(&ndev_ctx->dwork, 0);
 }
 
+static void netvsc_comp_ipcsum(struct sk_buff *skb)
+{
+	struct iphdr *iph = (struct iphdr *)skb->data;
+
+	iph->check = 0;
+	iph->check = ip_fast_csum(iph, iph->ihl);
+}
+
 static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net,
 					     struct napi_struct *napi,
 					     const struct ndis_tcp_ip_checksum_info *csum_info,
@@ -764,9 +772,17 @@ static struct sk_buff *netvsc_alloc_recv
 	/* skb is already created with CHECKSUM_NONE */
 	skb_checksum_none_assert(skb);
 
-	/*
-	 * In Linux, the IP checksum is always checked.
-	 * Do L4 checksum offload if enabled and present.
+	/* Incoming packets may have IP header checksum verified by the host.
+	 * They may not have IP header checksum computed after coalescing.
+	 * We compute it here if the flags are set, because on Linux, the IP
+	 * checksum is always checked.
+	 */
+	if (csum_info && csum_info->receive.ip_checksum_value_invalid &&
+	    csum_info->receive.ip_checksum_succeeded &&
+	    skb->protocol == htons(ETH_P_IP))
+		netvsc_comp_ipcsum(skb);
+
+	/* Do L4 checksum offload if enabled and present.
 	 */
 	if (csum_info && (net->features & NETIF_F_RXCSUM)) {
 		if (csum_info->receive.tcp_checksum_succeeded ||
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/phy/micrel.c linux-libre-4.14.106-gnu/drivers/net/phy/micrel.c
--- linux-libre-4.14.105-gnu/drivers/net/phy/micrel.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/phy/micrel.c	2019-03-13 17:03:24.000000000 -0400
@@ -339,6 +339,17 @@ static int ksz8041_config_aneg(struct ph
 	return genphy_config_aneg(phydev);
 }
 
+static int ksz8061_config_init(struct phy_device *phydev)
+{
+	int ret;
+
+	ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_DEVID1, 0xB61A);
+	if (ret)
+		return ret;
+
+	return kszphy_config_init(phydev);
+}
+
 static int ksz9021_load_values_from_of(struct phy_device *phydev,
 				       const struct device_node *of_node,
 				       u16 reg,
@@ -938,7 +949,7 @@ static struct phy_driver ksphy_driver[]
 	.phy_id_mask	= MICREL_PHY_ID_MASK,
 	.features	= PHY_BASIC_FEATURES,
 	.flags		= PHY_HAS_INTERRUPT,
-	.config_init	= kszphy_config_init,
+	.config_init	= ksz8061_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/phy/phylink.c linux-libre-4.14.106-gnu/drivers/net/phy/phylink.c
--- linux-libre-4.14.105-gnu/drivers/net/phy/phylink.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/phy/phylink.c	2019-03-13 17:03:24.000000000 -0400
@@ -333,6 +333,10 @@ static int phylink_get_mac_state(struct
 	linkmode_zero(state->lp_advertising);
 	state->interface = pl->link_config.interface;
 	state->an_enabled = pl->link_config.an_enabled;
+	state->speed = SPEED_UNKNOWN;
+	state->duplex = DUPLEX_UNKNOWN;
+	state->pause = MLO_PAUSE_NONE;
+	state->an_complete = 0;
 	state->link = 1;
 
 	return pl->ops->mac_link_state(ndev, state);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/team/team_mode_loadbalance.c linux-libre-4.14.106-gnu/drivers/net/team/team_mode_loadbalance.c
--- linux-libre-4.14.105-gnu/drivers/net/team/team_mode_loadbalance.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/team/team_mode_loadbalance.c	2019-03-13 17:03:24.000000000 -0400
@@ -319,6 +319,20 @@ static int lb_bpf_func_set(struct team *
 	return 0;
 }
 
+static void lb_bpf_func_free(struct team *team)
+{
+	struct lb_priv *lb_priv = get_lb_priv(team);
+	struct bpf_prog *fp;
+
+	if (!lb_priv->ex->orig_fprog)
+		return;
+
+	__fprog_destroy(lb_priv->ex->orig_fprog);
+	fp = rcu_dereference_protected(lb_priv->fp,
+				       lockdep_is_held(&team->lock));
+	bpf_prog_destroy(fp);
+}
+
 static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
 {
 	struct lb_priv *lb_priv = get_lb_priv(team);
@@ -633,6 +647,7 @@ static void lb_exit(struct team *team)
 
 	team_options_unregister(team, lb_options,
 				ARRAY_SIZE(lb_options));
+	lb_bpf_func_free(team);
 	cancel_delayed_work_sync(&lb_priv->ex->stats.refresh_dw);
 	free_percpu(lb_priv->pcpu_stats);
 	kfree(lb_priv->ex);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/tun.c linux-libre-4.14.106-gnu/drivers/net/tun.c
--- linux-libre-4.14.105-gnu/drivers/net/tun.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/tun.c	2019-03-13 17:03:24.000000000 -0400
@@ -1714,9 +1714,9 @@ static struct sk_buff *tun_ring_recv(str
 	}
 
 	add_wait_queue(&tfile->wq.wait, &wait);
-	current->state = TASK_INTERRUPTIBLE;
 
 	while (1) {
+		set_current_state(TASK_INTERRUPTIBLE);
 		skb = skb_array_consume(&tfile->tx_array);
 		if (skb)
 			break;
@@ -1732,7 +1732,7 @@ static struct sk_buff *tun_ring_recv(str
 		schedule();
 	}
 
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&tfile->wq.wait, &wait);
 
 out:
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/wireless/ath/ath9k/init.c linux-libre-4.14.106-gnu/drivers/net/wireless/ath/ath9k/init.c
--- linux-libre-4.14.105-gnu/drivers/net/wireless/ath/ath9k/init.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/wireless/ath/ath9k/init.c	2019-03-13 17:03:24.000000000 -0400
@@ -580,15 +580,15 @@ static int ath9k_of_init(struct ath_soft
 		ret = ath9k_eeprom_request(sc, eeprom_name);
 		if (ret)
 			return ret;
+
+		ah->ah_flags &= ~AH_USE_EEPROM;
+		ah->ah_flags |= AH_NO_EEP_SWAP;
 	}
 
 	mac = of_get_mac_address(np);
 	if (mac)
 		ether_addr_copy(common->macaddr, mac);
 
-	ah->ah_flags &= ~AH_USE_EEPROM;
-	ah->ah_flags |= AH_NO_EEP_SWAP;
-
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/xen-netback/hash.c linux-libre-4.14.106-gnu/drivers/net/xen-netback/hash.c
--- linux-libre-4.14.105-gnu/drivers/net/xen-netback/hash.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/xen-netback/hash.c	2019-03-13 17:03:24.000000000 -0400
@@ -435,6 +435,8 @@ void xenvif_init_hash(struct xenvif *vif
 	if (xenvif_hash_cache_size == 0)
 		return;
 
+	BUG_ON(vif->hash.cache.count);
+
 	spin_lock_init(&vif->hash.cache.lock);
 	INIT_LIST_HEAD(&vif->hash.cache.list);
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/xen-netback/interface.c linux-libre-4.14.106-gnu/drivers/net/xen-netback/interface.c
--- linux-libre-4.14.105-gnu/drivers/net/xen-netback/interface.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/xen-netback/interface.c	2019-03-13 17:03:24.000000000 -0400
@@ -153,6 +153,13 @@ static u16 xenvif_select_queue(struct ne
 {
 	struct xenvif *vif = netdev_priv(dev);
 	unsigned int size = vif->hash.size;
+	unsigned int num_queues;
+
+	/* If queues are not set up internally - always return 0
+	 * as the packet going to be dropped anyway */
+	num_queues = READ_ONCE(vif->num_queues);
+	if (num_queues < 1)
+		return 0;
 
 	if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)
 		return fallback(dev, skb) % dev->real_num_tx_queues;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/net/xen-netback/netback.c linux-libre-4.14.106-gnu/drivers/net/xen-netback/netback.c
--- linux-libre-4.14.105-gnu/drivers/net/xen-netback/netback.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/net/xen-netback/netback.c	2019-03-13 17:03:24.000000000 -0400
@@ -1074,11 +1074,6 @@ static int xenvif_handle_frag_list(struc
 		skb_frag_size_set(&frags[i], len);
 	}
 
-	/* Copied all the bits from the frag list -- free it. */
-	skb_frag_list_init(skb);
-	xenvif_skb_zerocopy_prepare(queue, nskb);
-	kfree_skb(nskb);
-
 	/* Release all the original (foreign) frags. */
 	for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
 		skb_frag_unref(skb, f);
@@ -1147,6 +1142,8 @@ static int xenvif_tx_submit(struct xenvi
 		xenvif_fill_frags(queue, skb);
 
 		if (unlikely(skb_has_frag_list(skb))) {
+			struct sk_buff *nskb = skb_shinfo(skb)->frag_list;
+			xenvif_skb_zerocopy_prepare(queue, nskb);
 			if (xenvif_handle_frag_list(queue, skb)) {
 				if (net_ratelimit())
 					netdev_err(queue->vif->dev,
@@ -1155,6 +1152,9 @@ static int xenvif_tx_submit(struct xenvi
 				kfree_skb(skb);
 				continue;
 			}
+			/* Copied all the bits from the frag list -- free it. */
+			skb_frag_list_init(skb);
+			kfree_skb(nskb);
 		}
 
 		skb->dev      = queue->vif->dev;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/platform/x86/Kconfig linux-libre-4.14.106-gnu/drivers/platform/x86/Kconfig
--- linux-libre-4.14.105-gnu/drivers/platform/x86/Kconfig	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/platform/x86/Kconfig	2019-03-13 17:03:24.000000000 -0400
@@ -999,6 +999,7 @@ config INTEL_OAKTRAIL
 config SAMSUNG_Q10
 	tristate "Samsung Q10 Extras"
 	depends on ACPI
+	depends on BACKLIGHT_LCD_SUPPORT
 	select BACKLIGHT_CLASS_DEVICE
 	---help---
 	  This driver provides support for backlight control on Samsung Q10
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/s390/net/qeth_core_main.c linux-libre-4.14.106-gnu/drivers/s390/net/qeth_core_main.c
--- linux-libre-4.14.105-gnu/drivers/s390/net/qeth_core_main.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/s390/net/qeth_core_main.c	2019-03-13 17:03:24.000000000 -0400
@@ -2472,11 +2472,12 @@ out:
 	return rc;
 }
 
-static void qeth_free_qdio_out_buf(struct qeth_qdio_out_q *q)
+static void qeth_free_output_queue(struct qeth_qdio_out_q *q)
 {
 	if (!q)
 		return;
 
+	qeth_clear_outq_buffers(q, 1);
 	qdio_free_buffers(q->qdio_bufs, QDIO_MAX_BUFFERS_PER_Q);
 	kfree(q);
 }
@@ -2549,10 +2550,8 @@ out_freeoutqbufs:
 		card->qdio.out_qs[i]->bufs[j] = NULL;
 	}
 out_freeoutq:
-	while (i > 0) {
-		qeth_free_qdio_out_buf(card->qdio.out_qs[--i]);
-		qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
-	}
+	while (i > 0)
+		qeth_free_output_queue(card->qdio.out_qs[--i]);
 	kfree(card->qdio.out_qs);
 	card->qdio.out_qs = NULL;
 out_freepool:
@@ -2585,10 +2584,8 @@ static void qeth_free_qdio_buffers(struc
 	qeth_free_buffer_pool(card);
 	/* free outbound qdio_qs */
 	if (card->qdio.out_qs) {
-		for (i = 0; i < card->qdio.no_out_queues; ++i) {
-			qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
-			qeth_free_qdio_out_buf(card->qdio.out_qs[i]);
-		}
+		for (i = 0; i < card->qdio.no_out_queues; i++)
+			qeth_free_output_queue(card->qdio.out_qs[i]);
 		kfree(card->qdio.out_qs);
 		card->qdio.out_qs = NULL;
 	}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/scsi/53c700.c linux-libre-4.14.106-gnu/drivers/scsi/53c700.c
--- linux-libre-4.14.105-gnu/drivers/scsi/53c700.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/scsi/53c700.c	2019-03-13 17:03:24.000000000 -0400
@@ -295,7 +295,7 @@ NCR_700_detect(struct scsi_host_template
 	if(tpnt->sdev_attrs == NULL)
 		tpnt->sdev_attrs = NCR_700_dev_attrs;
 
-	memory = dma_alloc_attrs(hostdata->dev, TOTAL_MEM_SIZE, &pScript,
+	memory = dma_alloc_attrs(dev, TOTAL_MEM_SIZE, &pScript,
 				 GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
 	if(memory == NULL) {
 		printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/scsi/aacraid/commsup.c linux-libre-4.14.106-gnu/drivers/scsi/aacraid/commsup.c
--- linux-libre-4.14.105-gnu/drivers/scsi/aacraid/commsup.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/scsi/aacraid/commsup.c	2019-03-13 17:03:24.000000000 -0400
@@ -1332,8 +1332,9 @@ static void aac_handle_aif(struct aac_de
 				  ADD : DELETE;
 				break;
 			}
-			case AifBuManagerEvent:
-				aac_handle_aif_bu(dev, aifcmd);
+			break;
+		case AifBuManagerEvent:
+			aac_handle_aif_bu(dev, aifcmd);
 			break;
 		}
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/scsi/libfc/fc_lport.c linux-libre-4.14.106-gnu/drivers/scsi/libfc/fc_lport.c
--- linux-libre-4.14.105-gnu/drivers/scsi/libfc/fc_lport.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/scsi/libfc/fc_lport.c	2019-03-13 17:03:24.000000000 -0400
@@ -1739,14 +1739,14 @@ void fc_lport_flogi_resp(struct fc_seq *
 	    fc_frame_payload_op(fp) != ELS_LS_ACC) {
 		FC_LPORT_DBG(lport, "FLOGI not accepted or bad response\n");
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	flp = fc_frame_payload_get(fp, sizeof(*flp));
 	if (!flp) {
 		FC_LPORT_DBG(lport, "FLOGI bad response\n");
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	mfs = ntohs(flp->fl_csp.sp_bb_data) &
@@ -1756,7 +1756,7 @@ void fc_lport_flogi_resp(struct fc_seq *
 		FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, "
 			     "lport->mfs:%hu\n", mfs, lport->mfs);
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	if (mfs <= lport->mfs) {
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/scsi/scsi_lib.c linux-libre-4.14.106-gnu/drivers/scsi/scsi_lib.c
--- linux-libre-4.14.105-gnu/drivers/scsi/scsi_lib.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/scsi/scsi_lib.c	2019-03-13 17:03:24.000000000 -0400
@@ -734,6 +734,7 @@ static blk_status_t __scsi_error_from_ho
 		set_host_byte(cmd, DID_OK);
 		return BLK_STS_TARGET;
 	case DID_NEXUS_FAILURE:
+		set_host_byte(cmd, DID_OK);
 		return BLK_STS_NEXUS;
 	case DID_ALLOC_FAILURE:
 		set_host_byte(cmd, DID_OK);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/soc/fsl/qbman/qman.c linux-libre-4.14.106-gnu/drivers/soc/fsl/qbman/qman.c
--- linux-libre-4.14.105-gnu/drivers/soc/fsl/qbman/qman.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/soc/fsl/qbman/qman.c	2019-03-13 17:03:24.000000000 -0400
@@ -1048,18 +1048,19 @@ static void qm_mr_process_task(struct wo
 static irqreturn_t portal_isr(int irq, void *ptr)
 {
 	struct qman_portal *p = ptr;
-
-	u32 clear = QM_DQAVAIL_MASK | p->irq_sources;
 	u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources;
+	u32 clear = 0;
 
 	if (unlikely(!is))
 		return IRQ_NONE;
 
 	/* DQRR-handling if it's interrupt-driven */
-	if (is & QM_PIRQ_DQRI)
+	if (is & QM_PIRQ_DQRI) {
 		__poll_portal_fast(p, QMAN_POLL_LIMIT);
+		clear = QM_DQAVAIL_MASK | QM_PIRQ_DQRI;
+	}
 	/* Handling of anything else that's interrupt-driven */
-	clear |= __poll_portal_slow(p, is);
+	clear |= __poll_portal_slow(p, is) & QM_PIRQ_SLOW;
 	qm_out(&p->p, QM_REG_ISR, clear);
 	return IRQ_HANDLED;
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/staging/android/ion/ion_system_heap.c linux-libre-4.14.106-gnu/drivers/staging/android/ion/ion_system_heap.c
--- linux-libre-4.14.105-gnu/drivers/staging/android/ion/ion_system_heap.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/staging/android/ion/ion_system_heap.c	2019-03-13 17:03:24.000000000 -0400
@@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(
 					bool cached)
 {
 	int i;
-	gfp_t gfp_flags = low_order_gfp_flags;
 
 	for (i = 0; i < NUM_ORDERS; i++) {
 		struct ion_page_pool *pool;
+		gfp_t gfp_flags = low_order_gfp_flags;
 
 		if (orders[i] > 4)
 			gfp_flags = high_order_gfp_flags;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/staging/comedi/drivers/ni_660x.c linux-libre-4.14.106-gnu/drivers/staging/comedi/drivers/ni_660x.c
--- linux-libre-4.14.105-gnu/drivers/staging/comedi/drivers/ni_660x.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/staging/comedi/drivers/ni_660x.c	2019-03-13 17:03:24.000000000 -0400
@@ -611,6 +611,7 @@ static int ni_660x_set_pfi_routing(struc
 	case NI_660X_PFI_OUTPUT_DIO:
 		if (chan > 31)
 			return -EINVAL;
+		break;
 	default:
 		return -EINVAL;
 	}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/staging/wilc1000/linux_wlan.c linux-libre-4.14.106-gnu/drivers/staging/wilc1000/linux_wlan.c
--- linux-libre-4.14.105-gnu/drivers/staging/wilc1000/linux_wlan.c	2019-03-05 18:31:49.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/staging/wilc1000/linux_wlan.c	2019-03-14 01:41:27.000000000 -0400
@@ -1238,8 +1238,8 @@ int wilc_netdev_init(struct wilc **wilc,
 		vif->wilc = *wilc;
 		vif->ndev = ndev;
 		wl->vif[i] = vif;
-		wl->vif_num = i;
-		vif->idx = wl->vif_num;
+		wl->vif_num = i + 1;
+		vif->idx = i;
 
 		ndev->netdev_ops = &wilc_netdev_ops;
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/usb/phy/Kconfig linux-libre-4.14.106-gnu/drivers/usb/phy/Kconfig
--- linux-libre-4.14.105-gnu/drivers/usb/phy/Kconfig	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/usb/phy/Kconfig	2019-03-13 17:03:24.000000000 -0400
@@ -21,7 +21,7 @@ config AB8500_USB
 
 config FSL_USB2_OTG
 	bool "Freescale USB OTG Transceiver Driver"
-	depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
+	depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
 	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
 	select USB_PHY
 	help
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/usb/serial/cp210x.c linux-libre-4.14.106-gnu/drivers/usb/serial/cp210x.c
--- linux-libre-4.14.105-gnu/drivers/usb/serial/cp210x.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/usb/serial/cp210x.c	2019-03-13 17:03:24.000000000 -0400
@@ -64,6 +64,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
 	{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
 	{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
+	{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
 	{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
 	{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
 	{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/usb/serial/ftdi_sio.c linux-libre-4.14.106-gnu/drivers/usb/serial/ftdi_sio.c
--- linux-libre-4.14.105-gnu/drivers/usb/serial/ftdi_sio.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/usb/serial/ftdi_sio.c	2019-03-13 17:03:24.000000000 -0400
@@ -1020,6 +1020,8 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_BT_USB_PID) },
 	{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_WL_USB_PID) },
 	{ USB_DEVICE(AIRBUS_DS_VID, AIRBUS_DS_P8GR) },
+	/* EZPrototypes devices */
+	{ USB_DEVICE(EZPROTOTYPES_VID, HJELMSLUND_USB485_ISO_PID) },
 	{ }					/* Terminating entry */
 };
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/usb/serial/ftdi_sio_ids.h linux-libre-4.14.106-gnu/drivers/usb/serial/ftdi_sio_ids.h
--- linux-libre-4.14.105-gnu/drivers/usb/serial/ftdi_sio_ids.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/usb/serial/ftdi_sio_ids.h	2019-03-13 17:03:24.000000000 -0400
@@ -1309,6 +1309,12 @@
 #define IONICS_PLUGCOMPUTER_PID		0x0102
 
 /*
+ * EZPrototypes (PID reseller)
+ */
+#define EZPROTOTYPES_VID		0x1c40
+#define HJELMSLUND_USB485_ISO_PID	0x0477
+
+/*
  * Dresden Elektronik Sensor Terminal Board
  */
 #define DE_VID			0x1cf1 /* Vendor ID */
diff -druNp --no-dereference linux-libre-4.14.105-gnu/drivers/usb/serial/option.c linux-libre-4.14.106-gnu/drivers/usb/serial/option.c
--- linux-libre-4.14.105-gnu/drivers/usb/serial/option.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/drivers/usb/serial/option.c	2019-03-13 17:03:24.000000000 -0400
@@ -1151,6 +1151,8 @@ static const struct usb_device_id option
 	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
 	  .driver_info = NCTRL(0) | RSVD(3) },
+	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1102, 0xff),	/* Telit ME910 (ECM) */
+	  .driver_info = NCTRL(0) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
 	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
 	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/autofs4/expire.c linux-libre-4.14.106-gnu/fs/autofs4/expire.c
--- linux-libre-4.14.105-gnu/fs/autofs4/expire.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/autofs4/expire.c	2019-03-13 17:03:24.000000000 -0400
@@ -567,7 +567,6 @@ int autofs4_expire_run(struct super_bloc
 	pkt.len = dentry->d_name.len;
 	memcpy(pkt.name, dentry->d_name.name, pkt.len);
 	pkt.name[pkt.len] = '\0';
-	dput(dentry);
 
 	if (copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)))
 		ret = -EFAULT;
@@ -580,6 +579,8 @@ int autofs4_expire_run(struct super_bloc
 	complete_all(&ino->expire_complete);
 	spin_unlock(&sbi->fs_lock);
 
+	dput(dentry);
+
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/autofs4/inode.c linux-libre-4.14.106-gnu/fs/autofs4/inode.c
--- linux-libre-4.14.105-gnu/fs/autofs4/inode.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/autofs4/inode.c	2019-03-13 17:03:24.000000000 -0400
@@ -259,8 +259,10 @@ int autofs4_fill_super(struct super_bloc
 	}
 	root_inode = autofs4_get_inode(s, S_IFDIR | 0755);
 	root = d_make_root(root_inode);
-	if (!root)
+	if (!root) {
+		ret = -ENOMEM;
 		goto fail_ino;
+	}
 	pipe = NULL;
 
 	root->d_fsdata = ino;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/buffer.c linux-libre-4.14.106-gnu/fs/buffer.c
--- linux-libre-4.14.105-gnu/fs/buffer.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/buffer.c	2019-03-13 17:03:24.000000000 -0400
@@ -208,6 +208,7 @@ __find_get_block_slow(struct block_devic
 	struct buffer_head *head;
 	struct page *page;
 	int all_mapped = 1;
+	static DEFINE_RATELIMIT_STATE(last_warned, HZ, 1);
 
 	index = block >> (PAGE_SHIFT - bd_inode->i_blkbits);
 	page = find_get_page_flags(bd_mapping, index, FGP_ACCESSED);
@@ -235,15 +236,15 @@ __find_get_block_slow(struct block_devic
 	 * file io on the block device and getblk.  It gets dealt with
 	 * elsewhere, don't buffer_error if we had some unmapped buffers
 	 */
-	if (all_mapped) {
-		printk("__find_get_block_slow() failed. "
-			"block=%llu, b_blocknr=%llu\n",
-			(unsigned long long)block,
-			(unsigned long long)bh->b_blocknr);
-		printk("b_state=0x%08lx, b_size=%zu\n",
-			bh->b_state, bh->b_size);
-		printk("device %pg blocksize: %d\n", bdev,
-			1 << bd_inode->i_blkbits);
+	ratelimit_set_flags(&last_warned, RATELIMIT_MSG_ON_RELEASE);
+	if (all_mapped && __ratelimit(&last_warned)) {
+		printk("__find_get_block_slow() failed. block=%llu, "
+		       "b_blocknr=%llu, b_state=0x%08lx, b_size=%zu, "
+		       "device %pg blocksize: %d\n",
+		       (unsigned long long)block,
+		       (unsigned long long)bh->b_blocknr,
+		       bh->b_state, bh->b_size, bdev,
+		       1 << bd_inode->i_blkbits);
 	}
 out_unlock:
 	spin_unlock(&bd_mapping->private_lock);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/cifs/smb2pdu.h linux-libre-4.14.106-gnu/fs/cifs/smb2pdu.h
--- linux-libre-4.14.105-gnu/fs/cifs/smb2pdu.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/cifs/smb2pdu.h	2019-03-13 17:03:24.000000000 -0400
@@ -84,8 +84,8 @@
 
 #define NUMBER_OF_SMB2_COMMANDS	0x0013
 
-/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
-#define MAX_SMB2_HDR_SIZE 0x00b0
+/* 52 transform hdr + 64 hdr + 88 create rsp */
+#define MAX_SMB2_HDR_SIZE 204
 
 #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
 #define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/drop_caches.c linux-libre-4.14.106-gnu/fs/drop_caches.c
--- linux-libre-4.14.105-gnu/fs/drop_caches.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/drop_caches.c	2019-03-13 17:03:24.000000000 -0400
@@ -21,8 +21,13 @@ static void drop_pagecache_sb(struct sup
 	spin_lock(&sb->s_inode_list_lock);
 	list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
 		spin_lock(&inode->i_lock);
+		/*
+		 * We must skip inodes in unusual state. We may also skip
+		 * inodes without pages but we deliberately won't in case
+		 * we need to reschedule to avoid softlockups.
+		 */
 		if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) ||
-		    (inode->i_mapping->nrpages == 0)) {
+		    (inode->i_mapping->nrpages == 0 && !need_resched())) {
 			spin_unlock(&inode->i_lock);
 			continue;
 		}
@@ -30,6 +35,7 @@ static void drop_pagecache_sb(struct sup
 		spin_unlock(&inode->i_lock);
 		spin_unlock(&sb->s_inode_list_lock);
 
+		cond_resched();
 		invalidate_mapping_pages(inode->i_mapping, 0, -1);
 		iput(toput_inode);
 		toput_inode = inode;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/exec.c linux-libre-4.14.106-gnu/fs/exec.c
--- linux-libre-4.14.105-gnu/fs/exec.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/exec.c	2019-03-13 17:03:24.000000000 -0400
@@ -925,7 +925,7 @@ int kernel_read_file(struct file *file,
 		bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
 		if (bytes < 0) {
 			ret = bytes;
-			goto out;
+			goto out_free;
 		}
 
 		if (bytes == 0)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/gfs2/glock.c linux-libre-4.14.106-gnu/fs/gfs2/glock.c
--- linux-libre-4.14.105-gnu/fs/gfs2/glock.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/gfs2/glock.c	2019-03-13 17:03:24.000000000 -0400
@@ -107,7 +107,7 @@ static int glock_wake_function(wait_queu
 
 static wait_queue_head_t *glock_waitqueue(struct lm_lockname *name)
 {
-	u32 hash = jhash2((u32 *)name, sizeof(*name) / 4, 0);
+	u32 hash = jhash2((u32 *)name, ht_parms.key_len / 4, 0);
 
 	return glock_wait_table + hash_32(hash, GLOCK_WAIT_TABLE_BITS);
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/hugetlbfs/inode.c linux-libre-4.14.106-gnu/fs/hugetlbfs/inode.c
--- linux-libre-4.14.105-gnu/fs/hugetlbfs/inode.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/hugetlbfs/inode.c	2019-03-13 17:03:24.000000000 -0400
@@ -845,6 +845,18 @@ static int hugetlbfs_migrate_page(struct
 	rc = migrate_huge_page_move_mapping(mapping, newpage, page);
 	if (rc != MIGRATEPAGE_SUCCESS)
 		return rc;
+
+	/*
+	 * page_private is subpool pointer in hugetlb pages.  Transfer to
+	 * new page.  PagePrivate is not associated with page_private for
+	 * hugetlb pages and can not be set here as only page_huge_active
+	 * pages can be migrated.
+	 */
+	if (page_private(page)) {
+		set_page_private(newpage, page_private(page));
+		set_page_private(page, 0);
+	}
+
 	if (mode != MIGRATE_SYNC_NO_COPY)
 		migrate_page_copy(newpage, page);
 	else
diff -druNp --no-dereference linux-libre-4.14.105-gnu/fs/nfs/super.c linux-libre-4.14.106-gnu/fs/nfs/super.c
--- linux-libre-4.14.105-gnu/fs/nfs/super.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/fs/nfs/super.c	2019-03-13 17:03:24.000000000 -0400
@@ -1901,6 +1901,11 @@ static int nfs_parse_devname(const char
 	size_t len;
 	char *end;
 
+	if (unlikely(!dev_name || !*dev_name)) {
+		dfprintk(MOUNT, "NFS: device name not specified\n");
+		return -EINVAL;
+	}
+
 	/* Is the host name protected with square brakcets? */
 	if (*dev_name == '[') {
 		end = strchr(++dev_name, ']');
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/drm/drm_cache.h linux-libre-4.14.106-gnu/include/drm/drm_cache.h
--- linux-libre-4.14.105-gnu/include/drm/drm_cache.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/drm/drm_cache.h	2019-03-13 17:03:24.000000000 -0400
@@ -45,6 +45,24 @@ static inline bool drm_arch_can_wc_memor
 	return false;
 #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3)
 	return false;
+#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
+	/*
+	 * The DRM driver stack is designed to work with cache coherent devices
+	 * only, but permits an optimization to be enabled in some cases, where
+	 * for some buffers, both the CPU and the GPU use uncached mappings,
+	 * removing the need for DMA snooping and allocation in the CPU caches.
+	 *
+	 * The use of uncached GPU mappings relies on the correct implementation
+	 * of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
+	 * will use cached mappings nonetheless. On x86 platforms, this does not
+	 * seem to matter, as uncached CPU mappings will snoop the caches in any
+	 * case. However, on ARM and arm64, enabling this optimization on a
+	 * platform where NoSnoop is ignored results in loss of coherency, which
+	 * breaks correct operation of the device. Since we have no way of
+	 * detecting whether NoSnoop works or not, just disable this
+	 * optimization entirely for ARM and arm64.
+	 */
+	return false;
 #else
 	return true;
 #endif
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/linux/cpufreq.h linux-libre-4.14.106-gnu/include/linux/cpufreq.h
--- linux-libre-4.14.105-gnu/include/linux/cpufreq.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/linux/cpufreq.h	2019-03-13 17:03:24.000000000 -0400
@@ -254,20 +254,12 @@ __ATTR(_name, 0644, show_##_name, store_
 static struct freq_attr _name =			\
 __ATTR(_name, 0200, NULL, store_##_name)
 
-struct global_attr {
-	struct attribute attr;
-	ssize_t (*show)(struct kobject *kobj,
-			struct attribute *attr, char *buf);
-	ssize_t (*store)(struct kobject *a, struct attribute *b,
-			 const char *c, size_t count);
-};
-
 #define define_one_global_ro(_name)		\
-static struct global_attr _name =		\
+static struct kobj_attribute _name =		\
 __ATTR(_name, 0444, show_##_name, NULL)
 
 #define define_one_global_rw(_name)		\
-static struct global_attr _name =		\
+static struct kobj_attribute _name =		\
 __ATTR(_name, 0644, show_##_name, store_##_name)
 
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/linux/irqchip/arm-gic-v3.h linux-libre-4.14.106-gnu/include/linux/irqchip/arm-gic-v3.h
--- linux-libre-4.14.105-gnu/include/linux/irqchip/arm-gic-v3.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/linux/irqchip/arm-gic-v3.h	2019-03-13 17:03:24.000000000 -0400
@@ -306,7 +306,7 @@
 #define GITS_TYPER_PLPIS		(1UL << 0)
 #define GITS_TYPER_VLPIS		(1UL << 1)
 #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT	4
-#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
+#define GITS_TYPER_ITT_ENTRY_SIZE(r)	((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
 #define GITS_TYPER_IDBITS_SHIFT		8
 #define GITS_TYPER_DEVBITS_SHIFT	13
 #define GITS_TYPER_DEVBITS(r)		((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/linux/stmmac.h linux-libre-4.14.106-gnu/include/linux/stmmac.h
--- linux-libre-4.14.105-gnu/include/linux/stmmac.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/linux/stmmac.h	2019-03-13 17:03:24.000000000 -0400
@@ -183,6 +183,7 @@ struct plat_stmmacenet_data {
 	struct clk *pclk;
 	struct clk *clk_ptp_ref;
 	unsigned int clk_ptp_rate;
+	unsigned int clk_ref_rate;
 	struct reset_control *stmmac_rst;
 	struct stmmac_axi *axi;
 	int has_gmac4;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/net/bluetooth/bluetooth.h linux-libre-4.14.106-gnu/include/net/bluetooth/bluetooth.h
--- linux-libre-4.14.105-gnu/include/net/bluetooth/bluetooth.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/net/bluetooth/bluetooth.h	2019-03-13 17:03:24.000000000 -0400
@@ -273,7 +273,7 @@ int  bt_sock_ioctl(struct socket *sock,
 int  bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
 int  bt_sock_wait_ready(struct sock *sk, unsigned long flags);
 
-void bt_accept_enqueue(struct sock *parent, struct sock *sk);
+void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh);
 void bt_accept_unlink(struct sock *sk);
 struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/net/icmp.h linux-libre-4.14.106-gnu/include/net/icmp.h
--- linux-libre-4.14.105-gnu/include/net/icmp.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/net/icmp.h	2019-03-13 17:03:24.000000000 -0400
@@ -22,6 +22,7 @@
 
 #include <net/inet_sock.h>
 #include <net/snmp.h>
+#include <net/ip.h>
 
 struct icmp_err {
   int		errno;
@@ -39,7 +40,13 @@ struct net_proto_family;
 struct sk_buff;
 struct net;
 
-void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
+void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
+		 const struct ip_options *opt);
+static inline void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+{
+	__icmp_send(skb_in, type, code, info, &IPCB(skb_in)->opt);
+}
+
 int icmp_rcv(struct sk_buff *skb);
 void icmp_err(struct sk_buff *skb, u32 info);
 int icmp_init(void);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/include/net/ip.h linux-libre-4.14.106-gnu/include/net/ip.h
--- linux-libre-4.14.105-gnu/include/net/ip.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/include/net/ip.h	2019-03-13 17:03:24.000000000 -0400
@@ -593,6 +593,8 @@ static inline int ip_options_echo(struct
 }
 
 void ip_options_fragment(struct sk_buff *skb);
+int __ip_options_compile(struct net *net, struct ip_options *opt,
+			 struct sk_buff *skb, __be32 *info);
 int ip_options_compile(struct net *net, struct ip_options *opt,
 		       struct sk_buff *skb);
 int ip_options_get(struct net *net, struct ip_options_rcu **optp,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/kernel/bpf/hashtab.c linux-libre-4.14.106-gnu/kernel/bpf/hashtab.c
--- linux-libre-4.14.105-gnu/kernel/bpf/hashtab.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/kernel/bpf/hashtab.c	2019-03-13 17:03:24.000000000 -0400
@@ -655,7 +655,7 @@ static void free_htab_elem(struct bpf_ht
 	}
 
 	if (htab_is_prealloc(htab)) {
-		pcpu_freelist_push(&htab->freelist, &l->fnode);
+		__pcpu_freelist_push(&htab->freelist, &l->fnode);
 	} else {
 		atomic_dec(&htab->count);
 		l->htab = htab;
@@ -717,7 +717,7 @@ static struct htab_elem *alloc_htab_elem
 		} else {
 			struct pcpu_freelist_node *l;
 
-			l = pcpu_freelist_pop(&htab->freelist);
+			l = __pcpu_freelist_pop(&htab->freelist);
 			if (!l)
 				return ERR_PTR(-E2BIG);
 			l_new = container_of(l, struct htab_elem, fnode);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/kernel/bpf/percpu_freelist.c linux-libre-4.14.106-gnu/kernel/bpf/percpu_freelist.c
--- linux-libre-4.14.105-gnu/kernel/bpf/percpu_freelist.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/kernel/bpf/percpu_freelist.c	2019-03-13 17:03:24.000000000 -0400
@@ -28,8 +28,8 @@ void pcpu_freelist_destroy(struct pcpu_f
 	free_percpu(s->freelist);
 }
 
-static inline void __pcpu_freelist_push(struct pcpu_freelist_head *head,
-					struct pcpu_freelist_node *node)
+static inline void ___pcpu_freelist_push(struct pcpu_freelist_head *head,
+					 struct pcpu_freelist_node *node)
 {
 	raw_spin_lock(&head->lock);
 	node->next = head->first;
@@ -37,12 +37,22 @@ static inline void __pcpu_freelist_push(
 	raw_spin_unlock(&head->lock);
 }
 
-void pcpu_freelist_push(struct pcpu_freelist *s,
+void __pcpu_freelist_push(struct pcpu_freelist *s,
 			struct pcpu_freelist_node *node)
 {
 	struct pcpu_freelist_head *head = this_cpu_ptr(s->freelist);
 
-	__pcpu_freelist_push(head, node);
+	___pcpu_freelist_push(head, node);
+}
+
+void pcpu_freelist_push(struct pcpu_freelist *s,
+			struct pcpu_freelist_node *node)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	__pcpu_freelist_push(s, node);
+	local_irq_restore(flags);
 }
 
 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size,
@@ -63,7 +73,7 @@ void pcpu_freelist_populate(struct pcpu_
 	for_each_possible_cpu(cpu) {
 again:
 		head = per_cpu_ptr(s->freelist, cpu);
-		__pcpu_freelist_push(head, buf);
+		___pcpu_freelist_push(head, buf);
 		i++;
 		buf += elem_size;
 		if (i == nr_elems)
@@ -74,14 +84,12 @@ again:
 	local_irq_restore(flags);
 }
 
-struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *s)
+struct pcpu_freelist_node *__pcpu_freelist_pop(struct pcpu_freelist *s)
 {
 	struct pcpu_freelist_head *head;
 	struct pcpu_freelist_node *node;
-	unsigned long flags;
 	int orig_cpu, cpu;
 
-	local_irq_save(flags);
 	orig_cpu = cpu = raw_smp_processor_id();
 	while (1) {
 		head = per_cpu_ptr(s->freelist, cpu);
@@ -89,16 +97,25 @@ struct pcpu_freelist_node *pcpu_freelist
 		node = head->first;
 		if (node) {
 			head->first = node->next;
-			raw_spin_unlock_irqrestore(&head->lock, flags);
+			raw_spin_unlock(&head->lock);
 			return node;
 		}
 		raw_spin_unlock(&head->lock);
 		cpu = cpumask_next(cpu, cpu_possible_mask);
 		if (cpu >= nr_cpu_ids)
 			cpu = 0;
-		if (cpu == orig_cpu) {
-			local_irq_restore(flags);
+		if (cpu == orig_cpu)
 			return NULL;
-		}
 	}
 }
+
+struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *s)
+{
+	struct pcpu_freelist_node *ret;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	ret = __pcpu_freelist_pop(s);
+	local_irq_restore(flags);
+	return ret;
+}
diff -druNp --no-dereference linux-libre-4.14.105-gnu/kernel/bpf/percpu_freelist.h linux-libre-4.14.106-gnu/kernel/bpf/percpu_freelist.h
--- linux-libre-4.14.105-gnu/kernel/bpf/percpu_freelist.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/kernel/bpf/percpu_freelist.h	2019-03-13 17:03:24.000000000 -0400
@@ -22,8 +22,12 @@ struct pcpu_freelist_node {
 	struct pcpu_freelist_node *next;
 };
 
+/* pcpu_freelist_* do spin_lock_irqsave. */
 void pcpu_freelist_push(struct pcpu_freelist *, struct pcpu_freelist_node *);
 struct pcpu_freelist_node *pcpu_freelist_pop(struct pcpu_freelist *);
+/* __pcpu_freelist_* do spin_lock only. caller must disable irqs. */
+void __pcpu_freelist_push(struct pcpu_freelist *, struct pcpu_freelist_node *);
+struct pcpu_freelist_node *__pcpu_freelist_pop(struct pcpu_freelist *);
 void pcpu_freelist_populate(struct pcpu_freelist *s, void *buf, u32 elem_size,
 			    u32 nr_elems);
 int pcpu_freelist_init(struct pcpu_freelist *);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/kernel/events/core.c linux-libre-4.14.106-gnu/kernel/events/core.c
--- linux-libre-4.14.105-gnu/kernel/events/core.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/kernel/events/core.c	2019-03-13 17:03:24.000000000 -0400
@@ -436,18 +436,18 @@ int perf_proc_update_handler(struct ctl_
 		void __user *buffer, size_t *lenp,
 		loff_t *ppos)
 {
-	int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
-
-	if (ret || !write)
-		return ret;
-
+	int ret;
+	int perf_cpu = sysctl_perf_cpu_time_max_percent;
 	/*
 	 * If throttling is disabled don't allow the write:
 	 */
-	if (sysctl_perf_cpu_time_max_percent == 100 ||
-	    sysctl_perf_cpu_time_max_percent == 0)
+	if (write && (perf_cpu == 100 || perf_cpu == 0))
 		return -EINVAL;
 
+	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
+	if (ret || !write)
+		return ret;
+
 	max_samples_per_tick = DIV_ROUND_UP(sysctl_perf_event_sample_rate, HZ);
 	perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate;
 	update_perf_cpu_limits();
diff -druNp --no-dereference linux-libre-4.14.105-gnu/kernel/relay.c linux-libre-4.14.106-gnu/kernel/relay.c
--- linux-libre-4.14.105-gnu/kernel/relay.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/kernel/relay.c	2019-03-13 17:03:24.000000000 -0400
@@ -427,6 +427,8 @@ static struct dentry *relay_create_buf_f
 	dentry = chan->cb->create_buf_file(tmpname, chan->parent,
 					   S_IRUSR, buf,
 					   &chan->is_global);
+	if (IS_ERR(dentry))
+		dentry = NULL;
 
 	kfree(tmpname);
 
@@ -460,7 +462,7 @@ static struct rchan_buf *relay_open_buf(
 		dentry = chan->cb->create_buf_file(NULL, NULL,
 						   S_IRUSR, buf,
 						   &chan->is_global);
-		if (WARN_ON(dentry))
+		if (IS_ERR_OR_NULL(dentry))
 			goto free_buf;
 	}
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/lib/test_kmod.c linux-libre-4.14.106-gnu/lib/test_kmod.c
--- linux-libre-4.14.105-gnu/lib/test_kmod.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/lib/test_kmod.c	2019-03-13 17:03:24.000000000 -0400
@@ -632,7 +632,7 @@ static void __kmod_config_free(struct te
 	config->test_driver = NULL;
 
 	kfree_const(config->test_fs);
-	config->test_driver = NULL;
+	config->test_fs = NULL;
 }
 
 static void kmod_config_free(struct kmod_test_device *test_dev)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/Makefile linux-libre-4.14.106-gnu/Makefile
--- linux-libre-4.14.105-gnu/Makefile	2019-03-05 18:08:07.000000000 -0500
+++ linux-libre-4.14.106-gnu/Makefile	2019-03-14 01:22:10.000000000 -0400
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 105
+SUBLEVEL = 106
 EXTRAVERSION = -gnu
 NAME = Petit Gorille
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/mm/hugetlb.c linux-libre-4.14.106-gnu/mm/hugetlb.c
--- linux-libre-4.14.105-gnu/mm/hugetlb.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/mm/hugetlb.c	2019-03-13 17:03:24.000000000 -0400
@@ -3577,7 +3577,6 @@ retry_avoidcopy:
 	copy_user_huge_page(new_page, old_page, address, vma,
 			    pages_per_huge_page(h));
 	__SetPageUptodate(new_page);
-	set_page_huge_active(new_page);
 
 	mmun_start = address & huge_page_mask(h);
 	mmun_end = mmun_start + huge_page_size(h);
@@ -3600,6 +3599,7 @@ retry_avoidcopy:
 				make_huge_pte(vma, new_page, 1));
 		page_remove_rmap(old_page, true);
 		hugepage_add_new_anon_rmap(new_page, vma, address);
+		set_page_huge_active(new_page);
 		/* Make the old page be freed below */
 		new_page = old_page;
 	}
@@ -3682,6 +3682,7 @@ static int hugetlb_no_page(struct mm_str
 	struct page *page;
 	pte_t new_pte;
 	spinlock_t *ptl;
+	bool new_page = false;
 
 	/*
 	 * Currently, we are forced to kill the process in the event the
@@ -3747,7 +3748,7 @@ retry:
 		}
 		clear_huge_page(page, address, pages_per_huge_page(h));
 		__SetPageUptodate(page);
-		set_page_huge_active(page);
+		new_page = true;
 
 		if (vma->vm_flags & VM_MAYSHARE) {
 			int err = huge_add_to_page_cache(page, mapping, idx);
@@ -3818,6 +3819,15 @@ retry:
 	}
 
 	spin_unlock(ptl);
+
+	/*
+	 * Only make newly allocated pages active.  Existing pages found
+	 * in the pagecache could be !page_huge_active() if they have been
+	 * isolated for migration.
+	 */
+	if (new_page)
+		set_page_huge_active(page);
+
 	unlock_page(page);
 out:
 	return ret;
@@ -4053,7 +4063,6 @@ int hugetlb_mcopy_atomic_pte(struct mm_s
 	 * the set_pte_at() write.
 	 */
 	__SetPageUptodate(page);
-	set_page_huge_active(page);
 
 	mapping = dst_vma->vm_file->f_mapping;
 	idx = vma_hugecache_offset(h, dst_vma, dst_addr);
@@ -4121,6 +4130,7 @@ int hugetlb_mcopy_atomic_pte(struct mm_s
 	update_mmu_cache(dst_vma, dst_addr, dst_pte);
 
 	spin_unlock(ptl);
+	set_page_huge_active(page);
 	if (vm_shared)
 		unlock_page(page);
 	ret = 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/mm/memory_hotplug.c linux-libre-4.14.106-gnu/mm/memory_hotplug.c
--- linux-libre-4.14.105-gnu/mm/memory_hotplug.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/mm/memory_hotplug.c	2019-03-13 17:03:24.000000000 -0400
@@ -1256,7 +1256,8 @@ static struct page *next_active_pagebloc
 bool is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages)
 {
 	struct page *page = pfn_to_page(start_pfn);
-	struct page *end_page = page + nr_pages;
+	unsigned long end_pfn = min(start_pfn + nr_pages, zone_end_pfn(page_zone(page)));
+	struct page *end_page = pfn_to_page(end_pfn);
 
 	/* Check the starting page of each pageblock within the range */
 	for (; page < end_page; page = next_active_pageblock(page)) {
@@ -1296,6 +1297,9 @@ int test_pages_in_a_zone(unsigned long s
 				i++;
 			if (i == MAX_ORDER_NR_PAGES || pfn + i >= end_pfn)
 				continue;
+			/* Check if we got outside of the zone */
+			if (zone && !zone_spans_pfn(zone, pfn + i))
+				return 0;
 			page = pfn_to_page(pfn + i);
 			if (zone && page_zone(page) != zone)
 				return 0;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/mm/migrate.c linux-libre-4.14.106-gnu/mm/migrate.c
--- linux-libre-4.14.105-gnu/mm/migrate.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/mm/migrate.c	2019-03-13 17:03:24.000000000 -0400
@@ -1303,6 +1303,16 @@ static int unmap_and_move_huge_page(new_
 		lock_page(hpage);
 	}
 
+	/*
+	 * Check for pages which are in the process of being freed.  Without
+	 * page_mapping() set, hugetlbfs specific move page routine will not
+	 * be called and we could leak usage counts for subpools.
+	 */
+	if (page_private(hpage) && !page_mapping(hpage)) {
+		rc = -EBUSY;
+		goto out_unlock;
+	}
+
 	if (PageAnon(hpage))
 		anon_vma = page_get_anon_vma(hpage);
 
@@ -1334,6 +1344,7 @@ put_anon:
 		set_page_owner_migrate_reason(new_hpage, reason);
 	}
 
+out_unlock:
 	unlock_page(hpage);
 out:
 	if (rc != -EAGAIN)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/bluetooth/af_bluetooth.c linux-libre-4.14.106-gnu/net/bluetooth/af_bluetooth.c
--- linux-libre-4.14.105-gnu/net/bluetooth/af_bluetooth.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/bluetooth/af_bluetooth.c	2019-03-13 17:03:24.000000000 -0400
@@ -154,15 +154,25 @@ void bt_sock_unlink(struct bt_sock_list
 }
 EXPORT_SYMBOL(bt_sock_unlink);
 
-void bt_accept_enqueue(struct sock *parent, struct sock *sk)
+void bt_accept_enqueue(struct sock *parent, struct sock *sk, bool bh)
 {
 	BT_DBG("parent %p, sk %p", parent, sk);
 
 	sock_hold(sk);
-	lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
+
+	if (bh)
+		bh_lock_sock_nested(sk);
+	else
+		lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
+
 	list_add_tail(&bt_sk(sk)->accept_q, &bt_sk(parent)->accept_q);
 	bt_sk(sk)->parent = parent;
-	release_sock(sk);
+
+	if (bh)
+		bh_unlock_sock(sk);
+	else
+		release_sock(sk);
+
 	parent->sk_ack_backlog++;
 }
 EXPORT_SYMBOL(bt_accept_enqueue);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/bluetooth/l2cap_sock.c linux-libre-4.14.106-gnu/net/bluetooth/l2cap_sock.c
--- linux-libre-4.14.105-gnu/net/bluetooth/l2cap_sock.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/bluetooth/l2cap_sock.c	2019-03-13 17:03:24.000000000 -0400
@@ -1253,7 +1253,7 @@ static struct l2cap_chan *l2cap_sock_new
 
 	l2cap_sock_init(sk, parent);
 
-	bt_accept_enqueue(parent, sk);
+	bt_accept_enqueue(parent, sk, false);
 
 	release_sock(parent);
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/bluetooth/rfcomm/sock.c linux-libre-4.14.106-gnu/net/bluetooth/rfcomm/sock.c
--- linux-libre-4.14.105-gnu/net/bluetooth/rfcomm/sock.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/bluetooth/rfcomm/sock.c	2019-03-13 17:03:24.000000000 -0400
@@ -988,7 +988,7 @@ int rfcomm_connect_ind(struct rfcomm_ses
 	rfcomm_pi(sk)->channel = channel;
 
 	sk->sk_state = BT_CONFIG;
-	bt_accept_enqueue(parent, sk);
+	bt_accept_enqueue(parent, sk, true);
 
 	/* Accept connection and return socket DLC */
 	*d = rfcomm_pi(sk)->dlc;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/bluetooth/sco.c linux-libre-4.14.106-gnu/net/bluetooth/sco.c
--- linux-libre-4.14.105-gnu/net/bluetooth/sco.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/bluetooth/sco.c	2019-03-13 17:03:24.000000000 -0400
@@ -193,7 +193,7 @@ static void __sco_chan_add(struct sco_co
 	conn->sk = sk;
 
 	if (parent)
-		bt_accept_enqueue(parent, sk);
+		bt_accept_enqueue(parent, sk, true);
 }
 
 static int sco_chan_add(struct sco_conn *conn, struct sock *sk,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/bridge/netfilter/ebtables.c linux-libre-4.14.106-gnu/net/bridge/netfilter/ebtables.c
--- linux-libre-4.14.105-gnu/net/bridge/netfilter/ebtables.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/bridge/netfilter/ebtables.c	2019-03-13 17:03:24.000000000 -0400
@@ -2292,9 +2292,12 @@ static int compat_do_replace(struct net
 
 	xt_compat_lock(NFPROTO_BRIDGE);
 
-	ret = xt_compat_init_offsets(NFPROTO_BRIDGE, tmp.nentries);
-	if (ret < 0)
-		goto out_unlock;
+	if (tmp.nentries) {
+		ret = xt_compat_init_offsets(NFPROTO_BRIDGE, tmp.nentries);
+		if (ret < 0)
+			goto out_unlock;
+	}
+
 	ret = compat_copy_entries(entries_tmp, tmp.entries_size, &state);
 	if (ret < 0)
 		goto out_unlock;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/core/filter.c linux-libre-4.14.106-gnu/net/core/filter.c
--- linux-libre-4.14.105-gnu/net/core/filter.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/core/filter.c	2019-03-13 17:03:24.000000000 -0400
@@ -3081,10 +3081,12 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_so
 		/* Only some socketops are supported */
 		switch (optname) {
 		case SO_RCVBUF:
+			val = min_t(u32, val, sysctl_rmem_max);
 			sk->sk_userlocks |= SOCK_RCVBUF_LOCK;
 			sk->sk_rcvbuf = max_t(int, val * 2, SOCK_MIN_RCVBUF);
 			break;
 		case SO_SNDBUF:
+			val = min_t(u32, val, sysctl_wmem_max);
 			sk->sk_userlocks |= SOCK_SNDBUF_LOCK;
 			sk->sk_sndbuf = max_t(int, val * 2, SOCK_MIN_SNDBUF);
 			break;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/core/net-sysfs.c linux-libre-4.14.106-gnu/net/core/net-sysfs.c
--- linux-libre-4.14.105-gnu/net/core/net-sysfs.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/core/net-sysfs.c	2019-03-13 17:03:24.000000000 -0400
@@ -1402,6 +1402,9 @@ static int register_queue_kobjects(struc
 error:
 	netdev_queue_update_kobjects(dev, txq, 0);
 	net_rx_queue_update_kobjects(dev, rxq, 0);
+#ifdef CONFIG_SYSFS
+	kset_unregister(dev->queues_kset);
+#endif
 	return error;
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv4/cipso_ipv4.c linux-libre-4.14.106-gnu/net/ipv4/cipso_ipv4.c
--- linux-libre-4.14.105-gnu/net/ipv4/cipso_ipv4.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv4/cipso_ipv4.c	2019-03-13 17:03:24.000000000 -0400
@@ -667,7 +667,8 @@ static int cipso_v4_map_lvl_valid(const
 	case CIPSO_V4_MAP_PASS:
 		return 0;
 	case CIPSO_V4_MAP_TRANS:
-		if (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL)
+		if ((level < doi_def->map.std->lvl.cipso_size) &&
+		    (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL))
 			return 0;
 		break;
 	}
@@ -1735,13 +1736,26 @@ validate_return:
  */
 void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway)
 {
+	unsigned char optbuf[sizeof(struct ip_options) + 40];
+	struct ip_options *opt = (struct ip_options *)optbuf;
+
 	if (ip_hdr(skb)->protocol == IPPROTO_ICMP || error != -EACCES)
 		return;
 
+	/*
+	 * We might be called above the IP layer,
+	 * so we can not use icmp_send and IPCB here.
+	 */
+
+	memset(opt, 0, sizeof(struct ip_options));
+	opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
+	if (__ip_options_compile(dev_net(skb->dev), opt, skb, NULL))
+		return;
+
 	if (gateway)
-		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0);
+		__icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0, opt);
 	else
-		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0);
+		__icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0, opt);
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv4/fib_frontend.c linux-libre-4.14.106-gnu/net/ipv4/fib_frontend.c
--- linux-libre-4.14.105-gnu/net/ipv4/fib_frontend.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv4/fib_frontend.c	2019-03-13 17:03:24.000000000 -0400
@@ -675,6 +675,10 @@ static int rtm_to_fib_config(struct net
 		case RTA_GATEWAY:
 			cfg->fc_gw = nla_get_be32(attr);
 			break;
+		case RTA_VIA:
+			NL_SET_ERR_MSG(extack, "IPv4 does not support RTA_VIA attribute");
+			err = -EINVAL;
+			goto errout;
 		case RTA_PRIORITY:
 			cfg->fc_priority = nla_get_u32(attr);
 			break;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv4/icmp.c linux-libre-4.14.106-gnu/net/ipv4/icmp.c
--- linux-libre-4.14.105-gnu/net/ipv4/icmp.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv4/icmp.c	2019-03-13 17:03:24.000000000 -0400
@@ -573,7 +573,8 @@ relookup_failed:
  *			MUST reply to only the first fragment.
  */
 
-void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
+		 const struct ip_options *opt)
 {
 	struct iphdr *iph;
 	int room;
@@ -694,7 +695,7 @@ void icmp_send(struct sk_buff *skb_in, i
 					  iph->tos;
 	mark = IP4_REPLY_MARK(net, skb_in->mark);
 
-	if (ip_options_echo(net, &icmp_param.replyopts.opt.opt, skb_in))
+	if (__ip_options_echo(net, &icmp_param.replyopts.opt.opt, skb_in, opt))
 		goto out_unlock;
 
 
@@ -747,7 +748,7 @@ out_bh_enable:
 	local_bh_enable();
 out:;
 }
-EXPORT_SYMBOL(icmp_send);
+EXPORT_SYMBOL(__icmp_send);
 
 
 static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv4/ip_options.c linux-libre-4.14.106-gnu/net/ipv4/ip_options.c
--- linux-libre-4.14.105-gnu/net/ipv4/ip_options.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv4/ip_options.c	2019-03-13 17:03:24.000000000 -0400
@@ -251,8 +251,9 @@ static void spec_dst_fill(__be32 *spec_d
  * If opt == NULL, then skb->data should point to IP header.
  */
 
-int ip_options_compile(struct net *net,
-		       struct ip_options *opt, struct sk_buff *skb)
+int __ip_options_compile(struct net *net,
+			 struct ip_options *opt, struct sk_buff *skb,
+			 __be32 *info)
 {
 	__be32 spec_dst = htonl(INADDR_ANY);
 	unsigned char *pp_ptr = NULL;
@@ -468,11 +469,22 @@ eol:
 		return 0;
 
 error:
-	if (skb) {
-		icmp_send(skb, ICMP_PARAMETERPROB, 0, htonl((pp_ptr-iph)<<24));
-	}
+	if (info)
+		*info = htonl((pp_ptr-iph)<<24);
 	return -EINVAL;
 }
+
+int ip_options_compile(struct net *net,
+		       struct ip_options *opt, struct sk_buff *skb)
+{
+	int ret;
+	__be32 info;
+
+	ret = __ip_options_compile(net, opt, skb, &info);
+	if (ret != 0 && skb)
+		icmp_send(skb, ICMP_PARAMETERPROB, 0, info);
+	return ret;
+}
 EXPORT_SYMBOL(ip_options_compile);
 
 /*
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv4/ip_vti.c linux-libre-4.14.106-gnu/net/ipv4/ip_vti.c
--- linux-libre-4.14.105-gnu/net/ipv4/ip_vti.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv4/ip_vti.c	2019-03-13 17:03:24.000000000 -0400
@@ -74,6 +74,33 @@ drop:
 	return 0;
 }
 
+static int vti_input_ipip(struct sk_buff *skb, int nexthdr, __be32 spi,
+		     int encap_type)
+{
+	struct ip_tunnel *tunnel;
+	const struct iphdr *iph = ip_hdr(skb);
+	struct net *net = dev_net(skb->dev);
+	struct ip_tunnel_net *itn = net_generic(net, vti_net_id);
+
+	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
+				  iph->saddr, iph->daddr, 0);
+	if (tunnel) {
+		if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
+			goto drop;
+
+		XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel;
+
+		skb->dev = tunnel->dev;
+
+		return xfrm_input(skb, nexthdr, spi, encap_type);
+	}
+
+	return -EINVAL;
+drop:
+	kfree_skb(skb);
+	return 0;
+}
+
 static int vti_rcv(struct sk_buff *skb)
 {
 	XFRM_SPI_SKB_CB(skb)->family = AF_INET;
@@ -82,6 +109,14 @@ static int vti_rcv(struct sk_buff *skb)
 	return vti_input(skb, ip_hdr(skb)->protocol, 0, 0);
 }
 
+static int vti_rcv_ipip(struct sk_buff *skb)
+{
+	XFRM_SPI_SKB_CB(skb)->family = AF_INET;
+	XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
+
+	return vti_input_ipip(skb, ip_hdr(skb)->protocol, ip_hdr(skb)->saddr, 0);
+}
+
 static int vti_rcv_cb(struct sk_buff *skb, int err)
 {
 	unsigned short family;
@@ -439,6 +474,12 @@ static struct xfrm4_protocol vti_ipcomp4
 	.priority	=	100,
 };
 
+static struct xfrm_tunnel ipip_handler __read_mostly = {
+	.handler	=	vti_rcv_ipip,
+	.err_handler	=	vti4_err,
+	.priority	=	0,
+};
+
 static int __net_init vti_init_net(struct net *net)
 {
 	int err;
@@ -607,6 +648,13 @@ static int __init vti_init(void)
 	if (err < 0)
 		goto xfrm_proto_comp_failed;
 
+	msg = "ipip tunnel";
+	err = xfrm4_tunnel_register(&ipip_handler, AF_INET);
+	if (err < 0) {
+		pr_info("%s: cant't register tunnel\n",__func__);
+		goto xfrm_tunnel_failed;
+	}
+
 	msg = "netlink interface";
 	err = rtnl_link_register(&vti_link_ops);
 	if (err < 0)
@@ -616,6 +664,8 @@ static int __init vti_init(void)
 
 rtnl_link_failed:
 	xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
+xfrm_tunnel_failed:
+	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
 xfrm_proto_comp_failed:
 	xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
 xfrm_proto_ah_failed:
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv6/ip6mr.c linux-libre-4.14.106-gnu/net/ipv6/ip6mr.c
--- linux-libre-4.14.105-gnu/net/ipv6/ip6mr.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv6/ip6mr.c	2019-03-13 17:03:24.000000000 -0400
@@ -2002,10 +2002,10 @@ int ip6mr_compat_ioctl(struct sock *sk,
 
 static inline int ip6mr_forward2_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
 {
-	__IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
-			IPSTATS_MIB_OUTFORWDATAGRAMS);
-	__IP6_ADD_STATS(net, ip6_dst_idev(skb_dst(skb)),
-			IPSTATS_MIB_OUTOCTETS, skb->len);
+	IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
+		      IPSTATS_MIB_OUTFORWDATAGRAMS);
+	IP6_ADD_STATS(net, ip6_dst_idev(skb_dst(skb)),
+		      IPSTATS_MIB_OUTOCTETS, skb->len);
 	return dst_output(net, sk, skb);
 }
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv6/route.c linux-libre-4.14.106-gnu/net/ipv6/route.c
--- linux-libre-4.14.105-gnu/net/ipv6/route.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv6/route.c	2019-03-13 17:03:24.000000000 -0400
@@ -3024,6 +3024,10 @@ static int rtm_to_fib6_config(struct sk_
 		cfg->fc_gateway = nla_get_in6_addr(tb[RTA_GATEWAY]);
 		cfg->fc_flags |= RTF_GATEWAY;
 	}
+	if (tb[RTA_VIA]) {
+		NL_SET_ERR_MSG(extack, "IPv6 does not support RTA_VIA attribute");
+		goto errout;
+	}
 
 	if (tb[RTA_DST]) {
 		int plen = (rtm->rtm_dst_len + 7) >> 3;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/ipv6/sit.c linux-libre-4.14.106-gnu/net/ipv6/sit.c
--- linux-libre-4.14.105-gnu/net/ipv6/sit.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/ipv6/sit.c	2019-03-13 17:03:24.000000000 -0400
@@ -1856,6 +1856,7 @@ static int __net_init sit_init_net(struc
 
 err_reg_dev:
 	ipip6_dev_free(sitn->fb_tunnel_dev);
+	free_netdev(sitn->fb_tunnel_dev);
 err_alloc_dev:
 	return err;
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/mpls/af_mpls.c linux-libre-4.14.106-gnu/net/mpls/af_mpls.c
--- linux-libre-4.14.105-gnu/net/mpls/af_mpls.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/mpls/af_mpls.c	2019-03-13 17:03:24.000000000 -0400
@@ -1787,6 +1787,9 @@ static int rtm_to_route_config(struct sk
 				goto errout;
 			break;
 		}
+		case RTA_GATEWAY:
+			NL_SET_ERR_MSG(extack, "MPLS does not support RTA_GATEWAY attribute");
+			goto errout;
 		case RTA_VIA:
 		{
 			if (nla_get_via(nla, &cfg->rc_via_alen,
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/netfilter/ipvs/ip_vs_ctl.c linux-libre-4.14.106-gnu/net/netfilter/ipvs/ip_vs_ctl.c
--- linux-libre-4.14.105-gnu/net/netfilter/ipvs/ip_vs_ctl.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/netfilter/ipvs/ip_vs_ctl.c	2019-03-13 17:03:24.000000000 -0400
@@ -2253,6 +2253,18 @@ static int ip_vs_set_timeout(struct netn
 		  u->udp_timeout);
 
 #ifdef CONFIG_IP_VS_PROTO_TCP
+	if (u->tcp_timeout < 0 || u->tcp_timeout > (INT_MAX / HZ) ||
+	    u->tcp_fin_timeout < 0 || u->tcp_fin_timeout > (INT_MAX / HZ)) {
+		return -EINVAL;
+	}
+#endif
+
+#ifdef CONFIG_IP_VS_PROTO_UDP
+	if (u->udp_timeout < 0 || u->udp_timeout > (INT_MAX / HZ))
+		return -EINVAL;
+#endif
+
+#ifdef CONFIG_IP_VS_PROTO_TCP
 	if (u->tcp_timeout) {
 		pd = ip_vs_proto_data_get(ipvs, IPPROTO_TCP);
 		pd->timeout_table[IP_VS_TCP_S_ESTABLISHED]
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/netfilter/nf_conntrack_core.c linux-libre-4.14.106-gnu/net/netfilter/nf_conntrack_core.c
--- linux-libre-4.14.105-gnu/net/netfilter/nf_conntrack_core.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/netfilter/nf_conntrack_core.c	2019-03-13 17:03:24.000000000 -0400
@@ -869,6 +869,22 @@ nf_conntrack_tuple_taken(const struct nf
 		}
 
 		if (nf_ct_key_equal(h, tuple, zone, net)) {
+			/* Tuple is taken already, so caller will need to find
+			 * a new source port to use.
+			 *
+			 * Only exception:
+			 * If the *original tuples* are identical, then both
+			 * conntracks refer to the same flow.
+			 * This is a rare situation, it can occur e.g. when
+			 * more than one UDP packet is sent from same socket
+			 * in different threads.
+			 *
+			 * Let nf_ct_resolve_clash() deal with this later.
+			 */
+			if (nf_ct_tuple_equal(&ignored_conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
+					      &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple))
+				continue;
+
 			NF_CT_STAT_INC_ATOMIC(net, found);
 			rcu_read_unlock();
 			return 1;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/netlabel/netlabel_kapi.c linux-libre-4.14.106-gnu/net/netlabel/netlabel_kapi.c
--- linux-libre-4.14.105-gnu/net/netlabel/netlabel_kapi.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/netlabel/netlabel_kapi.c	2019-03-13 17:03:24.000000000 -0400
@@ -903,7 +903,8 @@ int netlbl_bitmap_walk(const unsigned ch
 		    (state == 0 && (byte & bitmask) == 0))
 			return bit_spot;
 
-		bit_spot++;
+		if (++bit_spot >= bitmap_len)
+			return -1;
 		bitmask >>= 1;
 		if (bitmask == 0) {
 			byte = bitmap[++byte_offset];
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/nfc/llcp_commands.c linux-libre-4.14.106-gnu/net/nfc/llcp_commands.c
--- linux-libre-4.14.105-gnu/net/nfc/llcp_commands.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/nfc/llcp_commands.c	2019-03-13 17:03:24.000000000 -0400
@@ -419,6 +419,10 @@ int nfc_llcp_send_connect(struct nfc_llc
 						      sock->service_name,
 						      sock->service_name_len,
 						      &service_name_tlv_length);
+		if (!service_name_tlv) {
+			err = -ENOMEM;
+			goto error_tlv;
+		}
 		size += service_name_tlv_length;
 	}
 
@@ -429,9 +433,17 @@ int nfc_llcp_send_connect(struct nfc_llc
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
 				      &miux_tlv_length);
+	if (!miux_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += miux_tlv_length;
 
 	rw_tlv = nfc_llcp_build_tlv(LLCP_TLV_RW, &rw, 0, &rw_tlv_length);
+	if (!rw_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += rw_tlv_length;
 
 	pr_debug("SKB size %d SN length %zu\n", size, sock->service_name_len);
@@ -484,9 +496,17 @@ int nfc_llcp_send_cc(struct nfc_llcp_soc
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
 				      &miux_tlv_length);
+	if (!miux_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += miux_tlv_length;
 
 	rw_tlv = nfc_llcp_build_tlv(LLCP_TLV_RW, &rw, 0, &rw_tlv_length);
+	if (!rw_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += rw_tlv_length;
 
 	skb = llcp_allocate_pdu(sock, LLCP_PDU_CC, size);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/nfc/llcp_core.c linux-libre-4.14.106-gnu/net/nfc/llcp_core.c
--- linux-libre-4.14.105-gnu/net/nfc/llcp_core.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/nfc/llcp_core.c	2019-03-13 17:03:24.000000000 -0400
@@ -532,10 +532,10 @@ static u8 nfc_llcp_reserve_sdp_ssap(stru
 
 static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
 {
-	u8 *gb_cur, *version_tlv, version, version_length;
-	u8 *lto_tlv, lto_length;
-	u8 *wks_tlv, wks_length;
-	u8 *miux_tlv, miux_length;
+	u8 *gb_cur, version, version_length;
+	u8 lto_length, wks_length, miux_length;
+	u8 *version_tlv = NULL, *lto_tlv = NULL,
+	   *wks_tlv = NULL, *miux_tlv = NULL;
 	__be16 wks = cpu_to_be16(local->local_wks);
 	u8 gb_len = 0;
 	int ret = 0;
@@ -543,17 +543,33 @@ static int nfc_llcp_build_gb(struct nfc_
 	version = LLCP_VERSION_11;
 	version_tlv = nfc_llcp_build_tlv(LLCP_TLV_VERSION, &version,
 					 1, &version_length);
+	if (!version_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += version_length;
 
 	lto_tlv = nfc_llcp_build_tlv(LLCP_TLV_LTO, &local->lto, 1, &lto_length);
+	if (!lto_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += lto_length;
 
 	pr_debug("Local wks 0x%lx\n", local->local_wks);
 	wks_tlv = nfc_llcp_build_tlv(LLCP_TLV_WKS, (u8 *)&wks, 2, &wks_length);
+	if (!wks_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += wks_length;
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&local->miux, 0,
 				      &miux_length);
+	if (!miux_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += miux_length;
 
 	gb_len += ARRAY_SIZE(llcp_magic);
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/sched/sch_netem.c linux-libre-4.14.106-gnu/net/sched/sch_netem.c
--- linux-libre-4.14.105-gnu/net/sched/sch_netem.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/sched/sch_netem.c	2019-03-13 17:03:24.000000000 -0400
@@ -435,6 +435,7 @@ static int netem_enqueue(struct sk_buff
 	int nb = 0;
 	int count = 1;
 	int rc = NET_XMIT_SUCCESS;
+	int rc_drop = NET_XMIT_DROP;
 
 	/* Do not fool qdisc_drop_all() */
 	skb->prev = NULL;
@@ -474,6 +475,7 @@ static int netem_enqueue(struct sk_buff
 		q->duplicate = 0;
 		rootq->enqueue(skb2, rootq, to_free);
 		q->duplicate = dupsave;
+		rc_drop = NET_XMIT_SUCCESS;
 	}
 
 	/*
@@ -486,7 +488,7 @@ static int netem_enqueue(struct sk_buff
 		if (skb_is_gso(skb)) {
 			segs = netem_segment(skb, sch, to_free);
 			if (!segs)
-				return NET_XMIT_DROP;
+				return rc_drop;
 		} else {
 			segs = skb;
 		}
@@ -509,8 +511,10 @@ static int netem_enqueue(struct sk_buff
 			1<<(prandom_u32() % 8);
 	}
 
-	if (unlikely(sch->q.qlen >= sch->limit))
-		return qdisc_drop_all(skb, sch, to_free);
+	if (unlikely(sch->q.qlen >= sch->limit)) {
+		qdisc_drop_all(skb, sch, to_free);
+		return rc_drop;
+	}
 
 	qdisc_qstats_backlog_inc(sch, skb);
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/socket.c linux-libre-4.14.106-gnu/net/socket.c
--- linux-libre-4.14.105-gnu/net/socket.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/socket.c	2019-03-13 17:03:24.000000000 -0400
@@ -600,6 +600,7 @@ static void __sock_release(struct socket
 		if (inode)
 			inode_lock(inode);
 		sock->ops->release(sock);
+		sock->sk = NULL;
 		if (inode)
 			inode_unlock(inode);
 		sock->ops = NULL;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/tipc/socket.c linux-libre-4.14.106-gnu/net/tipc/socket.c
--- linux-libre-4.14.105-gnu/net/tipc/socket.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/tipc/socket.c	2019-03-13 17:03:24.000000000 -0400
@@ -943,7 +943,7 @@ static int __tipc_sendmsg(struct socket
 
 	if (unlikely(!dest)) {
 		dest = &tsk->peer;
-		if (!syn || dest->family != AF_TIPC)
+		if (!syn && dest->family != AF_TIPC)
 			return -EDESTADDRREQ;
 	}
 
diff -druNp --no-dereference linux-libre-4.14.105-gnu/net/vmw_vsock/virtio_transport.c linux-libre-4.14.106-gnu/net/vmw_vsock/virtio_transport.c
--- linux-libre-4.14.105-gnu/net/vmw_vsock/virtio_transport.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/net/vmw_vsock/virtio_transport.c	2019-03-13 17:03:24.000000000 -0400
@@ -75,6 +75,9 @@ static u32 virtio_transport_get_local_ci
 {
 	struct virtio_vsock *vsock = virtio_vsock_get();
 
+	if (!vsock)
+		return VMADDR_CID_ANY;
+
 	return vsock->guest_cid;
 }
 
@@ -584,10 +587,6 @@ static int virtio_vsock_probe(struct vir
 
 	virtio_vsock_update_guest_cid(vsock);
 
-	ret = vsock_core_init(&virtio_transport.transport);
-	if (ret < 0)
-		goto out_vqs;
-
 	vsock->rx_buf_nr = 0;
 	vsock->rx_buf_max_nr = 0;
 	atomic_set(&vsock->queued_replies, 0);
@@ -618,8 +617,6 @@ static int virtio_vsock_probe(struct vir
 	mutex_unlock(&the_virtio_vsock_mutex);
 	return 0;
 
-out_vqs:
-	vsock->vdev->config->del_vqs(vsock->vdev);
 out:
 	kfree(vsock);
 	mutex_unlock(&the_virtio_vsock_mutex);
@@ -637,6 +634,9 @@ static void virtio_vsock_remove(struct v
 	flush_work(&vsock->event_work);
 	flush_work(&vsock->send_pkt_work);
 
+	/* Reset all connected sockets when the device disappear */
+	vsock_for_each_connected_socket(virtio_vsock_reset_sock);
+
 	vdev->config->reset(vdev);
 
 	mutex_lock(&vsock->rx_lock);
@@ -669,7 +669,6 @@ static void virtio_vsock_remove(struct v
 
 	mutex_lock(&the_virtio_vsock_mutex);
 	the_virtio_vsock = NULL;
-	vsock_core_exit();
 	mutex_unlock(&the_virtio_vsock_mutex);
 
 	vdev->config->del_vqs(vdev);
@@ -702,14 +701,28 @@ static int __init virtio_vsock_init(void
 	virtio_vsock_workqueue = alloc_workqueue("virtio_vsock", 0, 0);
 	if (!virtio_vsock_workqueue)
 		return -ENOMEM;
+
 	ret = register_virtio_driver(&virtio_vsock_driver);
 	if (ret)
-		destroy_workqueue(virtio_vsock_workqueue);
+		goto out_wq;
+
+	ret = vsock_core_init(&virtio_transport.transport);
+	if (ret)
+		goto out_vdr;
+
+	return 0;
+
+out_vdr:
+	unregister_virtio_driver(&virtio_vsock_driver);
+out_wq:
+	destroy_workqueue(virtio_vsock_workqueue);
 	return ret;
+
 }
 
 static void __exit virtio_vsock_exit(void)
 {
+	vsock_core_exit();
 	unregister_virtio_driver(&virtio_vsock_driver);
 	destroy_workqueue(virtio_vsock_workqueue);
 }
diff -druNp --no-dereference linux-libre-4.14.105-gnu/security/apparmor/domain.c linux-libre-4.14.106-gnu/security/apparmor/domain.c
--- linux-libre-4.14.105-gnu/security/apparmor/domain.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/security/apparmor/domain.c	2019-03-13 17:03:24.000000000 -0400
@@ -1260,7 +1260,10 @@ check:
 					aa_get_label(&profile->label));
 		if (IS_ERR_OR_NULL(new)) {
 			info = "failed to build target label";
-			error = PTR_ERR(new);
+			if (!new)
+				error = -ENOMEM;
+			else
+				error = PTR_ERR(new);
 			new = NULL;
 			perms.allow = 0;
 			goto audit;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/perf/builtin-trace.c linux-libre-4.14.106-gnu/tools/perf/builtin-trace.c
--- linux-libre-4.14.105-gnu/tools/perf/builtin-trace.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/perf/builtin-trace.c	2019-03-13 17:03:24.000000000 -0400
@@ -2109,19 +2109,30 @@ static size_t trace__fprintf_thread_summ
 
 static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
 {
-	struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname");
+	bool found = false;
+	struct perf_evsel *evsel, *tmp;
+	struct parse_events_error err = { .idx = 0, };
+	int ret = parse_events(evlist, "probe:vfs_getname*", &err);
 
-	if (IS_ERR(evsel))
+	if (ret)
 		return false;
 
-	if (perf_evsel__field(evsel, "pathname") == NULL) {
+	evlist__for_each_entry_safe(evlist, evsel, tmp) {
+		if (!strstarts(perf_evsel__name(evsel), "probe:vfs_getname"))
+			continue;
+
+		if (perf_evsel__field(evsel, "pathname")) {
+			evsel->handler = trace__vfs_getname;
+			found = true;
+			continue;
+		}
+
+		list_del_init(&evsel->node);
+		evsel->evlist = NULL;
 		perf_evsel__delete(evsel);
-		return false;
 	}
 
-	evsel->handler = trace__vfs_getname;
-	perf_evlist__add(evlist, evsel);
-	return true;
+	return found;
 }
 
 static struct perf_evsel *perf_evsel__new_pgfault(u64 config)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/perf/util/cpumap.c linux-libre-4.14.106-gnu/tools/perf/util/cpumap.c
--- linux-libre-4.14.105-gnu/tools/perf/util/cpumap.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/perf/util/cpumap.c	2019-03-13 17:03:24.000000000 -0400
@@ -134,7 +134,12 @@ struct cpu_map *cpu_map__new(const char
 	if (!cpu_list)
 		return cpu_map__read_all_cpu_map();
 
-	if (!isdigit(*cpu_list))
+	/*
+	 * must handle the case of empty cpumap to cover
+	 * TOPOLOGY header for NUMA nodes with no CPU
+	 * ( e.g., because of CPU hotplug)
+	 */
+	if (!isdigit(*cpu_list) && *cpu_list != '\0')
 		goto out;
 
 	while (isdigit(*cpu_list)) {
@@ -181,8 +186,10 @@ struct cpu_map *cpu_map__new(const char
 
 	if (nr_cpus > 0)
 		cpus = cpu_map__trim_new(nr_cpus, tmp_cpus);
-	else
+	else if (*cpu_list != '\0')
 		cpus = cpu_map__default_new();
+	else
+		cpus = cpu_map__dummy_new();
 invalid:
 	free(tmp_cpus);
 out:
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/perf/util/symbol-elf.c linux-libre-4.14.106-gnu/tools/perf/util/symbol-elf.c
--- linux-libre-4.14.105-gnu/tools/perf/util/symbol-elf.c	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/perf/util/symbol-elf.c	2019-03-13 17:03:24.000000000 -0400
@@ -87,6 +87,11 @@ static inline uint8_t elf_sym__type(cons
 	return GELF_ST_TYPE(sym->st_info);
 }
 
+static inline uint8_t elf_sym__visibility(const GElf_Sym *sym)
+{
+	return GELF_ST_VISIBILITY(sym->st_other);
+}
+
 #ifndef STT_GNU_IFUNC
 #define STT_GNU_IFUNC 10
 #endif
@@ -111,7 +116,9 @@ static inline int elf_sym__is_label(cons
 	return elf_sym__type(sym) == STT_NOTYPE &&
 		sym->st_name != 0 &&
 		sym->st_shndx != SHN_UNDEF &&
-		sym->st_shndx != SHN_ABS;
+		sym->st_shndx != SHN_ABS &&
+		elf_sym__visibility(sym) != STV_HIDDEN &&
+		elf_sym__visibility(sym) != STV_INTERNAL;
 }
 
 static bool elf_sym__is_a(GElf_Sym *sym, enum map_type type)
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/bpf/bpf_util.h linux-libre-4.14.106-gnu/tools/testing/selftests/bpf/bpf_util.h
--- linux-libre-4.14.105-gnu/tools/testing/selftests/bpf/bpf_util.h	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/bpf/bpf_util.h	2019-03-13 17:03:24.000000000 -0400
@@ -13,7 +13,7 @@ static inline unsigned int bpf_num_possi
 	unsigned int start, end, possible_cpus = 0;
 	char buff[128];
 	FILE *fp;
-	int n;
+	int len, n, i, j = 0;
 
 	fp = fopen(fcpu, "r");
 	if (!fp) {
@@ -21,17 +21,27 @@ static inline unsigned int bpf_num_possi
 		exit(1);
 	}
 
-	while (fgets(buff, sizeof(buff), fp)) {
-		n = sscanf(buff, "%u-%u", &start, &end);
-		if (n == 0) {
-			printf("Failed to retrieve # possible CPUs!\n");
-			exit(1);
-		} else if (n == 1) {
-			end = start;
+	if (!fgets(buff, sizeof(buff), fp)) {
+		printf("Failed to read %s!\n", fcpu);
+		exit(1);
+	}
+
+	len = strlen(buff);
+	for (i = 0; i <= len; i++) {
+		if (buff[i] == ',' || buff[i] == '\0') {
+			buff[i] = '\0';
+			n = sscanf(&buff[j], "%u-%u", &start, &end);
+			if (n <= 0) {
+				printf("Failed to retrieve # possible CPUs!\n");
+				exit(1);
+			} else if (n == 1) {
+				end = start;
+			}
+			possible_cpus += end - start + 1;
+			j = i + 1;
 		}
-		possible_cpus = start == 0 ? end + 1 : 0;
-		break;
 	}
+
 	fclose(fp);
 
 	return possible_cpus;
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh linux-libre-4.14.106-gnu/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
--- linux-libre-4.14.105-gnu/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh	2019-03-13 17:03:24.000000000 -0400
@@ -35,6 +35,10 @@ prerequisite()
 		exit 0
 	fi
 
+	present_cpus=`cat $SYSFS/devices/system/cpu/present`
+	present_max=${present_cpus##*-}
+	echo "present_cpus = $present_cpus present_max = $present_max"
+
 	echo -e "\t Cpus in online state: $online_cpus"
 
 	offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
@@ -149,6 +153,8 @@ online_cpus=0
 online_max=0
 offline_cpus=0
 offline_max=0
+present_cpus=0
+present_max=0
 
 while getopts e:ahp: opt; do
 	case $opt in
@@ -188,9 +194,10 @@ if [ $allcpus -eq 0 ]; then
 	online_cpu_expect_success $online_max
 
 	if [[ $offline_cpus -gt 0 ]]; then
-		echo -e "\t offline to online to offline: cpu $offline_max"
-		online_cpu_expect_success $offline_max
-		offline_cpu_expect_success $offline_max
+		echo -e "\t offline to online to offline: cpu $present_max"
+		online_cpu_expect_success $present_max
+		offline_cpu_expect_success $present_max
+		online_cpu $present_max
 	fi
 	exit 0
 else
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/config linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/config
--- linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/config	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/config	2019-03-13 17:03:24.000000000 -0400
@@ -1,2 +1,2 @@
 CONFIG_NET_NS=y
-NF_TABLES_INET=y
+CONFIG_NF_TABLES_INET=y
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/Makefile linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/Makefile
--- linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/Makefile	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/Makefile	2019-03-13 17:03:24.000000000 -0400
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for netfilter selftests
 
-TEST_PROGS := nft_trans_stress.sh
+TEST_PROGS := nft_trans_stress.sh nft_nat.sh
 
 include ../lib.mk
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/nft_nat.sh linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/nft_nat.sh
--- linux-libre-4.14.105-gnu/tools/testing/selftests/netfilter/nft_nat.sh	1969-12-31 19:00:00.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/netfilter/nft_nat.sh	2019-03-13 17:03:24.000000000 -0400
@@ -0,0 +1,762 @@
+#!/bin/bash
+#
+# This test is for basic NAT functionality: snat, dnat, redirect, masquerade.
+#
+
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+ret=0
+
+nft --version > /dev/null 2>&1
+if [ $? -ne 0 ];then
+	echo "SKIP: Could not run test without nft tool"
+	exit $ksft_skip
+fi
+
+ip -Version > /dev/null 2>&1
+if [ $? -ne 0 ];then
+	echo "SKIP: Could not run test without ip tool"
+	exit $ksft_skip
+fi
+
+ip netns add ns0
+ip netns add ns1
+ip netns add ns2
+
+ip link add veth0 netns ns0 type veth peer name eth0 netns ns1
+ip link add veth1 netns ns0 type veth peer name eth0 netns ns2
+
+ip -net ns0 link set lo up
+ip -net ns0 link set veth0 up
+ip -net ns0 addr add 10.0.1.1/24 dev veth0
+ip -net ns0 addr add dead:1::1/64 dev veth0
+
+ip -net ns0 link set veth1 up
+ip -net ns0 addr add 10.0.2.1/24 dev veth1
+ip -net ns0 addr add dead:2::1/64 dev veth1
+
+for i in 1 2; do
+  ip -net ns$i link set lo up
+  ip -net ns$i link set eth0 up
+  ip -net ns$i addr add 10.0.$i.99/24 dev eth0
+  ip -net ns$i route add default via 10.0.$i.1
+  ip -net ns$i addr add dead:$i::99/64 dev eth0
+  ip -net ns$i route add default via dead:$i::1
+done
+
+bad_counter()
+{
+	local ns=$1
+	local counter=$2
+	local expect=$3
+
+	echo "ERROR: $counter counter in $ns has unexpected value (expected $expect)" 1>&2
+	ip netns exec $ns nft list counter inet filter $counter 1>&2
+}
+
+check_counters()
+{
+	ns=$1
+	local lret=0
+
+	cnt=$(ip netns exec $ns nft list counter inet filter ns0in | grep -q "packets 1 bytes 84")
+	if [ $? -ne 0 ]; then
+		bad_counter $ns ns0in "packets 1 bytes 84"
+		lret=1
+	fi
+	cnt=$(ip netns exec $ns nft list counter inet filter ns0out | grep -q "packets 1 bytes 84")
+	if [ $? -ne 0 ]; then
+		bad_counter $ns ns0out "packets 1 bytes 84"
+		lret=1
+	fi
+
+	expect="packets 1 bytes 104"
+	cnt=$(ip netns exec $ns nft list counter inet filter ns0in6 | grep -q "$expect")
+	if [ $? -ne 0 ]; then
+		bad_counter $ns ns0in6 "$expect"
+		lret=1
+	fi
+	cnt=$(ip netns exec $ns nft list counter inet filter ns0out6 | grep -q "$expect")
+	if [ $? -ne 0 ]; then
+		bad_counter $ns ns0out6 "$expect"
+		lret=1
+	fi
+
+	return $lret
+}
+
+check_ns0_counters()
+{
+	local ns=$1
+	local lret=0
+
+	cnt=$(ip netns exec ns0 nft list counter inet filter ns0in | grep -q "packets 0 bytes 0")
+	if [ $? -ne 0 ]; then
+		bad_counter ns0 ns0in "packets 0 bytes 0"
+		lret=1
+	fi
+
+	cnt=$(ip netns exec ns0 nft list counter inet filter ns0in6 | grep -q "packets 0 bytes 0")
+	if [ $? -ne 0 ]; then
+		bad_counter ns0 ns0in6 "packets 0 bytes 0"
+		lret=1
+	fi
+
+	cnt=$(ip netns exec ns0 nft list counter inet filter ns0out | grep -q "packets 0 bytes 0")
+	if [ $? -ne 0 ]; then
+		bad_counter ns0 ns0out "packets 0 bytes 0"
+		lret=1
+	fi
+	cnt=$(ip netns exec ns0 nft list counter inet filter ns0out6 | grep -q "packets 0 bytes 0")
+	if [ $? -ne 0 ]; then
+		bad_counter ns0 ns0out6 "packets 0 bytes 0"
+		lret=1
+	fi
+
+	for dir in "in" "out" ; do
+		expect="packets 1 bytes 84"
+		cnt=$(ip netns exec ns0 nft list counter inet filter ${ns}${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 $ns$dir "$expect"
+			lret=1
+		fi
+
+		expect="packets 1 bytes 104"
+		cnt=$(ip netns exec ns0 nft list counter inet filter ${ns}${dir}6 | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 $ns$dir6 "$expect"
+			lret=1
+		fi
+	done
+
+	return $lret
+}
+
+reset_counters()
+{
+	for i in 0 1 2;do
+		ip netns exec ns$i nft reset counters inet > /dev/null
+	done
+}
+
+test_local_dnat6()
+{
+	local lret=0
+ip netns exec ns0 nft -f - <<EOF
+table ip6 nat {
+	chain output {
+		type nat hook output priority 0; policy accept;
+		ip6 daddr dead:1::99 dnat to dead:2::99
+	}
+}
+EOF
+	if [ $? -ne 0 ]; then
+		echo "SKIP: Could not add add ip6 dnat hook"
+		return $ksft_skip
+	fi
+
+	# ping netns1, expect rewrite to netns2
+	ip netns exec ns0 ping -q -c 1 dead:1::99 > /dev/null
+	if [ $? -ne 0 ]; then
+		lret=1
+		echo "ERROR: ping6 failed"
+		return $lret
+	fi
+
+	expect="packets 0 bytes 0"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns2$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 0 count in ns1
+	expect="packets 0 bytes 0"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 1 packet in ns2
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	test $lret -eq 0 && echo "PASS: ipv6 ping to ns1 was NATted to ns2"
+	ip netns exec ns0 nft flush chain ip6 nat output
+
+	return $lret
+}
+
+test_local_dnat()
+{
+	local lret=0
+ip netns exec ns0 nft -f - <<EOF
+table ip nat {
+	chain output {
+		type nat hook output priority 0; policy accept;
+		ip daddr 10.0.1.99 dnat to 10.0.2.99
+	}
+}
+EOF
+	# ping netns1, expect rewrite to netns2
+	ip netns exec ns0 ping -q -c 1 10.0.1.99 > /dev/null
+	if [ $? -ne 0 ]; then
+		lret=1
+		echo "ERROR: ping failed"
+		return $lret
+	fi
+
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns2$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 0 count in ns1
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 1 packet in ns2
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	test $lret -eq 0 && echo "PASS: ping to ns1 was NATted to ns2"
+
+	ip netns exec ns0 nft flush chain ip nat output
+
+	reset_counters
+	ip netns exec ns0 ping -q -c 1 10.0.1.99 > /dev/null
+	if [ $? -ne 0 ]; then
+		lret=1
+		echo "ERROR: ping failed"
+		return $lret
+	fi
+
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns2$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 1 count in ns1
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns0 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# expect 0 packet in ns2
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns2$dir "$expect"
+			lret=1
+		fi
+	done
+
+	test $lret -eq 0 && echo "PASS: ping to ns1 OK after nat output chain flush"
+
+	return $lret
+}
+
+
+test_masquerade6()
+{
+	local lret=0
+
+	ip netns exec ns0 sysctl net.ipv6.conf.all.forwarding=1 > /dev/null
+
+	ip netns exec ns2 ping -q -c 1 dead:1::99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2 via ipv6"
+		return 1
+		lret=1
+	fi
+
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns2$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	reset_counters
+
+# add masquerading rule
+ip netns exec ns0 nft -f - <<EOF
+table ip6 nat {
+	chain postrouting {
+		type nat hook postrouting priority 0; policy accept;
+		meta oif veth0 masquerade
+	}
+}
+EOF
+	ip netns exec ns2 ping -q -c 1 dead:1::99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2 with active ipv6 masquerading"
+		lret=1
+	fi
+
+	# ns1 should have seen packets from ns0, due to masquerade
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# ns1 should not have seen packets from ns2, due to masquerade
+	expect="packets 0 bytes 0"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	ip netns exec ns0 nft flush chain ip6 nat postrouting
+	if [ $? -ne 0 ]; then
+		echo "ERROR: Could not flush ip6 nat postrouting" 1>&2
+		lret=1
+	fi
+
+	test $lret -eq 0 && echo "PASS: IPv6 masquerade for ns2"
+
+	return $lret
+}
+
+test_masquerade()
+{
+	local lret=0
+
+	ip netns exec ns0 sysctl net.ipv4.conf.veth0.forwarding=1 > /dev/null
+	ip netns exec ns0 sysctl net.ipv4.conf.veth1.forwarding=1 > /dev/null
+
+	ip netns exec ns2 ping -q -c 1 10.0.1.99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: canot ping ns1 from ns2"
+		lret=1
+	fi
+
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns2$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	reset_counters
+
+# add masquerading rule
+ip netns exec ns0 nft -f - <<EOF
+table ip nat {
+	chain postrouting {
+		type nat hook postrouting priority 0; policy accept;
+		meta oif veth0 masquerade
+	}
+}
+EOF
+	ip netns exec ns2 ping -q -c 1 10.0.1.99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2 with active ip masquerading"
+		lret=1
+	fi
+
+	# ns1 should have seen packets from ns0, due to masquerade
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns0${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# ns1 should not have seen packets from ns2, due to masquerade
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	ip netns exec ns0 nft flush chain ip nat postrouting
+	if [ $? -ne 0 ]; then
+		echo "ERROR: Could not flush nat postrouting" 1>&2
+		lret=1
+	fi
+
+	test $lret -eq 0 && echo "PASS: IP masquerade for ns2"
+
+	return $lret
+}
+
+test_redirect6()
+{
+	local lret=0
+
+	ip netns exec ns0 sysctl net.ipv6.conf.all.forwarding=1 > /dev/null
+
+	ip netns exec ns2 ping -q -c 1 dead:1::99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannnot ping ns1 from ns2 via ipv6"
+		lret=1
+	fi
+
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns2$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	reset_counters
+
+# add redirect rule
+ip netns exec ns0 nft -f - <<EOF
+table ip6 nat {
+	chain prerouting {
+		type nat hook prerouting priority 0; policy accept;
+		meta iif veth1 meta l4proto icmpv6 ip6 saddr dead:2::99 ip6 daddr dead:1::99 redirect
+	}
+}
+EOF
+	ip netns exec ns2 ping -q -c 1 dead:1::99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2 with active ip6 redirect"
+		lret=1
+	fi
+
+	# ns1 should have seen no packets from ns2, due to redirection
+	expect="packets 0 bytes 0"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# ns0 should have seen packets from ns2, due to masquerade
+	expect="packets 1 bytes 104"
+	for dir in "in6" "out6" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	ip netns exec ns0 nft delete table ip6 nat
+	if [ $? -ne 0 ]; then
+		echo "ERROR: Could not delete ip6 nat table" 1>&2
+		lret=1
+	fi
+
+	test $lret -eq 0 && echo "PASS: IPv6 redirection for ns2"
+
+	return $lret
+}
+
+test_redirect()
+{
+	local lret=0
+
+	ip netns exec ns0 sysctl net.ipv4.conf.veth0.forwarding=1 > /dev/null
+	ip netns exec ns0 sysctl net.ipv4.conf.veth1.forwarding=1 > /dev/null
+
+	ip netns exec ns2 ping -q -c 1 10.0.1.99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2"
+		lret=1
+	fi
+
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns2$dir "$expect"
+			lret=1
+		fi
+
+		cnt=$(ip netns exec ns2 nft list counter inet filter ns1${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns2 ns1$dir "$expect"
+			lret=1
+		fi
+	done
+
+	reset_counters
+
+# add redirect rule
+ip netns exec ns0 nft -f - <<EOF
+table ip nat {
+	chain prerouting {
+		type nat hook prerouting priority 0; policy accept;
+		meta iif veth1 ip protocol icmp ip saddr 10.0.2.99 ip daddr 10.0.1.99 redirect
+	}
+}
+EOF
+	ip netns exec ns2 ping -q -c 1 10.0.1.99 > /dev/null # ping ns2->ns1
+	if [ $? -ne 0 ] ; then
+		echo "ERROR: cannot ping ns1 from ns2 with active ip redirect"
+		lret=1
+	fi
+
+	# ns1 should have seen no packets from ns2, due to redirection
+	expect="packets 0 bytes 0"
+	for dir in "in" "out" ; do
+
+		cnt=$(ip netns exec ns1 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	# ns0 should have seen packets from ns2, due to masquerade
+	expect="packets 1 bytes 84"
+	for dir in "in" "out" ; do
+		cnt=$(ip netns exec ns0 nft list counter inet filter ns2${dir} | grep -q "$expect")
+		if [ $? -ne 0 ]; then
+			bad_counter ns1 ns0$dir "$expect"
+			lret=1
+		fi
+	done
+
+	ip netns exec ns0 nft delete table ip nat
+	if [ $? -ne 0 ]; then
+		echo "ERROR: Could not delete nat table" 1>&2
+		lret=1
+	fi
+
+	test $lret -eq 0 && echo "PASS: IP redirection for ns2"
+
+	return $lret
+}
+
+
+# ip netns exec ns0 ping -c 1 -q 10.0.$i.99
+for i in 0 1 2; do
+ip netns exec ns$i nft -f - <<EOF
+table inet filter {
+	counter ns0in {}
+	counter ns1in {}
+	counter ns2in {}
+
+	counter ns0out {}
+	counter ns1out {}
+	counter ns2out {}
+
+	counter ns0in6 {}
+	counter ns1in6 {}
+	counter ns2in6 {}
+
+	counter ns0out6 {}
+	counter ns1out6 {}
+	counter ns2out6 {}
+
+	map nsincounter {
+		type ipv4_addr : counter
+		elements = { 10.0.1.1 : "ns0in",
+			     10.0.2.1 : "ns0in",
+			     10.0.1.99 : "ns1in",
+			     10.0.2.99 : "ns2in" }
+	}
+
+	map nsincounter6 {
+		type ipv6_addr : counter
+		elements = { dead:1::1 : "ns0in6",
+			     dead:2::1 : "ns0in6",
+			     dead:1::99 : "ns1in6",
+			     dead:2::99 : "ns2in6" }
+	}
+
+	map nsoutcounter {
+		type ipv4_addr : counter
+		elements = { 10.0.1.1 : "ns0out",
+			     10.0.2.1 : "ns0out",
+			     10.0.1.99: "ns1out",
+			     10.0.2.99: "ns2out" }
+	}
+
+	map nsoutcounter6 {
+		type ipv6_addr : counter
+		elements = { dead:1::1 : "ns0out6",
+			     dead:2::1 : "ns0out6",
+			     dead:1::99 : "ns1out6",
+			     dead:2::99 : "ns2out6" }
+	}
+
+	chain input {
+		type filter hook input priority 0; policy accept;
+		counter name ip saddr map @nsincounter
+		icmpv6 type { "echo-request", "echo-reply" } counter name ip6 saddr map @nsincounter6
+	}
+	chain output {
+		type filter hook output priority 0; policy accept;
+		counter name ip daddr map @nsoutcounter
+		icmpv6 type { "echo-request", "echo-reply" } counter name ip6 daddr map @nsoutcounter6
+	}
+}
+EOF
+done
+
+sleep 3
+# test basic connectivity
+for i in 1 2; do
+  ip netns exec ns0 ping -c 1 -q 10.0.$i.99 > /dev/null
+  if [ $? -ne 0 ];then
+  	echo "ERROR: Could not reach other namespace(s)" 1>&2
+	ret=1
+  fi
+
+  ip netns exec ns0 ping -c 1 -q dead:$i::99 > /dev/null
+  if [ $? -ne 0 ];then
+	echo "ERROR: Could not reach other namespace(s) via ipv6" 1>&2
+	ret=1
+  fi
+  check_counters ns$i
+  if [ $? -ne 0 ]; then
+	ret=1
+  fi
+
+  check_ns0_counters ns$i
+  if [ $? -ne 0 ]; then
+	ret=1
+  fi
+  reset_counters
+done
+
+if [ $ret -eq 0 ];then
+	echo "PASS: netns routing/connectivity: ns0 can reach ns1 and ns2"
+fi
+
+reset_counters
+test_local_dnat
+test_local_dnat6
+
+reset_counters
+test_masquerade
+test_masquerade6
+
+reset_counters
+test_redirect
+test_redirect6
+
+for i in 0 1 2; do ip netns del ns$i;done
+
+exit $ret
diff -druNp --no-dereference linux-libre-4.14.105-gnu/tools/testing/selftests/timers/Makefile linux-libre-4.14.106-gnu/tools/testing/selftests/timers/Makefile
--- linux-libre-4.14.105-gnu/tools/testing/selftests/timers/Makefile	2019-03-05 11:58:03.000000000 -0500
+++ linux-libre-4.14.106-gnu/tools/testing/selftests/timers/Makefile	2019-03-13 17:03:24.000000000 -0400
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O3 -Wl,-no-as-needed -Wall
-LDFLAGS += -lrt -lpthread -lm
+LDLIBS += -lrt -lpthread -lm
 
 # these are all "safe" tests that don't modify
 # system time or require escalated privileges
