diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/arm64/boot/dts/exynos/exynos5433.dtsi linux-libre-5.3.16-gnu/arch/arm64/boot/dts/exynos/exynos5433.dtsi
--- linux-libre-5.3.15-gnu/arch/arm64/boot/dts/exynos/exynos5433.dtsi	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/arm64/boot/dts/exynos/exynos5433.dtsi	2019-12-13 02:49:56.000000000 -0500
@@ -18,8 +18,8 @@
 
 / {
 	compatible = "samsung,exynos5433";
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	interrupt-parent = <&gic>;
 
@@ -311,7 +311,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0x0 0x0 0x0 0x18000000>;
 
 		chipid@10000000 {
 			compatible = "samsung,exynos4210-chipid";
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/arm64/boot/dts/exynos/exynos7.dtsi linux-libre-5.3.16-gnu/arch/arm64/boot/dts/exynos/exynos7.dtsi
--- linux-libre-5.3.15-gnu/arch/arm64/boot/dts/exynos/exynos7.dtsi	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/arm64/boot/dts/exynos/exynos7.dtsi	2019-12-13 02:49:56.000000000 -0500
@@ -12,8 +12,8 @@
 / {
 	compatible = "samsung,exynos7";
 	interrupt-parent = <&gic>;
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	aliases {
 		pinctrl0 = &pinctrl_alive;
@@ -98,7 +98,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0 0 0 0x18000000>;
 
 		chipid@10000000 {
 			compatible = "samsung,exynos4210-chipid";
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi linux-libre-5.3.16-gnu/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
--- linux-libre-5.3.15-gnu/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi	2019-12-13 02:49:56.000000000 -0500
@@ -1612,7 +1612,7 @@
 			regulator-name = "VDD_HDMI_5V0";
 			regulator-min-microvolt = <5000000>;
 			regulator-max-microvolt = <5000000>;
-			gpio = <&exp1 12 GPIO_ACTIVE_LOW>;
+			gpio = <&exp1 12 GPIO_ACTIVE_HIGH>;
 			enable-active-high;
 			vin-supply = <&vdd_5v0_sys>;
 		};
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/ip27-init.c linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/ip27-init.c
--- linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/ip27-init.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/ip27-init.c	2019-12-13 02:49:56.000000000 -0500
@@ -69,23 +69,14 @@ static void per_hub_init(cnodeid_t cnode
 
 	hub_rtc_init(cnode);
 
-#ifdef CONFIG_REPLICATE_EXHANDLERS
-	/*
-	 * If this is not a headless node initialization,
-	 * copy over the caliased exception handlers.
-	 */
-	if (get_compact_nodeid() == cnode) {
-		extern char except_vec2_generic, except_vec3_generic;
-		extern void build_tlb_refill_handler(void);
-
-		memcpy((void *)(CKSEG0 + 0x100), &except_vec2_generic, 0x80);
-		memcpy((void *)(CKSEG0 + 0x180), &except_vec3_generic, 0x80);
-		build_tlb_refill_handler();
-		memcpy((void *)(CKSEG0 + 0x100), (void *) CKSEG0, 0x80);
-		memcpy((void *)(CKSEG0 + 0x180), &except_vec3_generic, 0x100);
+	if (nasid) {
+		/* copy exception handlers from first node to current node */
+		memcpy((void *)NODE_OFFSET_TO_K0(nasid, 0),
+		       (void *)CKSEG0, 0x200);
 		__flush_cache_all();
+		/* switch to node local exception handlers */
+		REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_8K);
 	}
-#endif
 }
 
 void per_cpu_init(void)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/ip27-memory.c linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/ip27-memory.c
--- linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/ip27-memory.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/ip27-memory.c	2019-12-13 02:49:56.000000000 -0500
@@ -332,11 +332,7 @@ static void __init mlreset(void)
 		 * thinks it is a node 0 address.
 		 */
 		REMOTE_HUB_S(nasid, PI_REGION_PRESENT, (region_mask | 1));
-#ifdef CONFIG_REPLICATE_EXHANDLERS
-		REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_8K);
-#else
 		REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_0);
-#endif
 
 #ifdef LATER
 		/*
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/Kconfig linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/Kconfig
--- linux-libre-5.3.15-gnu/arch/mips/sgi-ip27/Kconfig	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/mips/sgi-ip27/Kconfig	2019-12-13 02:49:56.000000000 -0500
@@ -38,10 +38,3 @@ config REPLICATE_KTEXT
 	  Say Y here to enable replicating the kernel text across multiple
 	  nodes in a NUMA cluster.  This trades memory for speed.
 
-config REPLICATE_EXHANDLERS
-	bool "Exception handler replication support"
-	depends on SGI_IP27
-	help
-	  Say Y here to enable replicating the kernel exception handlers
-	  across multiple nodes in a NUMA cluster. This trades memory for
-	  speed.
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/powerpc/kvm/book3s_xive.c linux-libre-5.3.16-gnu/arch/powerpc/kvm/book3s_xive.c
--- linux-libre-5.3.15-gnu/arch/powerpc/kvm/book3s_xive.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/powerpc/kvm/book3s_xive.c	2019-12-13 02:49:56.000000000 -0500
@@ -2005,6 +2005,10 @@ static int kvmppc_xive_create(struct kvm
 
 	pr_devel("Creating xive for partition\n");
 
+	/* Already there ? */
+	if (kvm->arch.xive)
+		return -EEXIST;
+
 	xive = kvmppc_xive_get_device(kvm, type);
 	if (!xive)
 		return -ENOMEM;
@@ -2014,12 +2018,6 @@ static int kvmppc_xive_create(struct kvm
 	xive->kvm = kvm;
 	mutex_init(&xive->lock);
 
-	/* Already there ? */
-	if (kvm->arch.xive)
-		ret = -EEXIST;
-	else
-		kvm->arch.xive = xive;
-
 	/* We use the default queue size set by the host */
 	xive->q_order = xive_native_default_eq_shift();
 	if (xive->q_order < PAGE_SHIFT)
@@ -2039,6 +2037,7 @@ static int kvmppc_xive_create(struct kvm
 	if (ret)
 		return ret;
 
+	kvm->arch.xive = xive;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/powerpc/kvm/book3s_xive_native.c linux-libre-5.3.16-gnu/arch/powerpc/kvm/book3s_xive_native.c
--- linux-libre-5.3.15-gnu/arch/powerpc/kvm/book3s_xive_native.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/powerpc/kvm/book3s_xive_native.c	2019-12-13 02:49:56.000000000 -0500
@@ -50,6 +50,24 @@ static void kvmppc_xive_native_cleanup_q
 	}
 }
 
+static int kvmppc_xive_native_configure_queue(u32 vp_id, struct xive_q *q,
+					      u8 prio, __be32 *qpage,
+					      u32 order, bool can_escalate)
+{
+	int rc;
+	__be32 *qpage_prev = q->qpage;
+
+	rc = xive_native_configure_queue(vp_id, q, prio, qpage, order,
+					 can_escalate);
+	if (rc)
+		return rc;
+
+	if (qpage_prev)
+		put_page(virt_to_page(qpage_prev));
+
+	return rc;
+}
+
 void kvmppc_xive_native_cleanup_vcpu(struct kvm_vcpu *vcpu)
 {
 	struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
@@ -582,19 +600,14 @@ static int kvmppc_xive_native_set_queue_
 		q->guest_qaddr  = 0;
 		q->guest_qshift = 0;
 
-		rc = xive_native_configure_queue(xc->vp_id, q, priority,
-						 NULL, 0, true);
+		rc = kvmppc_xive_native_configure_queue(xc->vp_id, q, priority,
+							NULL, 0, true);
 		if (rc) {
 			pr_err("Failed to reset queue %d for VCPU %d: %d\n",
 			       priority, xc->server_num, rc);
 			return rc;
 		}
 
-		if (q->qpage) {
-			put_page(virt_to_page(q->qpage));
-			q->qpage = NULL;
-		}
-
 		return 0;
 	}
 
@@ -624,12 +637,6 @@ static int kvmppc_xive_native_set_queue_
 
 	srcu_idx = srcu_read_lock(&kvm->srcu);
 	gfn = gpa_to_gfn(kvm_eq.qaddr);
-	page = gfn_to_page(kvm, gfn);
-	if (is_error_page(page)) {
-		srcu_read_unlock(&kvm->srcu, srcu_idx);
-		pr_err("Couldn't get queue page %llx!\n", kvm_eq.qaddr);
-		return -EINVAL;
-	}
 
 	page_size = kvm_host_page_size(kvm, gfn);
 	if (1ull << kvm_eq.qshift > page_size) {
@@ -638,6 +645,13 @@ static int kvmppc_xive_native_set_queue_
 		return -EINVAL;
 	}
 
+	page = gfn_to_page(kvm, gfn);
+	if (is_error_page(page)) {
+		srcu_read_unlock(&kvm->srcu, srcu_idx);
+		pr_err("Couldn't get queue page %llx!\n", kvm_eq.qaddr);
+		return -EINVAL;
+	}
+
 	qaddr = page_to_virt(page) + (kvm_eq.qaddr & ~PAGE_MASK);
 	srcu_read_unlock(&kvm->srcu, srcu_idx);
 
@@ -653,8 +667,8 @@ static int kvmppc_xive_native_set_queue_
 	  * OPAL level because the use of END ESBs is not supported by
 	  * Linux.
 	  */
-	rc = xive_native_configure_queue(xc->vp_id, q, priority,
-					 (__be32 *) qaddr, kvm_eq.qshift, true);
+	rc = kvmppc_xive_native_configure_queue(xc->vp_id, q, priority,
+					(__be32 *) qaddr, kvm_eq.qshift, true);
 	if (rc) {
 		pr_err("Failed to configure queue %d for VCPU %d: %d\n",
 		       priority, xc->server_num, rc);
@@ -1081,7 +1095,6 @@ static int kvmppc_xive_native_create(str
 	dev->private = xive;
 	xive->dev = dev;
 	xive->kvm = kvm;
-	kvm->arch.xive = xive;
 	mutex_init(&xive->mapping_lock);
 	mutex_init(&xive->lock);
 
@@ -1102,6 +1115,7 @@ static int kvmppc_xive_native_create(str
 	if (ret)
 		return ret;
 
+	kvm->arch.xive = xive;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/sparc/include/asm/io_64.h linux-libre-5.3.16-gnu/arch/sparc/include/asm/io_64.h
--- linux-libre-5.3.15-gnu/arch/sparc/include/asm/io_64.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/sparc/include/asm/io_64.h	2019-12-13 02:49:56.000000000 -0500
@@ -407,6 +407,7 @@ static inline void __iomem *ioremap(unsi
 }
 
 #define ioremap_nocache(X,Y)		ioremap((X),(Y))
+#define ioremap_uc(X,Y)			ioremap((X),(Y))
 #define ioremap_wc(X,Y)			ioremap((X),(Y))
 #define ioremap_wt(X,Y)			ioremap((X),(Y))
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/kernel/cpu/resctrl/rdtgroup.c linux-libre-5.3.16-gnu/arch/x86/kernel/cpu/resctrl/rdtgroup.c
--- linux-libre-5.3.15-gnu/arch/x86/kernel/cpu/resctrl/rdtgroup.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/kernel/cpu/resctrl/rdtgroup.c	2019-12-13 02:49:56.000000000 -0500
@@ -461,10 +461,8 @@ static ssize_t rdtgroup_cpus_write(struc
 	}
 
 	rdtgrp = rdtgroup_kn_lock_live(of->kn);
-	rdt_last_cmd_clear();
 	if (!rdtgrp) {
 		ret = -ENOENT;
-		rdt_last_cmd_puts("Directory was removed\n");
 		goto unlock;
 	}
 
@@ -2648,10 +2646,8 @@ static int mkdir_rdt_prepare(struct kern
 	int ret;
 
 	prdtgrp = rdtgroup_kn_lock_live(prgrp_kn);
-	rdt_last_cmd_clear();
 	if (!prdtgrp) {
 		ret = -ENODEV;
-		rdt_last_cmd_puts("Directory was removed\n");
 		goto out_unlock;
 	}
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/kvm/cpuid.c linux-libre-5.3.16-gnu/arch/x86/kvm/cpuid.c
--- linux-libre-5.3.15-gnu/arch/x86/kvm/cpuid.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/kvm/cpuid.c	2019-12-13 02:49:56.000000000 -0500
@@ -497,7 +497,7 @@ static inline int __do_cpuid_func(struct
 
 	r = -E2BIG;
 
-	if (*nent >= maxnent)
+	if (WARN_ON(*nent >= maxnent))
 		goto out;
 
 	do_host_cpuid(entry, function, 0);
@@ -794,6 +794,9 @@ out:
 static int do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 func,
 			 int *nent, int maxnent, unsigned int type)
 {
+	if (*nent >= maxnent)
+		return -E2BIG;
+
 	if (type == KVM_GET_EMULATED_CPUID)
 		return __do_cpuid_func_emulated(entry, func, nent, maxnent);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/kvm/vmx/nested.c linux-libre-5.3.16-gnu/arch/x86/kvm/vmx/nested.c
--- linux-libre-5.3.15-gnu/arch/x86/kvm/vmx/nested.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/kvm/vmx/nested.c	2019-12-13 02:49:56.000000000 -0500
@@ -2392,6 +2392,16 @@ static int prepare_vmcs02(struct kvm_vcp
 				entry_failure_code))
 		return -EINVAL;
 
+	/*
+	 * Immediately write vmcs02.GUEST_CR3.  It will be propagated to vmcs12
+	 * on nested VM-Exit, which can occur without actually running L2 and
+	 * thus without hitting vmx_set_cr3(), e.g. if L1 is entering L2 with
+	 * vmcs12.GUEST_ACTIVITYSTATE=HLT, in which case KVM will intercept the
+	 * transition to HLT instead of running L2.
+	 */
+	if (enable_ept)
+		vmcs_writel(GUEST_CR3, vmcs12->guest_cr3);
+
 	/* Late preparation of GUEST_PDPTRs now that EFER and CRs are set. */
 	if (load_guest_pdptrs_vmcs12 && nested_cpu_has_ept(vmcs12) &&
 	    is_pae_paging(vcpu)) {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/kvm/vmx/vmx.c linux-libre-5.3.16-gnu/arch/x86/kvm/vmx/vmx.c
--- linux-libre-5.3.15-gnu/arch/x86/kvm/vmx/vmx.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/kvm/vmx/vmx.c	2019-12-13 02:49:56.000000000 -0500
@@ -2878,6 +2878,7 @@ u64 construct_eptp(struct kvm_vcpu *vcpu
 void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
 {
 	struct kvm *kvm = vcpu->kvm;
+	bool update_guest_cr3 = true;
 	unsigned long guest_cr3;
 	u64 eptp;
 
@@ -2894,15 +2895,18 @@ void vmx_set_cr3(struct kvm_vcpu *vcpu,
 			spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock);
 		}
 
-		if (enable_unrestricted_guest || is_paging(vcpu) ||
-		    is_guest_mode(vcpu))
+		/* Loading vmcs02.GUEST_CR3 is handled by nested VM-Enter. */
+		if (is_guest_mode(vcpu))
+			update_guest_cr3 = false;
+		else if (enable_unrestricted_guest || is_paging(vcpu))
 			guest_cr3 = kvm_read_cr3(vcpu);
 		else
 			guest_cr3 = to_kvm_vmx(kvm)->ept_identity_map_addr;
 		ept_load_pdptrs(vcpu);
 	}
 
-	vmcs_writel(GUEST_CR3, guest_cr3);
+	if (update_guest_cr3)
+		vmcs_writel(GUEST_CR3, guest_cr3);
 }
 
 int vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/kvm/x86.c linux-libre-5.3.16-gnu/arch/x86/kvm/x86.c
--- linux-libre-5.3.15-gnu/arch/x86/kvm/x86.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/kvm/x86.c	2019-12-13 02:49:56.000000000 -0500
@@ -300,13 +300,14 @@ int kvm_set_shared_msr(unsigned slot, u6
 	struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
 	int err;
 
-	if (((value ^ smsr->values[slot].curr) & mask) == 0)
+	value = (value & mask) | (smsr->values[slot].host & ~mask);
+	if (value == smsr->values[slot].curr)
 		return 0;
-	smsr->values[slot].curr = value;
 	err = wrmsrl_safe(shared_msrs_global.msrs[slot], value);
 	if (err)
 		return 1;
 
+	smsr->values[slot].curr = value;
 	if (!smsr->registered) {
 		smsr->urn.on_user_return = kvm_on_user_return;
 		user_return_notifier_register(&smsr->urn);
@@ -1291,10 +1292,15 @@ static u64 kvm_get_arch_capabilities(voi
 	 * If TSX is disabled on the system, guests are also mitigated against
 	 * TAA and clear CPU buffer mitigation is not required for guests.
 	 */
-	if (boot_cpu_has_bug(X86_BUG_TAA) && boot_cpu_has(X86_FEATURE_RTM) &&
-	    (data & ARCH_CAP_TSX_CTRL_MSR))
+	if (!boot_cpu_has(X86_FEATURE_RTM))
+		data &= ~ARCH_CAP_TAA_NO;
+	else if (!boot_cpu_has_bug(X86_BUG_TAA))
+		data |= ARCH_CAP_TAA_NO;
+	else if (data & ARCH_CAP_TSX_CTRL_MSR)
 		data &= ~ARCH_CAP_MDS_NO;
 
+	/* KVM does not emulate MSR_IA32_TSX_CTRL.  */
+	data &= ~ARCH_CAP_TSX_CTRL_MSR;
 	return data;
 }
 
@@ -4327,6 +4333,7 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 	case KVM_SET_NESTED_STATE: {
 		struct kvm_nested_state __user *user_kvm_nested_state = argp;
 		struct kvm_nested_state kvm_state;
+		int idx;
 
 		r = -EINVAL;
 		if (!kvm_x86_ops->set_nested_state)
@@ -4350,7 +4357,9 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 		    && !(kvm_state.flags & KVM_STATE_NESTED_GUEST_MODE))
 			break;
 
+		idx = srcu_read_lock(&vcpu->kvm->srcu);
 		r = kvm_x86_ops->set_nested_state(vcpu, user_kvm_nested_state, &kvm_state);
+		srcu_read_unlock(&vcpu->kvm->srcu, idx);
 		break;
 	}
 	case KVM_GET_SUPPORTED_HV_CPUID: {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/mm/fault.c linux-libre-5.3.16-gnu/arch/x86/mm/fault.c
--- linux-libre-5.3.15-gnu/arch/x86/mm/fault.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/mm/fault.c	2019-12-13 02:49:56.000000000 -0500
@@ -197,7 +197,7 @@ void vmalloc_sync_all(void)
 		return;
 
 	for (address = VMALLOC_START & PMD_MASK;
-	     address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
+	     address >= TASK_SIZE_MAX && address < VMALLOC_END;
 	     address += PMD_SIZE) {
 		struct page *page;
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/arch/x86/pci/fixup.c linux-libre-5.3.16-gnu/arch/x86/pci/fixup.c
--- linux-libre-5.3.15-gnu/arch/x86/pci/fixup.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/arch/x86/pci/fixup.c	2019-12-13 02:49:56.000000000 -0500
@@ -589,6 +589,17 @@ static void pci_fixup_amd_ehci_pme(struc
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7808, pci_fixup_amd_ehci_pme);
 
 /*
+ * Device [1022:7914]
+ * When in D0, PME# doesn't get asserted when plugging USB 2.0 device.
+ */
+static void pci_fixup_amd_fch_xhci_pme(struct pci_dev *dev)
+{
+	dev_info(&dev->dev, "PME# does not work under D0, disabling it\n");
+	dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >> PCI_PM_CAP_PME_SHIFT);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7914, pci_fixup_amd_fch_xhci_pme);
+
+/*
  * Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff]
  *
  * Using the [mem 0x7fa00000-0x7fbfffff] region, e.g., by assigning it to
diff -druNp --no-dereference linux-libre-5.3.15-gnu/block/bio.c linux-libre-5.3.16-gnu/block/bio.c
--- linux-libre-5.3.15-gnu/block/bio.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/block/bio.c	2019-12-13 02:49:56.000000000 -0500
@@ -769,7 +769,7 @@ bool __bio_try_merge_page(struct bio *bi
 	if (WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED)))
 		return false;
 
-	if (bio->bi_vcnt > 0) {
+	if (bio->bi_vcnt > 0 && !bio_full(bio, len)) {
 		struct bio_vec *bv = &bio->bi_io_vec[bio->bi_vcnt - 1];
 
 		if (page_is_mergeable(bv, page, len, off, same_page)) {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/crypto/af_alg.c linux-libre-5.3.16-gnu/crypto/af_alg.c
--- linux-libre-5.3.15-gnu/crypto/af_alg.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/crypto/af_alg.c	2019-12-13 02:49:56.000000000 -0500
@@ -1043,7 +1043,7 @@ void af_alg_async_cb(struct crypto_async
 	af_alg_free_resources(areq);
 	sock_put(sk);
 
-	iocb->ki_complete(iocb, err ? err : resultlen, 0);
+	iocb->ki_complete(iocb, err ? err : (int)resultlen, 0);
 }
 EXPORT_SYMBOL_GPL(af_alg_async_cb);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/crypto/crypto_user_base.c linux-libre-5.3.16-gnu/crypto/crypto_user_base.c
--- linux-libre-5.3.15-gnu/crypto/crypto_user_base.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/crypto/crypto_user_base.c	2019-12-13 02:49:56.000000000 -0500
@@ -214,8 +214,10 @@ static int crypto_report(struct sk_buff
 drop_alg:
 	crypto_mod_put(alg);
 
-	if (err)
+	if (err) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/crypto/crypto_user_stat.c linux-libre-5.3.16-gnu/crypto/crypto_user_stat.c
--- linux-libre-5.3.15-gnu/crypto/crypto_user_stat.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/crypto/crypto_user_stat.c	2019-12-13 02:49:56.000000000 -0500
@@ -326,8 +326,10 @@ int crypto_reportstat(struct sk_buff *in
 drop_alg:
 	crypto_mod_put(alg);
 
-	if (err)
+	if (err) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/crypto/ecc.c linux-libre-5.3.16-gnu/crypto/ecc.c
--- linux-libre-5.3.15-gnu/crypto/ecc.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/crypto/ecc.c	2019-12-13 02:49:56.000000000 -0500
@@ -1284,10 +1284,11 @@ EXPORT_SYMBOL(ecc_point_mult_shamir);
 static inline void ecc_swap_digits(const u64 *in, u64 *out,
 				   unsigned int ndigits)
 {
+	const __be64 *src = (__force __be64 *)in;
 	int i;
 
 	for (i = 0; i < ndigits; i++)
-		out[i] = __swab64(in[ndigits - 1 - i]);
+		out[i] = be64_to_cpu(src[ndigits - 1 - i]);
 }
 
 static int __ecc_is_key_valid(const struct ecc_curve *curve,
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/android/binder_alloc.c linux-libre-5.3.16-gnu/drivers/android/binder_alloc.c
--- linux-libre-5.3.15-gnu/drivers/android/binder_alloc.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/android/binder_alloc.c	2019-12-13 02:49:56.000000000 -0500
@@ -277,8 +277,7 @@ static int binder_update_page_range(stru
 	return 0;
 
 free_range:
-	for (page_addr = end - PAGE_SIZE; page_addr >= start;
-	     page_addr -= PAGE_SIZE) {
+	for (page_addr = end - PAGE_SIZE; 1; page_addr -= PAGE_SIZE) {
 		bool ret;
 		size_t index;
 
@@ -291,6 +290,8 @@ free_range:
 		WARN_ON(!ret);
 
 		trace_binder_free_lru_end(alloc, index);
+		if (page_addr == start)
+			break;
 		continue;
 
 err_vm_insert_page_failed:
@@ -298,7 +299,8 @@ err_vm_insert_page_failed:
 		page->page_ptr = NULL;
 err_alloc_page_failed:
 err_page_ptr_cleared:
-		;
+		if (page_addr == start)
+			break;
 	}
 err_no_vma:
 	if (mm) {
@@ -681,17 +683,17 @@ int binder_alloc_mmap_handler(struct bin
 	struct binder_buffer *buffer;
 
 	mutex_lock(&binder_alloc_mmap_lock);
-	if (alloc->buffer) {
+	if (alloc->buffer_size) {
 		ret = -EBUSY;
 		failure_string = "already mapped";
 		goto err_already_mapped;
 	}
+	alloc->buffer_size = min_t(unsigned long, vma->vm_end - vma->vm_start,
+				   SZ_4M);
+	mutex_unlock(&binder_alloc_mmap_lock);
 
 	alloc->buffer = (void __user *)vma->vm_start;
-	mutex_unlock(&binder_alloc_mmap_lock);
 
-	alloc->buffer_size = min_t(unsigned long, vma->vm_end - vma->vm_start,
-				   SZ_4M);
 	alloc->pages = kcalloc(alloc->buffer_size / PAGE_SIZE,
 			       sizeof(alloc->pages[0]),
 			       GFP_KERNEL);
@@ -722,8 +724,9 @@ err_alloc_buf_struct_failed:
 	kfree(alloc->pages);
 	alloc->pages = NULL;
 err_alloc_pages_failed:
-	mutex_lock(&binder_alloc_mmap_lock);
 	alloc->buffer = NULL;
+	mutex_lock(&binder_alloc_mmap_lock);
+	alloc->buffer_size = 0;
 err_already_mapped:
 	mutex_unlock(&binder_alloc_mmap_lock);
 	binder_alloc_debug(BINDER_DEBUG_USER_ERROR,
@@ -841,14 +844,20 @@ void binder_alloc_print_pages(struct seq
 	int free = 0;
 
 	mutex_lock(&alloc->mutex);
-	for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
-		page = &alloc->pages[i];
-		if (!page->page_ptr)
-			free++;
-		else if (list_empty(&page->lru))
-			active++;
-		else
-			lru++;
+	/*
+	 * Make sure the binder_alloc is fully initialized, otherwise we might
+	 * read inconsistent state.
+	 */
+	if (binder_alloc_get_vma(alloc) != NULL) {
+		for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
+			page = &alloc->pages[i];
+			if (!page->page_ptr)
+				free++;
+			else if (list_empty(&page->lru))
+				active++;
+			else
+				lru++;
+		}
 	}
 	mutex_unlock(&alloc->mutex);
 	seq_printf(m, "  pages: %d:%d:%d\n", active, lru, free);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/block/rbd.c linux-libre-5.3.16-gnu/drivers/block/rbd.c
--- linux-libre-5.3.15-gnu/drivers/block/rbd.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/block/rbd.c	2019-12-13 02:49:56.000000000 -0500
@@ -2089,7 +2089,7 @@ static int rbd_object_map_update_finish(
 	struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev;
 	struct ceph_osd_data *osd_data;
 	u64 objno;
-	u8 state, new_state, current_state;
+	u8 state, new_state, uninitialized_var(current_state);
 	bool has_current_state;
 	void *p;
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/block/rsxx/core.c linux-libre-5.3.16-gnu/drivers/block/rsxx/core.c
--- linux-libre-5.3.15-gnu/drivers/block/rsxx/core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/block/rsxx/core.c	2019-12-13 02:49:56.000000000 -0500
@@ -1000,8 +1000,10 @@ static void rsxx_pci_remove(struct pci_d
 
 	cancel_work_sync(&card->event_work);
 
+	destroy_workqueue(card->event_wq);
 	rsxx_destroy_dev(card);
 	rsxx_dma_destroy(card);
+	destroy_workqueue(card->creg_ctrl.creg_wq);
 
 	spin_lock_irqsave(&card->irq_lock, flags);
 	rsxx_disable_ier_and_isr(card, CR_INTR_ALL);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/char/lp.c linux-libre-5.3.16-gnu/drivers/char/lp.c
--- linux-libre-5.3.15-gnu/drivers/char/lp.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/char/lp.c	2019-12-13 02:49:56.000000000 -0500
@@ -713,6 +713,10 @@ static int lp_set_timeout64(unsigned int
 	if (copy_from_user(karg, arg, sizeof(karg)))
 		return -EFAULT;
 
+	/* sparc64 suseconds_t is 32-bit only */
+	if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
+		karg[1] >>= 32;
+
 	return lp_set_timeout(minor, karg[0], karg[1]);
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/cpufreq/imx-cpufreq-dt.c linux-libre-5.3.16-gnu/drivers/cpufreq/imx-cpufreq-dt.c
--- linux-libre-5.3.15-gnu/drivers/cpufreq/imx-cpufreq-dt.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/cpufreq/imx-cpufreq-dt.c	2019-12-13 02:49:56.000000000 -0500
@@ -44,19 +44,19 @@ static int imx_cpufreq_dt_probe(struct p
 	mkt_segment = (cell_value & OCOTP_CFG3_MKT_SEGMENT_MASK) >> OCOTP_CFG3_MKT_SEGMENT_SHIFT;
 
 	/*
-	 * Early samples without fuses written report "0 0" which means
-	 * consumer segment and minimum speed grading.
-	 *
-	 * According to datasheet minimum speed grading is not supported for
-	 * consumer parts so clamp to 1 to avoid warning for "no OPPs"
+	 * Early samples without fuses written report "0 0" which may NOT
+	 * match any OPP defined in DT. So clamp to minimum OPP defined in
+	 * DT to avoid warning for "no OPPs".
 	 *
 	 * Applies to i.MX8M series SoCs.
 	 */
-	if (mkt_segment == 0 && speed_grade == 0 && (
-			of_machine_is_compatible("fsl,imx8mm") ||
-			of_machine_is_compatible("fsl,imx8mn") ||
-			of_machine_is_compatible("fsl,imx8mq")))
-		speed_grade = 1;
+	if (mkt_segment == 0 && speed_grade == 0) {
+		if (of_machine_is_compatible("fsl,imx8mm") ||
+		    of_machine_is_compatible("fsl,imx8mq"))
+			speed_grade = 1;
+		if (of_machine_is_compatible("fsl,imx8mn"))
+			speed_grade = 0xb;
+	}
 
 	supported_hw[0] = BIT(speed_grade);
 	supported_hw[1] = BIT(mkt_segment);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/crypto/amcc/crypto4xx_core.c linux-libre-5.3.16-gnu/drivers/crypto/amcc/crypto4xx_core.c
--- linux-libre-5.3.15-gnu/drivers/crypto/amcc/crypto4xx_core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/crypto/amcc/crypto4xx_core.c	2019-12-13 02:49:56.000000000 -0500
@@ -365,12 +365,8 @@ static u32 crypto4xx_build_sdr(struct cr
 		dma_alloc_coherent(dev->core_dev->device,
 			PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
 			&dev->scatter_buffer_pa, GFP_ATOMIC);
-	if (!dev->scatter_buffer_va) {
-		dma_free_coherent(dev->core_dev->device,
-				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
-				  dev->sdr, dev->sdr_pa);
+	if (!dev->scatter_buffer_va)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < PPC4XX_NUM_SD; i++) {
 		dev->sdr[i].ptr = dev->scatter_buffer_pa +
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/crypto/atmel-aes.c linux-libre-5.3.16-gnu/drivers/crypto/atmel-aes.c
--- linux-libre-5.3.15-gnu/drivers/crypto/atmel-aes.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/crypto/atmel-aes.c	2019-12-13 02:49:56.000000000 -0500
@@ -490,6 +490,29 @@ static inline bool atmel_aes_is_encrypt(
 static void atmel_aes_authenc_complete(struct atmel_aes_dev *dd, int err);
 #endif
 
+static void atmel_aes_set_iv_as_last_ciphertext_block(struct atmel_aes_dev *dd)
+{
+	struct ablkcipher_request *req = ablkcipher_request_cast(dd->areq);
+	struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
+	struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req);
+	unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+
+	if (req->nbytes < ivsize)
+		return;
+
+	if (rctx->mode & AES_FLAGS_ENCRYPT) {
+		scatterwalk_map_and_copy(req->info, req->dst,
+					 req->nbytes - ivsize, ivsize, 0);
+	} else {
+		if (req->src == req->dst)
+			memcpy(req->info, rctx->lastc, ivsize);
+		else
+			scatterwalk_map_and_copy(req->info, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
+	}
+}
+
 static inline int atmel_aes_complete(struct atmel_aes_dev *dd, int err)
 {
 #ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC
@@ -500,26 +523,8 @@ static inline int atmel_aes_complete(str
 	clk_disable(dd->iclk);
 	dd->flags &= ~AES_FLAGS_BUSY;
 
-	if (!dd->ctx->is_aead) {
-		struct ablkcipher_request *req =
-			ablkcipher_request_cast(dd->areq);
-		struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
-		struct crypto_ablkcipher *ablkcipher =
-			crypto_ablkcipher_reqtfm(req);
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
-
-		if (rctx->mode & AES_FLAGS_ENCRYPT) {
-			scatterwalk_map_and_copy(req->info, req->dst,
-				req->nbytes - ivsize, ivsize, 0);
-		} else {
-			if (req->src == req->dst) {
-				memcpy(req->info, rctx->lastc, ivsize);
-			} else {
-				scatterwalk_map_and_copy(req->info, req->src,
-					req->nbytes - ivsize, ivsize, 0);
-			}
-		}
-	}
+	if (!dd->ctx->is_aead)
+		atmel_aes_set_iv_as_last_ciphertext_block(dd);
 
 	if (dd->is_async)
 		dd->areq->complete(dd->areq, err);
@@ -1125,10 +1130,12 @@ static int atmel_aes_crypt(struct ablkci
 	rctx->mode = mode;
 
 	if (!(mode & AES_FLAGS_ENCRYPT) && (req->src == req->dst)) {
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+		unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
 
-		scatterwalk_map_and_copy(rctx->lastc, req->src,
-			(req->nbytes - ivsize), ivsize, 0);
+		if (req->nbytes >= ivsize)
+			scatterwalk_map_and_copy(rctx->lastc, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
 	}
 
 	return atmel_aes_handle_queue(dd, &req->base);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/crypto/ccp/ccp-dmaengine.c linux-libre-5.3.16-gnu/drivers/crypto/ccp/ccp-dmaengine.c
--- linux-libre-5.3.15-gnu/drivers/crypto/ccp/ccp-dmaengine.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/crypto/ccp/ccp-dmaengine.c	2019-12-13 02:49:56.000000000 -0500
@@ -337,6 +337,7 @@ static struct ccp_dma_desc *ccp_alloc_dm
 	desc->tx_desc.flags = flags;
 	desc->tx_desc.tx_submit = ccp_tx_submit;
 	desc->ccp = chan->ccp;
+	INIT_LIST_HEAD(&desc->entry);
 	INIT_LIST_HEAD(&desc->pending);
 	INIT_LIST_HEAD(&desc->active);
 	desc->status = DMA_IN_PROGRESS;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/crypto/geode-aes.c linux-libre-5.3.16-gnu/drivers/crypto/geode-aes.c
--- linux-libre-5.3.15-gnu/drivers/crypto/geode-aes.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/crypto/geode-aes.c	2019-12-13 02:49:56.000000000 -0500
@@ -10,6 +10,7 @@
 #include <linux/spinlock.h>
 #include <crypto/algapi.h>
 #include <crypto/aes.h>
+#include <crypto/skcipher.h>
 
 #include <linux/io.h>
 #include <linux/delay.h>
@@ -166,13 +167,15 @@ static int geode_setkey_blk(struct crypt
 	/*
 	 * The requested key size is not supported by HW, do a fallback
 	 */
-	op->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
-	op->fallback.blk->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
+	crypto_sync_skcipher_clear_flags(op->fallback.blk, CRYPTO_TFM_REQ_MASK);
+	crypto_sync_skcipher_set_flags(op->fallback.blk,
+				       tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
 
-	ret = crypto_blkcipher_setkey(op->fallback.blk, key, len);
+	ret = crypto_sync_skcipher_setkey(op->fallback.blk, key, len);
 	if (ret) {
 		tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
-		tfm->crt_flags |= (op->fallback.blk->base.crt_flags & CRYPTO_TFM_RES_MASK);
+		tfm->crt_flags |= crypto_sync_skcipher_get_flags(op->fallback.blk) &
+				  CRYPTO_TFM_RES_MASK;
 	}
 	return ret;
 }
@@ -181,33 +184,28 @@ static int fallback_blk_dec(struct blkci
 		struct scatterlist *dst, struct scatterlist *src,
 		unsigned int nbytes)
 {
-	unsigned int ret;
-	struct crypto_blkcipher *tfm;
 	struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
+	SYNC_SKCIPHER_REQUEST_ON_STACK(req, op->fallback.blk);
 
-	tfm = desc->tfm;
-	desc->tfm = op->fallback.blk;
-
-	ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes);
+	skcipher_request_set_sync_tfm(req, op->fallback.blk);
+	skcipher_request_set_callback(req, 0, NULL, NULL);
+	skcipher_request_set_crypt(req, src, dst, nbytes, desc->info);
 
-	desc->tfm = tfm;
-	return ret;
+	return crypto_skcipher_decrypt(req);
 }
+
 static int fallback_blk_enc(struct blkcipher_desc *desc,
 		struct scatterlist *dst, struct scatterlist *src,
 		unsigned int nbytes)
 {
-	unsigned int ret;
-	struct crypto_blkcipher *tfm;
 	struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
+	SYNC_SKCIPHER_REQUEST_ON_STACK(req, op->fallback.blk);
 
-	tfm = desc->tfm;
-	desc->tfm = op->fallback.blk;
-
-	ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes);
+	skcipher_request_set_sync_tfm(req, op->fallback.blk);
+	skcipher_request_set_callback(req, 0, NULL, NULL);
+	skcipher_request_set_crypt(req, src, dst, nbytes, desc->info);
 
-	desc->tfm = tfm;
-	return ret;
+	return crypto_skcipher_encrypt(req);
 }
 
 static void
@@ -307,6 +305,9 @@ geode_cbc_decrypt(struct blkcipher_desc
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (nbytes % AES_BLOCK_SIZE)
+		return -EINVAL;
+
 	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_dec(desc, dst, src, nbytes);
 
@@ -339,6 +340,9 @@ geode_cbc_encrypt(struct blkcipher_desc
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (nbytes % AES_BLOCK_SIZE)
+		return -EINVAL;
+
 	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_enc(desc, dst, src, nbytes);
 
@@ -366,9 +370,8 @@ static int fallback_init_blk(struct cryp
 	const char *name = crypto_tfm_alg_name(tfm);
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	op->fallback.blk = crypto_alloc_blkcipher(name, 0,
-			CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
-
+	op->fallback.blk = crypto_alloc_sync_skcipher(name, 0,
+						      CRYPTO_ALG_NEED_FALLBACK);
 	if (IS_ERR(op->fallback.blk)) {
 		printk(KERN_ERR "Error allocating fallback algo %s\n", name);
 		return PTR_ERR(op->fallback.blk);
@@ -381,7 +384,7 @@ static void fallback_exit_blk(struct cry
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	crypto_free_blkcipher(op->fallback.blk);
+	crypto_free_sync_skcipher(op->fallback.blk);
 	op->fallback.blk = NULL;
 }
 
@@ -420,6 +423,9 @@ geode_ecb_decrypt(struct blkcipher_desc
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (nbytes % AES_BLOCK_SIZE)
+		return -EINVAL;
+
 	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_dec(desc, dst, src, nbytes);
 
@@ -450,6 +456,9 @@ geode_ecb_encrypt(struct blkcipher_desc
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (nbytes % AES_BLOCK_SIZE)
+		return -EINVAL;
+
 	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_enc(desc, dst, src, nbytes);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/crypto/geode-aes.h linux-libre-5.3.16-gnu/drivers/crypto/geode-aes.h
--- linux-libre-5.3.15-gnu/drivers/crypto/geode-aes.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/crypto/geode-aes.h	2019-12-13 02:49:56.000000000 -0500
@@ -60,7 +60,7 @@ struct geode_aes_op {
 	u8 *iv;
 
 	union {
-		struct crypto_blkcipher *blk;
+		struct crypto_sync_skcipher *blk;
 		struct crypto_cipher *cip;
 	} fallback;
 	u32 keylen;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/edac/ghes_edac.c linux-libre-5.3.16-gnu/drivers/edac/ghes_edac.c
--- linux-libre-5.3.15-gnu/drivers/edac/ghes_edac.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/edac/ghes_edac.c	2019-12-13 02:49:56.000000000 -0500
@@ -26,9 +26,18 @@ struct ghes_edac_pvt {
 	char msg[80];
 };
 
-static atomic_t ghes_init = ATOMIC_INIT(0);
+static refcount_t ghes_refcount = REFCOUNT_INIT(0);
+
+/*
+ * Access to ghes_pvt must be protected by ghes_lock. The spinlock
+ * also provides the necessary (implicit) memory barrier for the SMP
+ * case to make the pointer visible on another CPU.
+ */
 static struct ghes_edac_pvt *ghes_pvt;
 
+/* GHES registration mutex */
+static DEFINE_MUTEX(ghes_reg_mutex);
+
 /*
  * Sync with other, potentially concurrent callers of
  * ghes_edac_report_mem_error(). We don't know what the
@@ -79,9 +88,8 @@ static void ghes_edac_count_dimms(const
 		(*num_dimm)++;
 }
 
-static int get_dimm_smbios_index(u16 handle)
+static int get_dimm_smbios_index(struct mem_ctl_info *mci, u16 handle)
 {
-	struct mem_ctl_info *mci = ghes_pvt->mci;
 	int i;
 
 	for (i = 0; i < mci->tot_dimms; i++) {
@@ -198,14 +206,11 @@ void ghes_edac_report_mem_error(int sev,
 	enum hw_event_mc_err_type type;
 	struct edac_raw_error_desc *e;
 	struct mem_ctl_info *mci;
-	struct ghes_edac_pvt *pvt = ghes_pvt;
+	struct ghes_edac_pvt *pvt;
 	unsigned long flags;
 	char *p;
 	u8 grain_bits;
 
-	if (!pvt)
-		return;
-
 	/*
 	 * We can do the locking below because GHES defers error processing
 	 * from NMI to IRQ context. Whenever that changes, we'd at least
@@ -216,6 +221,10 @@ void ghes_edac_report_mem_error(int sev,
 
 	spin_lock_irqsave(&ghes_lock, flags);
 
+	pvt = ghes_pvt;
+	if (!pvt)
+		goto unlock;
+
 	mci = pvt->mci;
 	e = &mci->error_desc;
 
@@ -348,7 +357,7 @@ void ghes_edac_report_mem_error(int sev,
 			p += sprintf(p, "DIMM DMI handle: 0x%.4x ",
 				     mem_err->mem_dev_handle);
 
-		index = get_dimm_smbios_index(mem_err->mem_dev_handle);
+		index = get_dimm_smbios_index(mci, mem_err->mem_dev_handle);
 		if (index >= 0) {
 			e->top_layer = index;
 			e->enable_per_layer_report = true;
@@ -443,6 +452,8 @@ void ghes_edac_report_mem_error(int sev,
 		       grain_bits, e->syndrome, pvt->detail_location);
 
 	edac_raw_mc_handle_error(type, mci, e);
+
+unlock:
 	spin_unlock_irqrestore(&ghes_lock, flags);
 }
 
@@ -457,10 +468,12 @@ static struct acpi_platform_list plat_li
 int ghes_edac_register(struct ghes *ghes, struct device *dev)
 {
 	bool fake = false;
-	int rc, num_dimm = 0;
+	int rc = 0, num_dimm = 0;
 	struct mem_ctl_info *mci;
+	struct ghes_edac_pvt *pvt;
 	struct edac_mc_layer layers[1];
 	struct ghes_edac_dimm_fill dimm_fill;
+	unsigned long flags;
 	int idx = -1;
 
 	if (IS_ENABLED(CONFIG_X86)) {
@@ -472,11 +485,14 @@ int ghes_edac_register(struct ghes *ghes
 		idx = 0;
 	}
 
+	/* finish another registration/unregistration instance first */
+	mutex_lock(&ghes_reg_mutex);
+
 	/*
 	 * We have only one logical memory controller to which all DIMMs belong.
 	 */
-	if (atomic_inc_return(&ghes_init) > 1)
-		return 0;
+	if (refcount_inc_not_zero(&ghes_refcount))
+		goto unlock;
 
 	/* Get the number of DIMMs */
 	dmi_walk(ghes_edac_count_dimms, &num_dimm);
@@ -494,12 +510,13 @@ int ghes_edac_register(struct ghes *ghes
 	mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(struct ghes_edac_pvt));
 	if (!mci) {
 		pr_info("Can't allocate memory for EDAC data\n");
-		return -ENOMEM;
+		rc = -ENOMEM;
+		goto unlock;
 	}
 
-	ghes_pvt	= mci->pvt_info;
-	ghes_pvt->ghes	= ghes;
-	ghes_pvt->mci	= mci;
+	pvt		= mci->pvt_info;
+	pvt->ghes	= ghes;
+	pvt->mci	= mci;
 
 	mci->pdev = dev;
 	mci->mtype_cap = MEM_FLAG_EMPTY;
@@ -541,23 +558,48 @@ int ghes_edac_register(struct ghes *ghes
 	if (rc < 0) {
 		pr_info("Can't register at EDAC core\n");
 		edac_mc_free(mci);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto unlock;
 	}
-	return 0;
+
+	spin_lock_irqsave(&ghes_lock, flags);
+	ghes_pvt = pvt;
+	spin_unlock_irqrestore(&ghes_lock, flags);
+
+	/* only increment on success */
+	refcount_inc(&ghes_refcount);
+
+unlock:
+	mutex_unlock(&ghes_reg_mutex);
+
+	return rc;
 }
 
 void ghes_edac_unregister(struct ghes *ghes)
 {
 	struct mem_ctl_info *mci;
+	unsigned long flags;
 
-	if (!ghes_pvt)
-		return;
+	mutex_lock(&ghes_reg_mutex);
 
-	if (atomic_dec_return(&ghes_init))
-		return;
+	if (!refcount_dec_and_test(&ghes_refcount))
+		goto unlock;
 
-	mci = ghes_pvt->mci;
+	/*
+	 * Wait for the irq handler being finished.
+	 */
+	spin_lock_irqsave(&ghes_lock, flags);
+	mci = ghes_pvt ? ghes_pvt->mci : NULL;
 	ghes_pvt = NULL;
-	edac_mc_del_mc(mci->pdev);
-	edac_mc_free(mci);
+	spin_unlock_irqrestore(&ghes_lock, flags);
+
+	if (!mci)
+		goto unlock;
+
+	mci = edac_mc_del_mc(mci->pdev);
+	if (mci)
+		edac_mc_free(mci);
+
+unlock:
+	mutex_unlock(&ghes_reg_mutex);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/gpu/drm/drm_damage_helper.c linux-libre-5.3.16-gnu/drivers/gpu/drm/drm_damage_helper.c
--- linux-libre-5.3.15-gnu/drivers/gpu/drm/drm_damage_helper.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/gpu/drm/drm_damage_helper.c	2019-12-13 02:49:56.000000000 -0500
@@ -212,8 +212,14 @@ retry:
 	drm_for_each_plane(plane, fb->dev) {
 		struct drm_plane_state *plane_state;
 
-		if (plane->state->fb != fb)
+		ret = drm_modeset_lock(&plane->mutex, state->acquire_ctx);
+		if (ret)
+			goto out;
+
+		if (plane->state->fb != fb) {
+			drm_modeset_unlock(&plane->mutex);
 			continue;
+		}
 
 		plane_state = drm_atomic_get_plane_state(state, plane);
 		if (IS_ERR(plane_state)) {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/gpu/drm/i810/i810_dma.c linux-libre-5.3.16-gnu/drivers/gpu/drm/i810/i810_dma.c
--- linux-libre-5.3.15-gnu/drivers/gpu/drm/i810/i810_dma.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/gpu/drm/i810/i810_dma.c	2019-12-13 02:49:56.000000000 -0500
@@ -721,7 +721,7 @@ static void i810_dma_dispatch_vertex(str
 	if (nbox > I810_NR_SAREA_CLIPRECTS)
 		nbox = I810_NR_SAREA_CLIPRECTS;
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	if (sarea_priv->dirty)
@@ -1041,7 +1041,7 @@ static void i810_dma_dispatch_mc(struct
 	if (u != I810_BUF_CLIENT)
 		DRM_DEBUG("MC found buffer that isn't mine!\n");
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	sarea_priv->dirty = 0x7f;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/gpu/drm/mcde/mcde_drv.c linux-libre-5.3.16-gnu/drivers/gpu/drm/mcde/mcde_drv.c
--- linux-libre-5.3.15-gnu/drivers/gpu/drm/mcde/mcde_drv.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/gpu/drm/mcde/mcde_drv.c	2019-12-13 02:49:56.000000000 -0500
@@ -487,7 +487,8 @@ static int mcde_probe(struct platform_de
 	}
 	if (!match) {
 		dev_err(dev, "no matching components\n");
-		return -ENODEV;
+		ret = -ENODEV;
+		goto clk_disable;
 	}
 	if (IS_ERR(match)) {
 		dev_err(dev, "could not create component match\n");
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/gpu/drm/msm/msm_debugfs.c linux-libre-5.3.16-gnu/drivers/gpu/drm/msm/msm_debugfs.c
--- linux-libre-5.3.15-gnu/drivers/gpu/drm/msm/msm_debugfs.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/gpu/drm/msm/msm_debugfs.c	2019-12-13 02:49:56.000000000 -0500
@@ -42,12 +42,8 @@ static int msm_gpu_release(struct inode
 	struct msm_gpu_show_priv *show_priv = m->private;
 	struct msm_drm_private *priv = show_priv->dev->dev_private;
 	struct msm_gpu *gpu = priv->gpu;
-	int ret;
-
-	ret = mutex_lock_interruptible(&show_priv->dev->struct_mutex);
-	if (ret)
-		return ret;
 
+	mutex_lock(&show_priv->dev->struct_mutex);
 	gpu->funcs->gpu_state_put(show_priv->state);
 	mutex_unlock(&show_priv->dev->struct_mutex);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c linux-libre-5.3.16-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c
--- linux-libre-5.3.15-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/gpu/drm/sun4i/sun4i_tcon.c	2019-12-13 02:49:56.000000000 -0500
@@ -486,7 +486,7 @@ static void sun4i_tcon0_mode_set_rgb(str
 
 	WARN_ON(!tcon->quirks->has_channel_0);
 
-	tcon->dclk_min_div = 6;
+	tcon->dclk_min_div = 1;
 	tcon->dclk_max_div = 127;
 	sun4i_tcon0_mode_set_common(tcon, mode);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c linux-libre-5.3.16-gnu/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
--- linux-libre-5.3.15-gnu/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c	2019-12-13 02:49:56.000000000 -0500
@@ -655,10 +655,13 @@ static ssize_t cyc_threshold_store(struc
 
 	if (kstrtoul(buf, 16, &val))
 		return -EINVAL;
+
+	/* mask off max threshold before checking min value */
+	val &= ETM_CYC_THRESHOLD_MASK;
 	if (val < drvdata->ccitmin)
 		return -EINVAL;
 
-	config->ccctlr = val & ETM_CYC_THRESHOLD_MASK;
+	config->ccctlr = val;
 	return size;
 }
 static DEVICE_ATTR_RW(cyc_threshold);
@@ -689,14 +692,16 @@ static ssize_t bb_ctrl_store(struct devi
 		return -EINVAL;
 	if (!drvdata->nr_addr_cmp)
 		return -EINVAL;
+
 	/*
-	 * Bit[7:0] selects which address range comparator is used for
-	 * branch broadcast control.
+	 * Bit[8] controls include(1) / exclude(0), bits[0-7] select
+	 * individual range comparators. If include then at least 1
+	 * range must be selected.
 	 */
-	if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp)
+	if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0))
 		return -EINVAL;
 
-	config->bb_ctrl = val;
+	config->bb_ctrl = val & GENMASK(8, 0);
 	return size;
 }
 static DEVICE_ATTR_RW(bb_ctrl);
@@ -1329,8 +1334,8 @@ static ssize_t seq_event_store(struct de
 
 	spin_lock(&drvdata->spinlock);
 	idx = config->seq_idx;
-	/* RST, bits[7:0] */
-	config->seq_ctrl[idx] = val & 0xFF;
+	/* Seq control has two masks B[15:8] F[7:0] */
+	config->seq_ctrl[idx] = val & 0xFFFF;
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }
@@ -1585,7 +1590,7 @@ static ssize_t res_ctrl_store(struct dev
 	if (idx % 2 != 0)
 		/* PAIRINV, bit[21] */
 		val &= ~BIT(21);
-	config->res_ctrl[idx] = val;
+	config->res_ctrl[idx] = val & GENMASK(21, 0);
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/i2c/i2c-core-of.c linux-libre-5.3.16-gnu/drivers/i2c/i2c-core-of.c
--- linux-libre-5.3.15-gnu/drivers/i2c/i2c-core-of.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/i2c/i2c-core-of.c	2019-12-13 02:49:56.000000000 -0500
@@ -250,14 +250,14 @@ static int of_i2c_notify(struct notifier
 		}
 
 		client = of_i2c_register_device(adap, rd->dn);
-		put_device(&adap->dev);
-
 		if (IS_ERR(client)) {
 			dev_err(&adap->dev, "failed to create client for '%pOF'\n",
 				 rd->dn);
+			put_device(&adap->dev);
 			of_node_clear_flag(rd->dn, OF_POPULATED);
 			return notifier_from_errno(PTR_ERR(client));
 		}
+		put_device(&adap->dev);
 		break;
 	case OF_RECONFIG_CHANGE_REMOVE:
 		/* already depopulated? */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/infiniband/hw/hns/hns_roce_hem.h linux-libre-5.3.16-gnu/drivers/infiniband/hw/hns/hns_roce_hem.h
--- linux-libre-5.3.15-gnu/drivers/infiniband/hw/hns/hns_roce_hem.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/infiniband/hw/hns/hns_roce_hem.h	2019-12-13 02:49:56.000000000 -0500
@@ -59,7 +59,7 @@ enum {
 
 #define HNS_ROCE_HEM_CHUNK_LEN	\
 	 ((256 - sizeof(struct list_head) - 2 * sizeof(int)) /	 \
-	 (sizeof(struct scatterlist)))
+	 (sizeof(struct scatterlist) + sizeof(void *)))
 
 #define check_whether_bt_num_3(type, hop_num) \
 	(type < HEM_TYPE_MTT && hop_num == 2)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/infiniband/hw/hns/hns_roce_srq.c linux-libre-5.3.16-gnu/drivers/infiniband/hw/hns/hns_roce_srq.c
--- linux-libre-5.3.15-gnu/drivers/infiniband/hw/hns/hns_roce_srq.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/infiniband/hw/hns/hns_roce_srq.c	2019-12-13 02:49:56.000000000 -0500
@@ -221,7 +221,7 @@ int hns_roce_create_srq(struct ib_srq *i
 	srq->max = roundup_pow_of_two(srq_init_attr->attr.max_wr + 1);
 	srq->max_gs = srq_init_attr->attr.max_sge;
 
-	srq_desc_size = max(16, 16 * srq->max_gs);
+	srq_desc_size = roundup_pow_of_two(max(16, 16 * srq->max_gs));
 
 	srq->wqe_shift = ilog2(srq_desc_size);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/infiniband/hw/qib/qib_sysfs.c linux-libre-5.3.16-gnu/drivers/infiniband/hw/qib/qib_sysfs.c
--- linux-libre-5.3.15-gnu/drivers/infiniband/hw/qib/qib_sysfs.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/infiniband/hw/qib/qib_sysfs.c	2019-12-13 02:49:56.000000000 -0500
@@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->show)
+		return -EIO;
+
 	return pattr->show(ppd, buf);
 }
 
@@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->store)
+		return -EIO;
+
 	return pattr->store(ppd, buf, len);
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/joystick/psxpad-spi.c linux-libre-5.3.16-gnu/drivers/input/joystick/psxpad-spi.c
--- linux-libre-5.3.15-gnu/drivers/input/joystick/psxpad-spi.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/joystick/psxpad-spi.c	2019-12-13 02:49:56.000000000 -0500
@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_d
 	if (!pad)
 		return -ENOMEM;
 
-	pdev = input_allocate_polled_device();
+	pdev = devm_input_allocate_polled_device(&spi->dev);
 	if (!pdev) {
 		dev_err(&spi->dev, "failed to allocate input device\n");
 		return -ENOMEM;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/mouse/synaptics.c linux-libre-5.3.16-gnu/drivers/input/mouse/synaptics.c
--- linux-libre-5.3.15-gnu/drivers/input/mouse/synaptics.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/mouse/synaptics.c	2019-12-13 02:49:56.000000000 -0500
@@ -172,6 +172,7 @@ static const char * const smbus_pnp_ids[
 	"LEN0071", /* T480 */
 	"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
 	"LEN0073", /* X1 Carbon G5 (Elantech) */
+	"LEN0091", /* X1 Carbon 6 */
 	"LEN0092", /* X1 Carbon 6 */
 	"LEN0093", /* T480 */
 	"LEN0096", /* X280 */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/rmi4/rmi_f34v7.c linux-libre-5.3.16-gnu/drivers/input/rmi4/rmi_f34v7.c
--- linux-libre-5.3.15-gnu/drivers/input/rmi4/rmi_f34v7.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/rmi4/rmi_f34v7.c	2019-12-13 02:49:56.000000000 -0500
@@ -1189,6 +1189,9 @@ int rmi_f34v7_do_reflash(struct f34_data
 {
 	int ret;
 
+	f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
+					       f34->fn->irq_mask);
+
 	rmi_f34v7_read_queries_bl_version(f34);
 
 	f34->v7.image = fw->data;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/rmi4/rmi_smbus.c linux-libre-5.3.16-gnu/drivers/input/rmi4/rmi_smbus.c
--- linux-libre-5.3.15-gnu/drivers/input/rmi4/rmi_smbus.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/rmi4/rmi_smbus.c	2019-12-13 02:49:56.000000000 -0500
@@ -163,7 +163,6 @@ static int rmi_smb_write_block(struct rm
 		/* prepare to write next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 exit:
 	mutex_unlock(&rmi_smb->page_mutex);
@@ -215,7 +214,6 @@ static int rmi_smb_read_block(struct rmi
 		/* prepare to read next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 
 	retval = 0;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/touchscreen/cyttsp4_core.c linux-libre-5.3.16-gnu/drivers/input/touchscreen/cyttsp4_core.c
--- linux-libre-5.3.15-gnu/drivers/input/touchscreen/cyttsp4_core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/touchscreen/cyttsp4_core.c	2019-12-13 02:49:56.000000000 -0500
@@ -1990,11 +1990,6 @@ static int cyttsp4_mt_probe(struct cytts
 
 	/* get sysinfo */
 	md->si = &cd->sysinfo;
-	if (!md->si) {
-		dev_err(dev, "%s: Fail get sysinfo pointer from core p=%p\n",
-			__func__, md->si);
-		goto error_get_sysinfo;
-	}
 
 	rc = cyttsp4_setup_input_device(cd);
 	if (rc)
@@ -2004,8 +1999,6 @@ static int cyttsp4_mt_probe(struct cytts
 
 error_init_input:
 	input_free_device(md->input);
-error_get_sysinfo:
-	input_set_drvdata(md->input, NULL);
 error_alloc_failed:
 	dev_err(dev, "%s failed.\n", __func__);
 	return rc;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/input/touchscreen/goodix.c linux-libre-5.3.16-gnu/drivers/input/touchscreen/goodix.c
--- linux-libre-5.3.15-gnu/drivers/input/touchscreen/goodix.c	2019-12-05 05:43:07.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/input/touchscreen/goodix.c	2019-12-13 11:13:07.000000000 -0500
@@ -127,6 +127,15 @@ static const unsigned long goodix_irq_fl
 static const struct dmi_system_id rotated_screen[] = {
 #if defined(CONFIG_DMI) && defined(CONFIG_X86)
 	{
+		.ident = "Teclast X89",
+		.matches = {
+			/* tPAD is too generic, also match on bios date */
+			DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
+			DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
+			DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
+		},
+	},
+	{
 		.ident = "WinBook TW100",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/md/raid0.c linux-libre-5.3.16-gnu/drivers/md/raid0.c
--- linux-libre-5.3.15-gnu/drivers/md/raid0.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/md/raid0.c	2019-12-13 02:49:56.000000000 -0500
@@ -612,7 +612,7 @@ static bool raid0_make_request(struct md
 		tmp_dev = map_sector(mddev, zone, sector, &sector);
 		break;
 	default:
-		WARN("md/raid0:%s: Invalid layout\n", mdname(mddev));
+		WARN(1, "md/raid0:%s: Invalid layout\n", mdname(mddev));
 		bio_io_error(bio);
 		return true;
 	}
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/media/rc/rc-main.c linux-libre-5.3.16-gnu/drivers/media/rc/rc-main.c
--- linux-libre-5.3.15-gnu/drivers/media/rc/rc-main.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/media/rc/rc-main.c	2019-12-13 02:49:56.000000000 -0500
@@ -1773,6 +1773,7 @@ static int rc_prepare_rx_device(struct r
 	set_bit(MSC_SCAN, dev->input_dev->mscbit);
 
 	/* Pointer/mouse events */
+	set_bit(INPUT_PROP_POINTING_STICK, dev->input_dev->propbit);
 	set_bit(EV_REL, dev->input_dev->evbit);
 	set_bit(REL_X, dev->input_dev->relbit);
 	set_bit(REL_Y, dev->input_dev->relbit);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/can/slcan.c linux-libre-5.3.16-gnu/drivers/net/can/slcan.c
--- linux-libre-5.3.15-gnu/drivers/net/can/slcan.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/can/slcan.c	2019-12-13 02:49:56.000000000 -0500
@@ -613,6 +613,7 @@ err_free_chan:
 	sl->tty = NULL;
 	tty->disc_data = NULL;
 	clear_bit(SLF_INUSE, &sl->flags);
+	slc_free_netdev(sl->dev);
 	free_netdev(sl->dev);
 
 err_exit:
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/can/usb/ucan.c linux-libre-5.3.16-gnu/drivers/net/can/usb/ucan.c
--- linux-libre-5.3.15-gnu/drivers/net/can/usb/ucan.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/can/usb/ucan.c	2019-12-13 02:49:56.000000000 -0500
@@ -792,7 +792,7 @@ resubmit:
 			  up);
 
 	usb_anchor_urb(urb, &up->rx_urbs);
-	ret = usb_submit_urb(urb, GFP_KERNEL);
+	ret = usb_submit_urb(urb, GFP_ATOMIC);
 
 	if (ret < 0) {
 		netdev_err(up->netdev,
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/ethernet/cirrus/ep93xx_eth.c linux-libre-5.3.16-gnu/drivers/net/ethernet/cirrus/ep93xx_eth.c
--- linux-libre-5.3.15-gnu/drivers/net/ethernet/cirrus/ep93xx_eth.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/ethernet/cirrus/ep93xx_eth.c	2019-12-13 02:49:56.000000000 -0500
@@ -763,6 +763,7 @@ static int ep93xx_eth_remove(struct plat
 {
 	struct net_device *dev;
 	struct ep93xx_priv *ep;
+	struct resource *mem;
 
 	dev = platform_get_drvdata(pdev);
 	if (dev == NULL)
@@ -778,8 +779,8 @@ static int ep93xx_eth_remove(struct plat
 		iounmap(ep->base_addr);
 
 	if (ep->res != NULL) {
-		release_resource(ep->res);
-		kfree(ep->res);
+		mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		release_mem_region(mem->start, resource_size(mem));
 	}
 
 	free_netdev(dev);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c linux-libre-5.3.16-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
--- linux-libre-5.3.15-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c	2019-12-13 02:49:56.000000000 -0500
@@ -124,7 +124,7 @@ static int hclge_ets_validate(struct hcl
 	if (ret)
 		return ret;
 
-	for (i = 0; i < HNAE3_MAX_TC; i++) {
+	for (i = 0; i < hdev->tc_max; i++) {
 		switch (ets->tc_tsa[i]) {
 		case IEEE_8021QAZ_TSA_STRICT:
 			if (hdev->tm_info.tc_info[i].tc_sch_mode !=
@@ -302,6 +302,7 @@ static int hclge_ieee_setpfc(struct hnae
 	struct hclge_vport *vport = hclge_get_vport(h);
 	struct hclge_dev *hdev = vport->back;
 	u8 i, j, pfc_map, *prio_tc;
+	int ret;
 
 	if (!(hdev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) ||
 	    hdev->flag & HCLGE_FLAG_MQPRIO_ENABLE)
@@ -327,7 +328,21 @@ static int hclge_ieee_setpfc(struct hnae
 
 	hclge_tm_pfc_info_update(hdev);
 
-	return hclge_pause_setup_hw(hdev, false);
+	ret = hclge_pause_setup_hw(hdev, false);
+	if (ret)
+		return ret;
+
+	ret = hclge_notify_client(hdev, HNAE3_DOWN_CLIENT);
+	if (ret)
+		return ret;
+
+	ret = hclge_buffer_alloc(hdev);
+	if (ret) {
+		hclge_notify_client(hdev, HNAE3_UP_CLIENT);
+		return ret;
+	}
+
+	return hclge_notify_client(hdev, HNAE3_UP_CLIENT);
 }
 
 /* DCBX configuration */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/ethernet/renesas/ravb.h linux-libre-5.3.16-gnu/drivers/net/ethernet/renesas/ravb.h
--- linux-libre-5.3.15-gnu/drivers/net/ethernet/renesas/ravb.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/ethernet/renesas/ravb.h	2019-12-13 02:49:56.000000000 -0500
@@ -960,6 +960,8 @@ enum RAVB_QUEUE {
 #define NUM_RX_QUEUE	2
 #define NUM_TX_QUEUE	2
 
+#define RX_BUF_SZ	(2048 - ETH_FCS_LEN + sizeof(__sum16))
+
 /* TX descriptors per packet */
 #define NUM_TX_DESC_GEN2	2
 #define NUM_TX_DESC_GEN3	1
@@ -1023,7 +1025,6 @@ struct ravb_private {
 	u32 dirty_rx[NUM_RX_QUEUE];	/* Producer ring indices */
 	u32 cur_tx[NUM_TX_QUEUE];
 	u32 dirty_tx[NUM_TX_QUEUE];
-	u32 rx_buf_sz;			/* Based on MTU+slack. */
 	struct napi_struct napi[NUM_RX_QUEUE];
 	struct work_struct work;
 	/* MII transceiver section. */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/ethernet/renesas/ravb_main.c linux-libre-5.3.16-gnu/drivers/net/ethernet/renesas/ravb_main.c
--- linux-libre-5.3.15-gnu/drivers/net/ethernet/renesas/ravb_main.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/ethernet/renesas/ravb_main.c	2019-12-13 02:49:56.000000000 -0500
@@ -230,7 +230,7 @@ static void ravb_ring_free(struct net_de
 					       le32_to_cpu(desc->dptr)))
 				dma_unmap_single(ndev->dev.parent,
 						 le32_to_cpu(desc->dptr),
-						 priv->rx_buf_sz,
+						 RX_BUF_SZ,
 						 DMA_FROM_DEVICE);
 		}
 		ring_size = sizeof(struct ravb_ex_rx_desc) *
@@ -293,9 +293,9 @@ static void ravb_ring_format(struct net_
 	for (i = 0; i < priv->num_rx_ring[q]; i++) {
 		/* RX descriptor */
 		rx_desc = &priv->rx_ring[q][i];
-		rx_desc->ds_cc = cpu_to_le16(priv->rx_buf_sz);
+		rx_desc->ds_cc = cpu_to_le16(RX_BUF_SZ);
 		dma_addr = dma_map_single(ndev->dev.parent, priv->rx_skb[q][i]->data,
-					  priv->rx_buf_sz,
+					  RX_BUF_SZ,
 					  DMA_FROM_DEVICE);
 		/* We just set the data size to 0 for a failed mapping which
 		 * should prevent DMA from happening...
@@ -342,9 +342,6 @@ static int ravb_ring_init(struct net_dev
 	int ring_size;
 	int i;
 
-	priv->rx_buf_sz = (ndev->mtu <= 1492 ? PKT_BUF_SZ : ndev->mtu) +
-		ETH_HLEN + VLAN_HLEN + sizeof(__sum16);
-
 	/* Allocate RX and TX skb rings */
 	priv->rx_skb[q] = kcalloc(priv->num_rx_ring[q],
 				  sizeof(*priv->rx_skb[q]), GFP_KERNEL);
@@ -354,7 +351,7 @@ static int ravb_ring_init(struct net_dev
 		goto error;
 
 	for (i = 0; i < priv->num_rx_ring[q]; i++) {
-		skb = netdev_alloc_skb(ndev, priv->rx_buf_sz + RAVB_ALIGN - 1);
+		skb = netdev_alloc_skb(ndev, RX_BUF_SZ + RAVB_ALIGN - 1);
 		if (!skb)
 			goto error;
 		ravb_set_buffer_align(skb);
@@ -590,7 +587,7 @@ static bool ravb_rx(struct net_device *n
 			skb = priv->rx_skb[q][entry];
 			priv->rx_skb[q][entry] = NULL;
 			dma_unmap_single(ndev->dev.parent, le32_to_cpu(desc->dptr),
-					 priv->rx_buf_sz,
+					 RX_BUF_SZ,
 					 DMA_FROM_DEVICE);
 			get_ts &= (q == RAVB_NC) ?
 					RAVB_RXTSTAMP_TYPE_V2_L2_EVENT :
@@ -623,11 +620,11 @@ static bool ravb_rx(struct net_device *n
 	for (; priv->cur_rx[q] - priv->dirty_rx[q] > 0; priv->dirty_rx[q]++) {
 		entry = priv->dirty_rx[q] % priv->num_rx_ring[q];
 		desc = &priv->rx_ring[q][entry];
-		desc->ds_cc = cpu_to_le16(priv->rx_buf_sz);
+		desc->ds_cc = cpu_to_le16(RX_BUF_SZ);
 
 		if (!priv->rx_skb[q][entry]) {
 			skb = netdev_alloc_skb(ndev,
-					       priv->rx_buf_sz +
+					       RX_BUF_SZ +
 					       RAVB_ALIGN - 1);
 			if (!skb)
 				break;	/* Better luck next round. */
@@ -1814,10 +1811,15 @@ static int ravb_do_ioctl(struct net_devi
 
 static int ravb_change_mtu(struct net_device *ndev, int new_mtu)
 {
-	if (netif_running(ndev))
-		return -EBUSY;
+	struct ravb_private *priv = netdev_priv(ndev);
 
 	ndev->mtu = new_mtu;
+
+	if (netif_running(ndev)) {
+		synchronize_irq(priv->emac_irq);
+		ravb_emac_init(ndev);
+	}
+
 	netdev_update_features(ndev);
 
 	return 0;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c linux-libre-5.3.16-gnu/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
--- linux-libre-5.3.15-gnu/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c	2019-12-13 02:49:56.000000000 -0500
@@ -252,27 +252,23 @@ static int iwl_pcie_gen2_build_amsdu(str
 	struct ieee80211_hdr *hdr = (void *)skb->data;
 	unsigned int snap_ip_tcp_hdrlen, ip_hdrlen, total_len, hdr_room;
 	unsigned int mss = skb_shinfo(skb)->gso_size;
-	u16 length, iv_len, amsdu_pad;
+	u16 length, amsdu_pad;
 	u8 *start_hdr;
 	struct iwl_tso_hdr_page *hdr_page;
 	struct page **page_ptr;
 	struct tso_t tso;
 
-	/* if the packet is protected, then it must be CCMP or GCMP */
-	iv_len = ieee80211_has_protected(hdr->frame_control) ?
-		IEEE80211_CCMP_HDR_LEN : 0;
-
 	trace_iwlwifi_dev_tx(trans->dev, skb, tfd, sizeof(*tfd),
 			     &dev_cmd->hdr, start_len, 0);
 
 	ip_hdrlen = skb_transport_header(skb) - skb_network_header(skb);
 	snap_ip_tcp_hdrlen = 8 + ip_hdrlen + tcp_hdrlen(skb);
-	total_len = skb->len - snap_ip_tcp_hdrlen - hdr_len - iv_len;
+	total_len = skb->len - snap_ip_tcp_hdrlen - hdr_len;
 	amsdu_pad = 0;
 
 	/* total amount of header we may need for this A-MSDU */
 	hdr_room = DIV_ROUND_UP(total_len, mss) *
-		(3 + snap_ip_tcp_hdrlen + sizeof(struct ethhdr)) + iv_len;
+		(3 + snap_ip_tcp_hdrlen + sizeof(struct ethhdr));
 
 	/* Our device supports 9 segments at most, it will fit in 1 page */
 	hdr_page = get_page_hdr(trans, hdr_room);
@@ -283,14 +279,12 @@ static int iwl_pcie_gen2_build_amsdu(str
 	start_hdr = hdr_page->pos;
 	page_ptr = (void *)((u8 *)skb->cb + trans_pcie->page_offs);
 	*page_ptr = hdr_page->page;
-	memcpy(hdr_page->pos, skb->data + hdr_len, iv_len);
-	hdr_page->pos += iv_len;
 
 	/*
-	 * Pull the ieee80211 header + IV to be able to use TSO core,
+	 * Pull the ieee80211 header to be able to use TSO core,
 	 * we will restore it for the tx_status flow.
 	 */
-	skb_pull(skb, hdr_len + iv_len);
+	skb_pull(skb, hdr_len);
 
 	/*
 	 * Remove the length of all the headers that we don't actually
@@ -365,8 +359,8 @@ static int iwl_pcie_gen2_build_amsdu(str
 		}
 	}
 
-	/* re -add the WiFi header and IV */
-	skb_push(skb, hdr_len + iv_len);
+	/* re -add the WiFi header */
+	skb_push(skb, hdr_len);
 
 	return 0;
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/net/wireless/rsi/rsi_91x_mgmt.c linux-libre-5.3.16-gnu/drivers/net/wireless/rsi/rsi_91x_mgmt.c
--- linux-libre-5.3.15-gnu/drivers/net/wireless/rsi/rsi_91x_mgmt.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/net/wireless/rsi/rsi_91x_mgmt.c	2019-12-13 02:49:56.000000000 -0500
@@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_co
 		skb_pull(skb, (64 - dword_align_bytes));
 	if (rsi_prepare_beacon(common, skb)) {
 		rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n");
+		dev_kfree_skb(skb);
 		return -EINVAL;
 	}
 	skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/nfc/nxp-nci/i2c.c linux-libre-5.3.16-gnu/drivers/nfc/nxp-nci/i2c.c
--- linux-libre-5.3.15-gnu/drivers/nfc/nxp-nci/i2c.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/nfc/nxp-nci/i2c.c	2019-12-13 02:49:56.000000000 -0500
@@ -225,8 +225,10 @@ static irqreturn_t nxp_nci_i2c_irq_threa
 
 	if (r == -EREMOTEIO) {
 		phy->hard_fault = r;
-		skb = NULL;
-	} else if (r < 0) {
+		if (info->mode == NXP_NCI_MODE_FW)
+			nxp_nci_fw_recv_frame(phy->ndev, NULL);
+	}
+	if (r < 0) {
 		nfc_err(&client->dev, "Read failed with error %d\n", r);
 		goto exit_irq_handled;
 	}
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/spi/spi-atmel.c linux-libre-5.3.16-gnu/drivers/spi/spi-atmel.c
--- linux-libre-5.3.15-gnu/drivers/spi/spi-atmel.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/spi/spi-atmel.c	2019-12-13 02:49:56.000000000 -0500
@@ -1182,10 +1182,8 @@ static int atmel_spi_setup(struct spi_de
 	as = spi_master_get_devdata(spi->master);
 
 	/* see notes above re chipselect */
-	if (!atmel_spi_is_v2(as)
-			&& spi->chip_select == 0
-			&& (spi->mode & SPI_CS_HIGH)) {
-		dev_dbg(&spi->dev, "setup: can't be active-high\n");
+	if (!as->use_cs_gpios && (spi->mode & SPI_CS_HIGH)) {
+		dev_warn(&spi->dev, "setup: non GPIO CS can't be active-high\n");
 		return -EINVAL;
 	}
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/spi/spi.c linux-libre-5.3.16-gnu/drivers/spi/spi.c
--- linux-libre-5.3.15-gnu/drivers/spi/spi.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/spi/spi.c	2019-12-13 02:49:56.000000000 -0500
@@ -1710,15 +1710,7 @@ static int of_spi_parse_dt(struct spi_co
 		spi->mode |= SPI_3WIRE;
 	if (of_property_read_bool(nc, "spi-lsb-first"))
 		spi->mode |= SPI_LSB_FIRST;
-
-	/*
-	 * For descriptors associated with the device, polarity inversion is
-	 * handled in the gpiolib, so all chip selects are "active high" in
-	 * the logical sense, the gpiolib will invert the line if need be.
-	 */
-	if (ctlr->use_gpio_descriptors)
-		spi->mode |= SPI_CS_HIGH;
-	else if (of_property_read_bool(nc, "spi-cs-high"))
+	if (of_property_read_bool(nc, "spi-cs-high"))
 		spi->mode |= SPI_CS_HIGH;
 
 	/* Device DUAL/QUAD mode */
@@ -1782,6 +1774,15 @@ static int of_spi_parse_dt(struct spi_co
 	}
 	spi->chip_select = value;
 
+	/*
+	 * For descriptors associated with the device, polarity inversion is
+	 * handled in the gpiolib, so all gpio chip selects are "active high"
+	 * in the logical sense, the gpiolib will invert the line if need be.
+	 */
+	if ((ctlr->use_gpio_descriptors) && ctlr->cs_gpiods &&
+	    ctlr->cs_gpiods[spi->chip_select])
+		spi->mode |= SPI_CS_HIGH;
+
 	/* Device speed */
 	rc = of_property_read_u32(nc, "spi-max-frequency", &value);
 	if (rc) {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/spi/spi-fsl-qspi.c linux-libre-5.3.16-gnu/drivers/spi/spi-fsl-qspi.c
--- linux-libre-5.3.15-gnu/drivers/spi/spi-fsl-qspi.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/spi/spi-fsl-qspi.c	2019-12-13 02:49:56.000000000 -0500
@@ -63,6 +63,11 @@
 #define QUADSPI_IPCR			0x08
 #define QUADSPI_IPCR_SEQID(x)		((x) << 24)
 
+#define QUADSPI_FLSHCR			0x0c
+#define QUADSPI_FLSHCR_TCSS_MASK	GENMASK(3, 0)
+#define QUADSPI_FLSHCR_TCSH_MASK	GENMASK(11, 8)
+#define QUADSPI_FLSHCR_TDH_MASK		GENMASK(17, 16)
+
 #define QUADSPI_BUF3CR			0x1c
 #define QUADSPI_BUF3CR_ALLMST_MASK	BIT(31)
 #define QUADSPI_BUF3CR_ADATSZ(x)	((x) << 8)
@@ -95,6 +100,9 @@
 #define QUADSPI_FR			0x160
 #define QUADSPI_FR_TFF_MASK		BIT(0)
 
+#define QUADSPI_RSER			0x164
+#define QUADSPI_RSER_TFIE		BIT(0)
+
 #define QUADSPI_SPTRCLR			0x16c
 #define QUADSPI_SPTRCLR_IPPTRC		BIT(8)
 #define QUADSPI_SPTRCLR_BFPTRC		BIT(0)
@@ -112,9 +120,6 @@
 #define QUADSPI_LCKER_LOCK		BIT(0)
 #define QUADSPI_LCKER_UNLOCK		BIT(1)
 
-#define QUADSPI_RSER			0x164
-#define QUADSPI_RSER_TFIE		BIT(0)
-
 #define QUADSPI_LUT_BASE		0x310
 #define QUADSPI_LUT_OFFSET		(SEQID_LUT * 4 * 4)
 #define QUADSPI_LUT_REG(idx) \
@@ -181,6 +186,12 @@
  */
 #define QUADSPI_QUIRK_BASE_INTERNAL	BIT(4)
 
+/*
+ * Controller uses TDH bits in register QUADSPI_FLSHCR.
+ * They need to be set in accordance with the DDR/SDR mode.
+ */
+#define QUADSPI_QUIRK_USE_TDH_SETTING	BIT(5)
+
 struct fsl_qspi_devtype_data {
 	unsigned int rxfifo;
 	unsigned int txfifo;
@@ -209,7 +220,8 @@ static const struct fsl_qspi_devtype_dat
 	.rxfifo = SZ_128,
 	.txfifo = SZ_512,
 	.ahb_buf_size = SZ_1K,
-	.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK,
+	.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK |
+		  QUADSPI_QUIRK_USE_TDH_SETTING,
 	.little_endian = true,
 };
 
@@ -217,7 +229,8 @@ static const struct fsl_qspi_devtype_dat
 	.rxfifo = SZ_128,
 	.txfifo = SZ_512,
 	.ahb_buf_size = SZ_1K,
-	.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK,
+	.quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK |
+		  QUADSPI_QUIRK_USE_TDH_SETTING,
 	.little_endian = true,
 };
 
@@ -275,6 +288,11 @@ static inline int needs_amba_base_offset
 	return !(q->devtype_data->quirks & QUADSPI_QUIRK_BASE_INTERNAL);
 }
 
+static inline int needs_tdh_setting(struct fsl_qspi *q)
+{
+	return q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING;
+}
+
 /*
  * An IC bug makes it necessary to rearrange the 32-bit data.
  * Later chips, such as IMX6SLX, have fixed this bug.
@@ -710,6 +728,16 @@ static int fsl_qspi_default_setup(struct
 	qspi_writel(q, QUADSPI_MCR_MDIS_MASK | QUADSPI_MCR_RESERVED_MASK,
 		    base + QUADSPI_MCR);
 
+	/*
+	 * Previous boot stages (BootROM, bootloader) might have used DDR
+	 * mode and did not clear the TDH bits. As we currently use SDR mode
+	 * only, clear the TDH bits if necessary.
+	 */
+	if (needs_tdh_setting(q))
+		qspi_writel(q, qspi_readl(q, base + QUADSPI_FLSHCR) &
+			    ~QUADSPI_FLSHCR_TDH_MASK,
+			    base + QUADSPI_FLSHCR);
+
 	reg = qspi_readl(q, base + QUADSPI_SMPR);
 	qspi_writel(q, reg & ~(QUADSPI_SMPR_FSDLY_MASK
 			| QUADSPI_SMPR_FSPHS_MASK
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/spi/spi-stm32-qspi.c linux-libre-5.3.16-gnu/drivers/spi/spi-stm32-qspi.c
--- linux-libre-5.3.15-gnu/drivers/spi/spi-stm32-qspi.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/spi/spi-stm32-qspi.c	2019-12-13 02:49:56.000000000 -0500
@@ -528,7 +528,6 @@ static void stm32_qspi_release(struct st
 	stm32_qspi_dma_free(qspi);
 	mutex_destroy(&qspi->lock);
 	clk_disable_unprepare(qspi->clk);
-	spi_master_put(qspi->ctrl);
 }
 
 static int stm32_qspi_probe(struct platform_device *pdev)
@@ -629,6 +628,8 @@ static int stm32_qspi_probe(struct platf
 
 err:
 	stm32_qspi_release(qspi);
+	spi_master_put(qspi->ctrl);
+
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/thermal/thermal_core.c linux-libre-5.3.16-gnu/drivers/thermal/thermal_core.c
--- linux-libre-5.3.15-gnu/drivers/thermal/thermal_core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/thermal/thermal_core.c	2019-12-13 02:49:56.000000000 -0500
@@ -304,7 +304,7 @@ static void thermal_zone_device_set_poll
 				 &tz->poll_queue,
 				 msecs_to_jiffies(delay));
 	else
-		cancel_delayed_work_sync(&tz->poll_queue);
+		cancel_delayed_work(&tz->poll_queue);
 }
 
 static void monitor_thermal_zone(struct thermal_zone_device *tz)
@@ -1404,7 +1404,7 @@ void thermal_zone_device_unregister(stru
 
 	mutex_unlock(&thermal_list_lock);
 
-	thermal_zone_device_set_polling(tz, 0);
+	cancel_delayed_work_sync(&tz->poll_queue);
 
 	thermal_set_governor(tz, NULL);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/amba-pl011.c linux-libre-5.3.16-gnu/drivers/tty/serial/amba-pl011.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/amba-pl011.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/amba-pl011.c	2019-12-13 02:49:56.000000000 -0500
@@ -813,10 +813,8 @@ __acquires(&uap->port.lock)
 	if (!uap->using_tx_dma)
 		return;
 
-	/* Avoid deadlock with the DMA engine callback */
-	spin_unlock(&uap->port.lock);
-	dmaengine_terminate_all(uap->dmatx.chan);
-	spin_lock(&uap->port.lock);
+	dmaengine_terminate_async(uap->dmatx.chan);
+
 	if (uap->dmatx.queued) {
 		dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1,
 			     DMA_TO_DEVICE);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/fsl_lpuart.c linux-libre-5.3.16-gnu/drivers/tty/serial/fsl_lpuart.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/fsl_lpuart.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/fsl_lpuart.c	2019-12-13 02:49:56.000000000 -0500
@@ -436,8 +436,8 @@ static void lpuart_dma_tx(struct lpuart_
 	}
 
 	sport->dma_tx_desc = dmaengine_prep_slave_sg(sport->dma_tx_chan, sgl,
-					sport->dma_tx_nents,
-					DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
+					ret, DMA_MEM_TO_DEV,
+					DMA_PREP_INTERRUPT);
 	if (!sport->dma_tx_desc) {
 		dma_unmap_sg(dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE);
 		dev_err(dev, "Cannot prepare TX slave DMA!\n");
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/ifx6x60.c linux-libre-5.3.16-gnu/drivers/tty/serial/ifx6x60.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/ifx6x60.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/ifx6x60.c	2019-12-13 02:49:56.000000000 -0500
@@ -1230,6 +1230,9 @@ static int ifx_spi_spi_remove(struct spi
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
 	/* stop activity */
 	tasklet_kill(&ifx_dev->io_work_tasklet);
+
+	pm_runtime_disable(&spi->dev);
+
 	/* free irq */
 	free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), ifx_dev);
 	free_irq(gpio_to_irq(ifx_dev->gpio.srdy), ifx_dev);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/msm_serial.c linux-libre-5.3.16-gnu/drivers/tty/serial/msm_serial.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/msm_serial.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/msm_serial.c	2019-12-13 02:49:56.000000000 -0500
@@ -980,6 +980,7 @@ static unsigned int msm_get_mctrl(struct
 static void msm_reset(struct uart_port *port)
 {
 	struct msm_port *msm_port = UART_TO_MSM(port);
+	unsigned int mr;
 
 	/* reset everything */
 	msm_write(port, UART_CR_CMD_RESET_RX, UART_CR);
@@ -987,7 +988,10 @@ static void msm_reset(struct uart_port *
 	msm_write(port, UART_CR_CMD_RESET_ERR, UART_CR);
 	msm_write(port, UART_CR_CMD_RESET_BREAK_INT, UART_CR);
 	msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR);
-	msm_write(port, UART_CR_CMD_SET_RFR, UART_CR);
+	msm_write(port, UART_CR_CMD_RESET_RFR, UART_CR);
+	mr = msm_read(port, UART_MR1);
+	mr &= ~UART_MR1_RX_RDY_CTL;
+	msm_write(port, mr, UART_MR1);
 
 	/* Disable DM modes */
 	if (msm_port->is_uartdm)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/serial_core.c linux-libre-5.3.16-gnu/drivers/tty/serial/serial_core.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/serial_core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/serial_core.c	2019-12-13 02:49:56.000000000 -0500
@@ -1106,7 +1106,7 @@ static int uart_break_ctl(struct tty_str
 	if (!uport)
 		goto out;
 
-	if (uport->type != PORT_UNKNOWN)
+	if (uport->type != PORT_UNKNOWN && uport->ops->break_ctl)
 		uport->ops->break_ctl(uport, break_state);
 	ret = 0;
 out:
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/serial/stm32-usart.c linux-libre-5.3.16-gnu/drivers/tty/serial/stm32-usart.c
--- linux-libre-5.3.15-gnu/drivers/tty/serial/stm32-usart.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/serial/stm32-usart.c	2019-12-13 02:49:56.000000000 -0500
@@ -239,8 +239,8 @@ static void stm32_receive_chars(struct u
 		 * cleared by the sequence [read SR - read DR].
 		 */
 		if ((sr & USART_SR_ERR_MASK) && ofs->icr != UNDEF_REG)
-			stm32_clr_bits(port, ofs->icr, USART_ICR_ORECF |
-				       USART_ICR_PECF | USART_ICR_FECF);
+			writel_relaxed(sr & USART_SR_ERR_MASK,
+				       port->membase + ofs->icr);
 
 		c = stm32_get_char(port, &sr, &stm32_port->last_res);
 		port->icount.rx++;
@@ -434,7 +434,7 @@ static void stm32_transmit_chars(struct
 	if (ofs->icr == UNDEF_REG)
 		stm32_clr_bits(port, ofs->isr, USART_SR_TC);
 	else
-		stm32_set_bits(port, ofs->icr, USART_ICR_TCCF);
+		writel_relaxed(USART_ICR_TCCF, port->membase + ofs->icr);
 
 	if (stm32_port->tx_ch)
 		stm32_transmit_chars_dma(port);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/vt/keyboard.c linux-libre-5.3.16-gnu/drivers/tty/vt/keyboard.c
--- linux-libre-5.3.15-gnu/drivers/tty/vt/keyboard.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/vt/keyboard.c	2019-12-13 02:49:56.000000000 -0500
@@ -1491,7 +1491,7 @@ static void kbd_event(struct input_handl
 
 	if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
 		kbd_rawcode(value);
-	if (event_type == EV_KEY)
+	if (event_type == EV_KEY && event_code <= KEY_MAX)
 		kbd_keycode(event_code, value, HW_RAW(handle->dev));
 
 	spin_unlock(&kbd_event_lock);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/tty/vt/vc_screen.c linux-libre-5.3.16-gnu/drivers/tty/vt/vc_screen.c
--- linux-libre-5.3.15-gnu/drivers/tty/vt/vc_screen.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/tty/vt/vc_screen.c	2019-12-13 02:49:56.000000000 -0500
@@ -456,6 +456,9 @@ vcs_write(struct file *file, const char
 	size_t ret;
 	char *con_buf;
 
+	if (use_unicode(inode))
+		return -EOPNOTSUPP;
+
 	con_buf = (char *) __get_free_page(GFP_KERNEL);
 	if (!con_buf)
 		return -ENOMEM;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/usb/gadget/function/u_serial.c linux-libre-5.3.16-gnu/drivers/usb/gadget/function/u_serial.c
--- linux-libre-5.3.15-gnu/drivers/usb/gadget/function/u_serial.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/usb/gadget/function/u_serial.c	2019-12-13 02:49:56.000000000 -0500
@@ -1239,8 +1239,10 @@ int gserial_alloc_line(unsigned char *li
 				__func__, port_num, PTR_ERR(tty_dev));
 
 		ret = PTR_ERR(tty_dev);
+		mutex_lock(&ports[port_num].lock);
 		port = ports[port_num].port;
 		ports[port_num].port = NULL;
+		mutex_unlock(&ports[port_num].lock);
 		gserial_free_port(port);
 		goto err;
 	}
diff -druNp --no-dereference linux-libre-5.3.15-gnu/drivers/watchdog/aspeed_wdt.c linux-libre-5.3.16-gnu/drivers/watchdog/aspeed_wdt.c
--- linux-libre-5.3.15-gnu/drivers/watchdog/aspeed_wdt.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/drivers/watchdog/aspeed_wdt.c	2019-12-13 02:49:56.000000000 -0500
@@ -202,11 +202,6 @@ static int aspeed_wdt_probe(struct platf
 	if (IS_ERR(wdt->base))
 		return PTR_ERR(wdt->base);
 
-	/*
-	 * The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only
-	 * runs at 1MHz. We chose to always run at 1MHz, as there's no
-	 * good reason to have a faster watchdog counter.
-	 */
 	wdt->wdd.info = &aspeed_wdt_info;
 	wdt->wdd.ops = &aspeed_wdt_ops;
 	wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS;
@@ -222,7 +217,16 @@ static int aspeed_wdt_probe(struct platf
 		return -EINVAL;
 	config = ofdid->data;
 
-	wdt->ctrl = WDT_CTRL_1MHZ_CLK;
+	/*
+	 * On clock rates:
+	 *  - ast2400 wdt can run at PCLK, or 1MHz
+	 *  - ast2500 only runs at 1MHz, hard coding bit 4 to 1
+	 *  - ast2600 always runs at 1MHz
+	 *
+	 * Set the ast2400 to run at 1MHz as it simplifies the driver.
+	 */
+	if (of_device_is_compatible(np, "aspeed,ast2400-wdt"))
+		wdt->ctrl = WDT_CTRL_1MHZ_CLK;
 
 	/*
 	 * Control reset on a per-device basis to ensure the
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/afs/dir.c linux-libre-5.3.16-gnu/fs/afs/dir.c
--- linux-libre-5.3.15-gnu/fs/afs/dir.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/afs/dir.c	2019-12-13 02:49:56.000000000 -0500
@@ -803,7 +803,12 @@ success:
 			continue;
 
 		if (cookie->inodes[i]) {
-			afs_vnode_commit_status(&fc, AFS_FS_I(cookie->inodes[i]),
+			struct afs_vnode *iv = AFS_FS_I(cookie->inodes[i]);
+
+			if (test_bit(AFS_VNODE_UNSET, &iv->flags))
+				continue;
+
+			afs_vnode_commit_status(&fc, iv,
 						scb->cb_break, NULL, scb);
 			continue;
 		}
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/aio.c linux-libre-5.3.16-gnu/fs/aio.c
--- linux-libre-5.3.15-gnu/fs/aio.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/aio.c	2019-12-13 02:49:56.000000000 -0500
@@ -2179,7 +2179,7 @@ SYSCALL_DEFINE5(io_getevents_time32, __u
 #ifdef CONFIG_COMPAT
 
 struct __compat_aio_sigset {
-	compat_sigset_t __user	*sigmask;
+	compat_uptr_t		sigmask;
 	compat_size_t		sigsetsize;
 };
 
@@ -2193,7 +2193,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents,
 		struct old_timespec32 __user *, timeout,
 		const struct __compat_aio_sigset __user *, usig)
 {
-	struct __compat_aio_sigset ksig = { NULL, };
+	struct __compat_aio_sigset ksig = { 0, };
 	struct timespec64 t;
 	bool interrupted;
 	int ret;
@@ -2204,7 +2204,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents,
 	if (usig && copy_from_user(&ksig, usig, sizeof(ksig)))
 		return -EFAULT;
 
-	ret = set_compat_user_sigmask(ksig.sigmask, ksig.sigsetsize);
+	ret = set_compat_user_sigmask(compat_ptr(ksig.sigmask), ksig.sigsetsize);
 	if (ret)
 		return ret;
 
@@ -2228,7 +2228,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents_tim
 		struct __kernel_timespec __user *, timeout,
 		const struct __compat_aio_sigset __user *, usig)
 {
-	struct __compat_aio_sigset ksig = { NULL, };
+	struct __compat_aio_sigset ksig = { 0, };
 	struct timespec64 t;
 	bool interrupted;
 	int ret;
@@ -2239,7 +2239,7 @@ COMPAT_SYSCALL_DEFINE6(io_pgetevents_tim
 	if (usig && copy_from_user(&ksig, usig, sizeof(ksig)))
 		return -EFAULT;
 
-	ret = set_compat_user_sigmask(ksig.sigmask, ksig.sigsetsize);
+	ret = set_compat_user_sigmask(compat_ptr(ksig.sigmask), ksig.sigsetsize);
 	if (ret)
 		return ret;
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/autofs/expire.c linux-libre-5.3.16-gnu/fs/autofs/expire.c
--- linux-libre-5.3.15-gnu/fs/autofs/expire.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/autofs/expire.c	2019-12-13 02:49:56.000000000 -0500
@@ -498,9 +498,10 @@ static struct dentry *autofs_expire_indi
 		 */
 		how &= ~AUTOFS_EXP_LEAVES;
 		found = should_expire(expired, mnt, timeout, how);
-		if (!found || found != expired)
-			/* Something has changed, continue */
+		if (found != expired) { // something has changed, continue
+			dput(found);
 			goto next;
+		}
 
 		if (expired != dentry)
 			dput(dentry);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/cifs/file.c linux-libre-5.3.16-gnu/fs/cifs/file.c
--- linux-libre-5.3.15-gnu/fs/cifs/file.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/cifs/file.c	2019-12-13 02:49:56.000000000 -0500
@@ -313,9 +313,6 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 	INIT_LIST_HEAD(&fdlocks->locks);
 	fdlocks->cfile = cfile;
 	cfile->llist = fdlocks;
-	cifs_down_write(&cinode->lock_sem);
-	list_add(&fdlocks->llist, &cinode->llist);
-	up_write(&cinode->lock_sem);
 
 	cfile->count = 1;
 	cfile->pid = current->tgid;
@@ -339,6 +336,10 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 		oplock = 0;
 	}
 
+	cifs_down_write(&cinode->lock_sem);
+	list_add(&fdlocks->llist, &cinode->llist);
+	up_write(&cinode->lock_sem);
+
 	spin_lock(&tcon->open_file_lock);
 	if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE && oplock)
 		oplock = fid->pending_open->oplock;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/cifs/smb2misc.c linux-libre-5.3.16-gnu/fs/cifs/smb2misc.c
--- linux-libre-5.3.15-gnu/fs/cifs/smb2misc.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/cifs/smb2misc.c	2019-12-13 02:49:56.000000000 -0500
@@ -673,10 +673,10 @@ smb2_is_valid_oplock_break(char *buffer,
 	spin_lock(&cifs_tcp_ses_lock);
 	list_for_each(tmp, &server->smb_ses_list) {
 		ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
+
 		list_for_each(tmp1, &ses->tcon_list) {
 			tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
 
-			cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks);
 			spin_lock(&tcon->open_file_lock);
 			list_for_each(tmp2, &tcon->openFileList) {
 				cfile = list_entry(tmp2, struct cifsFileInfo,
@@ -688,6 +688,8 @@ smb2_is_valid_oplock_break(char *buffer,
 					continue;
 
 				cifs_dbg(FYI, "file id match, oplock break\n");
+				cifs_stats_inc(
+				    &tcon->stats.cifs_stats.num_oplock_brks);
 				cinode = CIFS_I(d_inode(cfile->dentry));
 				spin_lock(&cfile->file_info_lock);
 				if (!CIFS_CACHE_WRITE(cinode) &&
@@ -720,9 +722,6 @@ smb2_is_valid_oplock_break(char *buffer,
 				return true;
 			}
 			spin_unlock(&tcon->open_file_lock);
-			spin_unlock(&cifs_tcp_ses_lock);
-			cifs_dbg(FYI, "No matching file for oplock break\n");
-			return true;
 		}
 	}
 	spin_unlock(&cifs_tcp_ses_lock);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/ecryptfs/inode.c linux-libre-5.3.16-gnu/fs/ecryptfs/inode.c
--- linux-libre-5.3.15-gnu/fs/ecryptfs/inode.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/ecryptfs/inode.c	2019-12-13 02:49:56.000000000 -0500
@@ -128,13 +128,20 @@ static int ecryptfs_do_unlink(struct ino
 			      struct inode *inode)
 {
 	struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
-	struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir);
 	struct dentry *lower_dir_dentry;
+	struct inode *lower_dir_inode;
 	int rc;
 
-	dget(lower_dentry);
-	lower_dir_dentry = lock_parent(lower_dentry);
-	rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL);
+	lower_dir_dentry = ecryptfs_dentry_to_lower(dentry->d_parent);
+	lower_dir_inode = d_inode(lower_dir_dentry);
+	inode_lock_nested(lower_dir_inode, I_MUTEX_PARENT);
+	dget(lower_dentry);	// don't even try to make the lower negative
+	if (lower_dentry->d_parent != lower_dir_dentry)
+		rc = -EINVAL;
+	else if (d_unhashed(lower_dentry))
+		rc = -EINVAL;
+	else
+		rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL);
 	if (rc) {
 		printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc);
 		goto out_unlock;
@@ -142,10 +149,11 @@ static int ecryptfs_do_unlink(struct ino
 	fsstack_copy_attr_times(dir, lower_dir_inode);
 	set_nlink(inode, ecryptfs_inode_to_lower(inode)->i_nlink);
 	inode->i_ctime = dir->i_ctime;
-	d_drop(dentry);
 out_unlock:
-	unlock_dir(lower_dir_dentry);
 	dput(lower_dentry);
+	inode_unlock(lower_dir_inode);
+	if (!rc)
+		d_drop(dentry);
 	return rc;
 }
 
@@ -519,22 +527,30 @@ static int ecryptfs_rmdir(struct inode *
 {
 	struct dentry *lower_dentry;
 	struct dentry *lower_dir_dentry;
+	struct inode *lower_dir_inode;
 	int rc;
 
 	lower_dentry = ecryptfs_dentry_to_lower(dentry);
-	dget(dentry);
-	lower_dir_dentry = lock_parent(lower_dentry);
-	dget(lower_dentry);
-	rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry);
-	dput(lower_dentry);
-	if (!rc && d_really_is_positive(dentry))
+	lower_dir_dentry = ecryptfs_dentry_to_lower(dentry->d_parent);
+	lower_dir_inode = d_inode(lower_dir_dentry);
+
+	inode_lock_nested(lower_dir_inode, I_MUTEX_PARENT);
+	dget(lower_dentry);	// don't even try to make the lower negative
+	if (lower_dentry->d_parent != lower_dir_dentry)
+		rc = -EINVAL;
+	else if (d_unhashed(lower_dentry))
+		rc = -EINVAL;
+	else
+		rc = vfs_rmdir(lower_dir_inode, lower_dentry);
+	if (!rc) {
 		clear_nlink(d_inode(dentry));
-	fsstack_copy_attr_times(dir, d_inode(lower_dir_dentry));
-	set_nlink(dir, d_inode(lower_dir_dentry)->i_nlink);
-	unlock_dir(lower_dir_dentry);
+		fsstack_copy_attr_times(dir, lower_dir_inode);
+		set_nlink(dir, lower_dir_inode->i_nlink);
+	}
+	dput(lower_dentry);
+	inode_unlock(lower_dir_inode);
 	if (!rc)
 		d_drop(dentry);
-	dput(dentry);
 	return rc;
 }
 
@@ -572,20 +588,22 @@ ecryptfs_rename(struct inode *old_dir, s
 	struct dentry *lower_new_dentry;
 	struct dentry *lower_old_dir_dentry;
 	struct dentry *lower_new_dir_dentry;
-	struct dentry *trap = NULL;
+	struct dentry *trap;
 	struct inode *target_inode;
 
 	if (flags)
 		return -EINVAL;
 
+	lower_old_dir_dentry = ecryptfs_dentry_to_lower(old_dentry->d_parent);
+	lower_new_dir_dentry = ecryptfs_dentry_to_lower(new_dentry->d_parent);
+
 	lower_old_dentry = ecryptfs_dentry_to_lower(old_dentry);
 	lower_new_dentry = ecryptfs_dentry_to_lower(new_dentry);
-	dget(lower_old_dentry);
-	dget(lower_new_dentry);
-	lower_old_dir_dentry = dget_parent(lower_old_dentry);
-	lower_new_dir_dentry = dget_parent(lower_new_dentry);
+
 	target_inode = d_inode(new_dentry);
+
 	trap = lock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
+	dget(lower_new_dentry);
 	rc = -EINVAL;
 	if (lower_old_dentry->d_parent != lower_old_dir_dentry)
 		goto out_lock;
@@ -613,11 +631,8 @@ ecryptfs_rename(struct inode *old_dir, s
 	if (new_dir != old_dir)
 		fsstack_copy_attr_all(old_dir, d_inode(lower_old_dir_dentry));
 out_lock:
-	unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
-	dput(lower_new_dir_dentry);
-	dput(lower_old_dir_dentry);
 	dput(lower_new_dentry);
-	dput(lower_old_dentry);
+	unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
 	return rc;
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/exportfs/expfs.c linux-libre-5.3.16-gnu/fs/exportfs/expfs.c
--- linux-libre-5.3.15-gnu/fs/exportfs/expfs.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/exportfs/expfs.c	2019-12-13 02:49:56.000000000 -0500
@@ -519,26 +519,33 @@ struct dentry *exportfs_decode_fh(struct
 		 * inode is actually connected to the parent.
 		 */
 		err = exportfs_get_name(mnt, target_dir, nbuf, result);
-		if (!err) {
-			inode_lock(target_dir->d_inode);
-			nresult = lookup_one_len(nbuf, target_dir,
-						 strlen(nbuf));
-			inode_unlock(target_dir->d_inode);
-			if (!IS_ERR(nresult)) {
-				if (nresult->d_inode) {
-					dput(result);
-					result = nresult;
-				} else
-					dput(nresult);
-			}
+		if (err) {
+			dput(target_dir);
+			goto err_result;
 		}
 
+		inode_lock(target_dir->d_inode);
+		nresult = lookup_one_len(nbuf, target_dir, strlen(nbuf));
+		if (!IS_ERR(nresult)) {
+			if (unlikely(nresult->d_inode != result->d_inode)) {
+				dput(nresult);
+				nresult = ERR_PTR(-ESTALE);
+			}
+		}
+		inode_unlock(target_dir->d_inode);
 		/*
 		 * At this point we are done with the parent, but it's pinned
 		 * by the child dentry anyway.
 		 */
 		dput(target_dir);
 
+		if (IS_ERR(nresult)) {
+			err = PTR_ERR(nresult);
+			goto err_result;
+		}
+		dput(result);
+		result = nresult;
+
 		/*
 		 * And finally make sure the dentry is actually acceptable
 		 * to NFSD.
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/fuse/dir.c linux-libre-5.3.16-gnu/fs/fuse/dir.c
--- linux-libre-5.3.15-gnu/fs/fuse/dir.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/fuse/dir.c	2019-12-13 02:49:56.000000000 -0500
@@ -214,7 +214,8 @@ static int fuse_dentry_revalidate(struct
 		kfree(forget);
 		if (ret == -ENOMEM)
 			goto out;
-		if (ret || (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
+		if (ret || fuse_invalid_attr(&outarg.attr) ||
+		    (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
 			goto invalid;
 
 		forget_all_cached_acls(inode);
@@ -272,6 +273,12 @@ int fuse_valid_type(int m)
 		S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
 }
 
+bool fuse_invalid_attr(struct fuse_attr *attr)
+{
+	return !fuse_valid_type(attr->mode) ||
+		attr->size > LLONG_MAX;
+}
+
 int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name,
 		     struct fuse_entry_out *outarg, struct inode **inode)
 {
@@ -303,7 +310,7 @@ int fuse_lookup_name(struct super_block
 	err = -EIO;
 	if (!outarg->nodeid)
 		goto out_put_forget;
-	if (!fuse_valid_type(outarg->attr.mode))
+	if (fuse_invalid_attr(&outarg->attr))
 		goto out_put_forget;
 
 	*inode = fuse_iget(sb, outarg->nodeid, outarg->generation,
@@ -427,7 +434,8 @@ static int fuse_create_open(struct inode
 		goto out_free_ff;
 
 	err = -EIO;
-	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid))
+	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid) ||
+	    fuse_invalid_attr(&outentry.attr))
 		goto out_free_ff;
 
 	ff->fh = outopen.fh;
@@ -535,7 +543,7 @@ static int create_new_entry(struct fuse_
 		goto out_put_forget_req;
 
 	err = -EIO;
-	if (invalid_nodeid(outarg.nodeid))
+	if (invalid_nodeid(outarg.nodeid) || fuse_invalid_attr(&outarg.attr))
 		goto out_put_forget_req;
 
 	if ((outarg.attr.mode ^ mode) & S_IFMT)
@@ -814,7 +822,8 @@ static int fuse_link(struct dentry *entr
 
 		spin_lock(&fi->lock);
 		fi->attr_version = atomic64_inc_return(&fc->attr_version);
-		inc_nlink(inode);
+		if (likely(inode->i_nlink < UINT_MAX))
+			inc_nlink(inode);
 		spin_unlock(&fi->lock);
 		fuse_invalidate_attr(inode);
 		fuse_update_ctime(inode);
@@ -894,7 +903,8 @@ static int fuse_do_getattr(struct inode
 	args.out.args[0].value = &outarg;
 	err = fuse_simple_request(fc, &args);
 	if (!err) {
-		if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+		if (fuse_invalid_attr(&outarg.attr) ||
+		    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 			make_bad_inode(inode);
 			err = -EIO;
 		} else {
@@ -1517,7 +1527,8 @@ int fuse_do_setattr(struct dentry *dentr
 		goto error;
 	}
 
-	if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+	if (fuse_invalid_attr(&outarg.attr) ||
+	    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 		make_bad_inode(inode);
 		err = -EIO;
 		goto error;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/fuse/fuse_i.h linux-libre-5.3.16-gnu/fs/fuse/fuse_i.h
--- linux-libre-5.3.15-gnu/fs/fuse/fuse_i.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/fuse/fuse_i.h	2019-12-13 02:49:56.000000000 -0500
@@ -1008,6 +1008,8 @@ void fuse_ctl_remove_conn(struct fuse_co
  */
 int fuse_valid_type(int m);
 
+bool fuse_invalid_attr(struct fuse_attr *attr);
+
 /**
  * Is current process allowed to perform filesystem operation?
  */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/fuse/readdir.c linux-libre-5.3.16-gnu/fs/fuse/readdir.c
--- linux-libre-5.3.15-gnu/fs/fuse/readdir.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/fuse/readdir.c	2019-12-13 02:49:56.000000000 -0500
@@ -184,7 +184,7 @@ static int fuse_direntplus_link(struct f
 
 	if (invalid_nodeid(o->nodeid))
 		return -EIO;
-	if (!fuse_valid_type(o->attr.mode))
+	if (fuse_invalid_attr(&o->attr))
 		return -EIO;
 
 	fc = get_fuse_conn(dir);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/iomap/direct-io.c linux-libre-5.3.16-gnu/fs/iomap/direct-io.c
--- linux-libre-5.3.15-gnu/fs/iomap/direct-io.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/iomap/direct-io.c	2019-12-13 02:49:56.000000000 -0500
@@ -501,8 +501,15 @@ iomap_dio_rw(struct kiocb *iocb, struct
 		}
 		pos += ret;
 
-		if (iov_iter_rw(iter) == READ && pos >= dio->i_size)
+		if (iov_iter_rw(iter) == READ && pos >= dio->i_size) {
+			/*
+			 * We only report that we've read data up to i_size.
+			 * Revert iter to a state corresponding to that as
+			 * some callers (such as splice code) rely on it.
+			 */
+			iov_iter_revert(iter, pos - dio->i_size);
 			break;
+		}
 	} while ((count = iov_iter_count(iter)) > 0);
 	blk_finish_plug(&plug);
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/io_uring.c linux-libre-5.3.16-gnu/fs/io_uring.c
--- linux-libre-5.3.15-gnu/fs/io_uring.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/io_uring.c	2019-12-13 02:49:56.000000000 -0500
@@ -1535,6 +1535,8 @@ static int io_send_recvmsg(struct io_kio
 		ret = fn(sock, msg, flags);
 		if (force_nonblock && ret == -EAGAIN)
 			return ret;
+		if (ret == -ERESTARTSYS)
+			ret = -EINTR;
 	}
 
 	io_cqring_add_event(req->ctx, sqe->user_data, ret);
@@ -1785,7 +1787,7 @@ static int io_poll_add(struct io_kiocb *
 }
 
 static int io_req_defer(struct io_ring_ctx *ctx, struct io_kiocb *req,
-			const struct io_uring_sqe *sqe)
+			struct sqe_submit *s)
 {
 	struct io_uring_sqe *sqe_copy;
 
@@ -1803,7 +1805,8 @@ static int io_req_defer(struct io_ring_c
 		return 0;
 	}
 
-	memcpy(sqe_copy, sqe, sizeof(*sqe_copy));
+	memcpy(&req->submit, s, sizeof(*s));
+	memcpy(sqe_copy, s->sqe, sizeof(*sqe_copy));
 	req->submit.sqe = sqe_copy;
 
 	INIT_WORK(&req->work, io_sq_wq_submit_work);
@@ -2112,7 +2115,7 @@ static int io_queue_sqe(struct io_ring_c
 {
 	int ret;
 
-	ret = io_req_defer(ctx, req, s->sqe);
+	ret = io_req_defer(ctx, req, s);
 	if (ret) {
 		if (ret != -EIOCBQUEUED) {
 			io_free_req(req);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/kernfs/dir.c linux-libre-5.3.16-gnu/fs/kernfs/dir.c
--- linux-libre-5.3.15-gnu/fs/kernfs/dir.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/kernfs/dir.c	2019-12-13 02:49:56.000000000 -0500
@@ -621,7 +621,6 @@ static struct kernfs_node *__kernfs_new_
 {
 	struct kernfs_node *kn;
 	u32 gen;
-	int cursor;
 	int ret;
 
 	name = kstrdup_const(name, GFP_KERNEL);
@@ -634,11 +633,11 @@ static struct kernfs_node *__kernfs_new_
 
 	idr_preload(GFP_KERNEL);
 	spin_lock(&kernfs_idr_lock);
-	cursor = idr_get_cursor(&root->ino_idr);
 	ret = idr_alloc_cyclic(&root->ino_idr, kn, 1, 0, GFP_ATOMIC);
-	if (ret >= 0 && ret < cursor)
+	if (ret >= 0 && ret < root->last_ino)
 		root->next_generation++;
 	gen = root->next_generation;
+	root->last_ino = ret;
 	spin_unlock(&kernfs_idr_lock);
 	idr_preload_end();
 	if (ret < 0)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/nfsd/nfs4proc.c linux-libre-5.3.16-gnu/fs/nfsd/nfs4proc.c
--- linux-libre-5.3.15-gnu/fs/nfsd/nfs4proc.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/nfsd/nfs4proc.c	2019-12-13 02:49:56.000000000 -0500
@@ -1083,7 +1083,8 @@ nfsd4_clone(struct svc_rqst *rqstp, stru
 		goto out;
 
 	status = nfsd4_clone_file_range(src, clone->cl_src_pos,
-			dst, clone->cl_dst_pos, clone->cl_count);
+			dst, clone->cl_dst_pos, clone->cl_count,
+			EX_ISSYNC(cstate->current_fh.fh_export));
 
 	fput(dst);
 	fput(src);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/nfsd/nfssvc.c linux-libre-5.3.16-gnu/fs/nfsd/nfssvc.c
--- linux-libre-5.3.15-gnu/fs/nfsd/nfssvc.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/nfsd/nfssvc.c	2019-12-13 02:49:56.000000000 -0500
@@ -94,12 +94,11 @@ static const struct svc_version *nfsd_ac
 
 #define NFSD_ACL_MINVERS            2
 #define NFSD_ACL_NRVERS		ARRAY_SIZE(nfsd_acl_version)
-static const struct svc_version *nfsd_acl_versions[NFSD_ACL_NRVERS];
 
 static struct svc_program	nfsd_acl_program = {
 	.pg_prog		= NFS_ACL_PROGRAM,
 	.pg_nvers		= NFSD_ACL_NRVERS,
-	.pg_vers		= nfsd_acl_versions,
+	.pg_vers		= nfsd_acl_version,
 	.pg_name		= "nfsacl",
 	.pg_class		= "nfsd",
 	.pg_stats		= &nfsd_acl_svcstats,
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/nfsd/vfs.c linux-libre-5.3.16-gnu/fs/nfsd/vfs.c
--- linux-libre-5.3.15-gnu/fs/nfsd/vfs.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/nfsd/vfs.c	2019-12-13 02:49:56.000000000 -0500
@@ -552,7 +552,7 @@ __be32 nfsd4_set_nfs4_label(struct svc_r
 #endif
 
 __be32 nfsd4_clone_file_range(struct file *src, u64 src_pos, struct file *dst,
-		u64 dst_pos, u64 count)
+		u64 dst_pos, u64 count, bool sync)
 {
 	loff_t cloned;
 
@@ -561,6 +561,12 @@ __be32 nfsd4_clone_file_range(struct fil
 		return nfserrno(cloned);
 	if (count && cloned != count)
 		return nfserrno(-EINVAL);
+	if (sync) {
+		loff_t dst_end = count ? dst_pos + count - 1 : LLONG_MAX;
+		int status = vfs_fsync_range(dst, dst_pos, dst_end, 0);
+		if (status < 0)
+			return nfserrno(status);
+	}
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/fs/nfsd/vfs.h linux-libre-5.3.16-gnu/fs/nfsd/vfs.h
--- linux-libre-5.3.15-gnu/fs/nfsd/vfs.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/fs/nfsd/vfs.h	2019-12-13 02:49:56.000000000 -0500
@@ -58,7 +58,7 @@ __be32          nfsd4_set_nfs4_label(str
 __be32		nfsd4_vfs_fallocate(struct svc_rqst *, struct svc_fh *,
 				    struct file *, loff_t, loff_t, int);
 __be32		nfsd4_clone_file_range(struct file *, u64, struct file *,
-			u64, u64);
+				       u64, u64, bool);
 #endif /* CONFIG_NFSD_V4 */
 __be32		nfsd_create_locked(struct svc_rqst *, struct svc_fh *,
 				char *name, int len, struct iattr *attrs,
diff -druNp --no-dereference linux-libre-5.3.15-gnu/include/linux/jbd2.h linux-libre-5.3.16-gnu/include/linux/jbd2.h
--- linux-libre-5.3.15-gnu/include/linux/jbd2.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/include/linux/jbd2.h	2019-12-13 02:49:56.000000000 -0500
@@ -1584,7 +1584,7 @@ static inline int jbd2_space_needed(jour
 static inline unsigned long jbd2_log_space_left(journal_t *journal)
 {
 	/* Allow for rounding errors */
-	unsigned long free = journal->j_free - 32;
+	long free = journal->j_free - 32;
 
 	if (journal->j_committing_transaction) {
 		unsigned long committing = atomic_read(&journal->
@@ -1593,7 +1593,7 @@ static inline unsigned long jbd2_log_spa
 		/* Transaction + control blocks */
 		free -= committing + (committing >> JBD2_CONTROL_BLOCKS_SHIFT);
 	}
-	return free;
+	return max_t(long, free, 0);
 }
 
 /*
diff -druNp --no-dereference linux-libre-5.3.15-gnu/include/linux/kernfs.h linux-libre-5.3.16-gnu/include/linux/kernfs.h
--- linux-libre-5.3.15-gnu/include/linux/kernfs.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/include/linux/kernfs.h	2019-12-13 02:49:56.000000000 -0500
@@ -187,6 +187,7 @@ struct kernfs_root {
 
 	/* private fields, do not use outside kernfs proper */
 	struct idr		ino_idr;
+	u32			last_ino;
 	u32			next_generation;
 	struct kernfs_syscall_ops *syscall_ops;
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/include/sound/hdaudio.h linux-libre-5.3.16-gnu/include/sound/hdaudio.h
--- linux-libre-5.3.15-gnu/include/sound/hdaudio.h	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/include/sound/hdaudio.h	2019-12-13 02:49:56.000000000 -0500
@@ -504,6 +504,7 @@ struct hdac_stream {
 	bool prepared:1;
 	bool no_period_wakeup:1;
 	bool locked:1;
+	bool stripe:1;			/* apply stripe control */
 
 	/* timestamp */
 	unsigned long start_wallclk;	/* start + minimum wallclk */
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/audit_watch.c linux-libre-5.3.16-gnu/kernel/audit_watch.c
--- linux-libre-5.3.15-gnu/kernel/audit_watch.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/audit_watch.c	2019-12-13 02:49:56.000000000 -0500
@@ -351,12 +351,12 @@ static int audit_get_nd(struct audit_wat
 	struct dentry *d = kern_path_locked(watch->path, parent);
 	if (IS_ERR(d))
 		return PTR_ERR(d);
-	inode_unlock(d_backing_inode(parent->dentry));
 	if (d_is_positive(d)) {
 		/* update watch filter fields */
 		watch->dev = d->d_sb->s_dev;
 		watch->ino = d_backing_inode(d)->i_ino;
 	}
+	inode_unlock(d_backing_inode(parent->dentry));
 	dput(d);
 	return 0;
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/cgroup/cgroup.c linux-libre-5.3.16-gnu/kernel/cgroup/cgroup.c
--- linux-libre-5.3.15-gnu/kernel/cgroup/cgroup.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/cgroup/cgroup.c	2019-12-13 02:49:56.000000000 -0500
@@ -2119,11 +2119,12 @@ int cgroup_do_get_tree(struct fs_context
 
 		nsdentry = kernfs_node_dentry(cgrp->kn, sb);
 		dput(fc->root);
-		fc->root = nsdentry;
 		if (IS_ERR(nsdentry)) {
-			ret = PTR_ERR(nsdentry);
 			deactivate_locked_super(sb);
+			ret = PTR_ERR(nsdentry);
+			nsdentry = NULL;
 		}
+		fc->root = nsdentry;
 	}
 
 	if (!ctx->kfc.new_sb_created)
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/events/core.c linux-libre-5.3.16-gnu/kernel/events/core.c
--- linux-libre-5.3.15-gnu/kernel/events/core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/events/core.c	2019-12-13 02:49:56.000000000 -0500
@@ -11719,7 +11719,7 @@ inherit_event(struct perf_event *parent_
 						   GFP_KERNEL);
 		if (!child_ctx->task_ctx_data) {
 			free_event(child_event);
-			return NULL;
+			return ERR_PTR(-ENOMEM);
 		}
 	}
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/sched/core.c linux-libre-5.3.16-gnu/kernel/sched/core.c
--- linux-libre-5.3.15-gnu/kernel/sched/core.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/sched/core.c	2019-12-13 02:49:56.000000000 -0500
@@ -5874,10 +5874,11 @@ void init_idle(struct task_struct *idle,
 	struct rq *rq = cpu_rq(cpu);
 	unsigned long flags;
 
+	__sched_fork(0, idle);
+
 	raw_spin_lock_irqsave(&idle->pi_lock, flags);
 	raw_spin_lock(&rq->lock);
 
-	__sched_fork(0, idle);
 	idle->state = TASK_RUNNING;
 	idle->se.exec_start = sched_clock();
 	idle->flags |= PF_IDLE;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/sched/fair.c linux-libre-5.3.16-gnu/kernel/sched/fair.c
--- linux-libre-5.3.15-gnu/kernel/sched/fair.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/sched/fair.c	2019-12-13 02:49:56.000000000 -0500
@@ -7531,6 +7531,19 @@ static void update_blocked_averages(int
 	update_rq_clock(rq);
 
 	/*
+	 * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
+	 * that RT, DL and IRQ signals have been updated before updating CFS.
+	 */
+	curr_class = rq->curr->sched_class;
+	update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
+	update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
+	update_irq_load_avg(rq, 0);
+
+	/* Don't need periodic decay once load/util_avg are null */
+	if (others_have_blocked(rq))
+		done = false;
+
+	/*
 	 * Iterates the task_group tree in a bottom up fashion, see
 	 * list_add_leaf_cfs_rq() for details.
 	 */
@@ -7557,14 +7570,6 @@ static void update_blocked_averages(int
 			done = false;
 	}
 
-	curr_class = rq->curr->sched_class;
-	update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
-	update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
-	update_irq_load_avg(rq, 0);
-	/* Don't need periodic decay once load/util_avg are null */
-	if (others_have_blocked(rq))
-		done = false;
-
 	update_blocked_load_status(rq, !done);
 	rq_unlock_irqrestore(rq, &rf);
 }
@@ -7625,12 +7630,18 @@ static inline void update_blocked_averag
 
 	rq_lock_irqsave(rq, &rf);
 	update_rq_clock(rq);
-	update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq);
 
+	/*
+	 * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
+	 * that RT, DL and IRQ signals have been updated before updating CFS.
+	 */
 	curr_class = rq->curr->sched_class;
 	update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
 	update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
 	update_irq_load_avg(rq, 0);
+
+	update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq);
+
 	update_blocked_load_status(rq, cfs_rq_has_blocked(cfs_rq) || others_have_blocked(rq));
 	rq_unlock_irqrestore(rq, &rf);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/kernel/time/time.c linux-libre-5.3.16-gnu/kernel/time/time.c
--- linux-libre-5.3.15-gnu/kernel/time/time.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/kernel/time/time.c	2019-12-13 02:49:56.000000000 -0500
@@ -881,7 +881,8 @@ int get_timespec64(struct timespec64 *ts
 	ts->tv_sec = kts.tv_sec;
 
 	/* Zero out the padding for 32 bit systems or in compat mode */
-	if (IS_ENABLED(CONFIG_64BIT_TIME) && in_compat_syscall())
+	if (IS_ENABLED(CONFIG_64BIT_TIME) && (!IS_ENABLED(CONFIG_64BIT) ||
+					      in_compat_syscall()))
 		kts.tv_nsec &= 0xFFFFFFFFUL;
 
 	ts->tv_nsec = kts.tv_nsec;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/Makefile linux-libre-5.3.16-gnu/Makefile
--- linux-libre-5.3.15-gnu/Makefile	2019-12-05 05:07:42.000000000 -0500
+++ linux-libre-5.3.16-gnu/Makefile	2019-12-13 10:35:44.000000000 -0500
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 3
-SUBLEVEL = 15
+SUBLEVEL = 16
 EXTRAVERSION = -gnu
 NAME = Bobtail Squid
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/net/sunrpc/sched.c linux-libre-5.3.16-gnu/net/sunrpc/sched.c
--- linux-libre-5.3.15-gnu/net/sunrpc/sched.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/net/sunrpc/sched.c	2019-12-13 02:49:56.000000000 -0500
@@ -260,7 +260,7 @@ static void __rpc_init_priority_wait_que
 	rpc_reset_waitqueue_priority(queue);
 	queue->qlen = 0;
 	queue->timer_list.expires = 0;
-	INIT_DEFERRABLE_WORK(&queue->timer_list.dwork, __rpc_queue_timer_fn);
+	INIT_DELAYED_WORK(&queue->timer_list.dwork, __rpc_queue_timer_fn);
 	INIT_LIST_HEAD(&queue->timer_list.list);
 	rpc_assign_waitqueue_name(queue, qname);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/net/xfrm/xfrm_input.c linux-libre-5.3.16-gnu/net/xfrm/xfrm_input.c
--- linux-libre-5.3.15-gnu/net/xfrm/xfrm_input.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/net/xfrm/xfrm_input.c	2019-12-13 02:49:56.000000000 -0500
@@ -480,6 +480,9 @@ int xfrm_input(struct sk_buff *skb, int
 			else
 				XFRM_INC_STATS(net,
 					       LINUX_MIB_XFRMINSTATEINVALID);
+
+			if (encap_type == -1)
+				dev_put(skb->dev);
 			goto drop;
 		}
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/core/oss/linear.c linux-libre-5.3.16-gnu/sound/core/oss/linear.c
--- linux-libre-5.3.15-gnu/sound/core/oss/linear.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/core/oss/linear.c	2019-12-13 02:49:56.000000000 -0500
@@ -107,6 +107,8 @@ static snd_pcm_sframes_t linear_transfer
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	convert(plugin, src_channels, dst_channels, frames);
 	return frames;
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/core/oss/mulaw.c linux-libre-5.3.16-gnu/sound/core/oss/mulaw.c
--- linux-libre-5.3.15-gnu/sound/core/oss/mulaw.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/core/oss/mulaw.c	2019-12-13 02:49:56.000000000 -0500
@@ -269,6 +269,8 @@ static snd_pcm_sframes_t mulaw_transfer(
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	data = (struct mulaw_priv *)plugin->extra_data;
 	data->func(plugin, src_channels, dst_channels, frames);
 	return frames;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/core/oss/route.c linux-libre-5.3.16-gnu/sound/core/oss/route.c
--- linux-libre-5.3.15-gnu/sound/core/oss/route.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/core/oss/route.c	2019-12-13 02:49:56.000000000 -0500
@@ -57,6 +57,8 @@ static snd_pcm_sframes_t route_transfer(
 		return -ENXIO;
 	if (frames == 0)
 		return 0;
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 
 	nsrcs = plugin->src_format.channels;
 	ndsts = plugin->dst_format.channels;
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/core/pcm_lib.c linux-libre-5.3.16-gnu/sound/core/pcm_lib.c
--- linux-libre-5.3.15-gnu/sound/core/pcm_lib.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/core/pcm_lib.c	2019-12-13 02:49:56.000000000 -0500
@@ -1782,11 +1782,14 @@ void snd_pcm_period_elapsed(struct snd_p
 	struct snd_pcm_runtime *runtime;
 	unsigned long flags;
 
-	if (PCM_RUNTIME_CHECK(substream))
+	if (snd_BUG_ON(!substream))
 		return;
-	runtime = substream->runtime;
 
 	snd_pcm_stream_lock_irqsave(substream, flags);
+	if (PCM_RUNTIME_CHECK(substream))
+		goto _unlock;
+	runtime = substream->runtime;
+
 	if (!snd_pcm_running(substream) ||
 	    snd_pcm_update_hw_ptr0(substream, 1) < 0)
 		goto _end;
@@ -1797,6 +1800,7 @@ void snd_pcm_period_elapsed(struct snd_p
 #endif
  _end:
 	kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
+ _unlock:
 	snd_pcm_stream_unlock_irqrestore(substream, flags);
 }
 EXPORT_SYMBOL(snd_pcm_period_elapsed);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/hda/hdac_stream.c linux-libre-5.3.16-gnu/sound/hda/hdac_stream.c
--- linux-libre-5.3.15-gnu/sound/hda/hdac_stream.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/hda/hdac_stream.c	2019-12-13 02:49:56.000000000 -0500
@@ -96,12 +96,14 @@ void snd_hdac_stream_start(struct hdac_s
 			      1 << azx_dev->index,
 			      1 << azx_dev->index);
 	/* set stripe control */
-	if (azx_dev->substream)
-		stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
-	else
-		stripe_ctl = 0;
-	snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
-				stripe_ctl);
+	if (azx_dev->stripe) {
+		if (azx_dev->substream)
+			stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
+		else
+			stripe_ctl = 0;
+		snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
+					stripe_ctl);
+	}
 	/* set DMA start and interrupt mask */
 	snd_hdac_stream_updateb(azx_dev, SD_CTL,
 				0, SD_CTL_DMA_START | SD_INT_MASK);
@@ -118,7 +120,10 @@ void snd_hdac_stream_clear(struct hdac_s
 	snd_hdac_stream_updateb(azx_dev, SD_CTL,
 				SD_CTL_DMA_START | SD_INT_MASK, 0);
 	snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
-	snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
+	if (azx_dev->stripe) {
+		snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
+		azx_dev->stripe = 0;
+	}
 	azx_dev->running = false;
 }
 EXPORT_SYMBOL_GPL(snd_hdac_stream_clear);
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/pci/hda/hda_bind.c linux-libre-5.3.16-gnu/sound/pci/hda/hda_bind.c
--- linux-libre-5.3.15-gnu/sound/pci/hda/hda_bind.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/pci/hda/hda_bind.c	2019-12-13 02:49:56.000000000 -0500
@@ -43,6 +43,10 @@ static void hda_codec_unsol_event(struct
 {
 	struct hda_codec *codec = container_of(dev, struct hda_codec, core);
 
+	/* ignore unsol events during shutdown */
+	if (codec->bus->shutdown)
+		return;
+
 	if (codec->patch_ops.unsol_event)
 		codec->patch_ops.unsol_event(codec, ev);
 }
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/pci/hda/hda_intel.c linux-libre-5.3.16-gnu/sound/pci/hda/hda_intel.c
--- linux-libre-5.3.15-gnu/sound/pci/hda/hda_intel.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/pci/hda/hda_intel.c	2019-12-13 02:49:56.000000000 -0500
@@ -1383,8 +1383,11 @@ static int azx_free(struct azx *chip)
 static int azx_dev_disconnect(struct snd_device *device)
 {
 	struct azx *chip = device->device_data;
+	struct hdac_bus *bus = azx_bus(chip);
 
 	chip->bus.shutdown = 1;
+	cancel_work_sync(&bus->unsol_work);
+
 	return 0;
 }
 
@@ -2428,6 +2431,9 @@ static const struct pci_device_id azx_id
 	/* CometLake-H */
 	{ PCI_DEVICE(0x8086, 0x06C8),
 	  .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
+	/* CometLake-S */
+	{ PCI_DEVICE(0x8086, 0xa3f0),
+	  .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
 	/* Icelake */
 	{ PCI_DEVICE(0x8086, 0x34c8),
 	  .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/pci/hda/patch_conexant.c linux-libre-5.3.16-gnu/sound/pci/hda/patch_conexant.c
--- linux-libre-5.3.15-gnu/sound/pci/hda/patch_conexant.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/pci/hda/patch_conexant.c	2019-12-13 02:49:56.000000000 -0500
@@ -910,6 +910,7 @@ static const struct snd_pci_quirk cxt506
 	SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/pci/hda/patch_hdmi.c linux-libre-5.3.16-gnu/sound/pci/hda/patch_hdmi.c
--- linux-libre-5.3.15-gnu/sound/pci/hda/patch_hdmi.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/pci/hda/patch_hdmi.c	2019-12-13 02:49:56.000000000 -0500
@@ -31,6 +31,7 @@
 #include <sound/hda_codec.h>
 #include "hda_local.h"
 #include "hda_jack.h"
+#include "hda_controller.h"
 
 static bool static_hdmi_pcm;
 module_param(static_hdmi_pcm, bool, 0644);
@@ -45,10 +46,12 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't
 				((codec)->core.vendor_id == 0x80862800))
 #define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
 #define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
+#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812)
 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
 				|| is_skylake(codec) || is_broxton(codec) \
 				|| is_kabylake(codec) || is_geminilake(codec) \
-				|| is_cannonlake(codec) || is_icelake(codec))
+				|| is_cannonlake(codec) || is_icelake(codec) \
+				|| is_tigerlake(codec))
 #define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
 #define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
 #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
@@ -1226,6 +1229,10 @@ static int hdmi_pcm_open(struct hda_pcm_
 	per_pin->cvt_nid = per_cvt->cvt_nid;
 	hinfo->nid = per_cvt->cvt_nid;
 
+	/* flip stripe flag for the assigned stream if supported */
+	if (get_wcaps(codec, per_cvt->cvt_nid) & AC_WCAP_STRIPE)
+		azx_stream(get_azx_dev(substream))->stripe = 1;
+
 	snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id);
 	snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0,
 			    AC_VERB_SET_CONNECT_SEL,
diff -druNp --no-dereference linux-libre-5.3.15-gnu/sound/pci/hda/patch_realtek.c linux-libre-5.3.16-gnu/sound/pci/hda/patch_realtek.c
--- linux-libre-5.3.15-gnu/sound/pci/hda/patch_realtek.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/sound/pci/hda/patch_realtek.c	2019-12-13 02:49:56.000000000 -0500
@@ -367,9 +367,7 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0215:
 	case 0x10ec0233:
 	case 0x10ec0235:
-	case 0x10ec0236:
 	case 0x10ec0255:
-	case 0x10ec0256:
 	case 0x10ec0257:
 	case 0x10ec0282:
 	case 0x10ec0283:
@@ -381,6 +379,11 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0300:
 		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
 		break;
+	case 0x10ec0236:
+	case 0x10ec0256:
+		alc_write_coef_idx(codec, 0x36, 0x5757);
+		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+		break;
 	case 0x10ec0275:
 		alc_update_coef_idx(codec, 0xe, 0, 1<<0);
 		break;
@@ -5878,6 +5881,7 @@ enum {
 	ALC299_FIXUP_PREDATOR_SPK,
 	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
 	ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
+	ALC294_FIXUP_ASUS_INTSPK_GPIO,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6953,6 +6957,13 @@ static const struct hda_fixup alc269_fix
 		.chained = true,
 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
 	},
+	[ALC294_FIXUP_ASUS_INTSPK_GPIO] = {
+		.type = HDA_FIXUP_FUNC,
+		/* The GPIO must be pulled to initialize the AMP */
+		.v.func = alc_fixup_gpio4,
+		.chained = true,
+		.chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7112,7 +7123,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
 	SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
 	SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
-	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
 	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
@@ -7219,6 +7230,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
 	SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
 	SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
+	SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
 
 #if 0
diff -druNp --no-dereference linux-libre-5.3.15-gnu/tools/perf/builtin-script.c linux-libre-5.3.16-gnu/tools/perf/builtin-script.c
--- linux-libre-5.3.15-gnu/tools/perf/builtin-script.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/tools/perf/builtin-script.c	2019-12-13 02:49:56.000000000 -0500
@@ -1075,7 +1075,7 @@ static int perf_sample__fprintf_brstacki
 				insn++;
 			}
 		}
-		if (off != (unsigned)len)
+		if (off != end - start)
 			printed += fprintf(fp, "\tmismatch of LBR data and executable\n");
 	}
 
diff -druNp --no-dereference linux-libre-5.3.15-gnu/tools/perf/scripts/python/exported-sql-viewer.py linux-libre-5.3.16-gnu/tools/perf/scripts/python/exported-sql-viewer.py
--- linux-libre-5.3.15-gnu/tools/perf/scripts/python/exported-sql-viewer.py	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/tools/perf/scripts/python/exported-sql-viewer.py	2019-12-13 02:49:56.000000000 -0500
@@ -625,7 +625,7 @@ class CallGraphRootItem(CallGraphLevelIt
 		self.query_done = True
 		if_has_calls = ""
 		if IsSelectable(glb.db, "comms", columns = "has_calls"):
-			if_has_calls = " WHERE has_calls = TRUE"
+			if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE
 		query = QSqlQuery(glb.db)
 		QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
 		while query.next():
@@ -905,7 +905,7 @@ class CallTreeRootItem(CallGraphLevelIte
 		self.query_done = True
 		if_has_calls = ""
 		if IsSelectable(glb.db, "comms", columns = "has_calls"):
-			if_has_calls = " WHERE has_calls = TRUE"
+			if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE
 		query = QSqlQuery(glb.db)
 		QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls)
 		while query.next():
@@ -3509,6 +3509,12 @@ class DBRef():
 	def __init__(self, is_sqlite3, dbname):
 		self.is_sqlite3 = is_sqlite3
 		self.dbname = dbname
+		self.TRUE = "TRUE"
+		self.FALSE = "FALSE"
+		# SQLite prior to version 3.23 does not support TRUE and FALSE
+		if self.is_sqlite3:
+			self.TRUE = "1"
+			self.FALSE = "0"
 
 	def Open(self, connection_name):
 		dbname = self.dbname
diff -druNp --no-dereference linux-libre-5.3.15-gnu/tools/testing/selftests/kvm/lib/assert.c linux-libre-5.3.16-gnu/tools/testing/selftests/kvm/lib/assert.c
--- linux-libre-5.3.15-gnu/tools/testing/selftests/kvm/lib/assert.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/tools/testing/selftests/kvm/lib/assert.c	2019-12-13 02:49:56.000000000 -0500
@@ -55,7 +55,7 @@ static void test_dump_stack(void)
 #pragma GCC diagnostic pop
 }
 
-static pid_t gettid(void)
+static pid_t _gettid(void)
 {
 	return syscall(SYS_gettid);
 }
@@ -72,7 +72,7 @@ test_assert(bool exp, const char *exp_st
 		fprintf(stderr, "==== Test Assertion Failure ====\n"
 			"  %s:%u: %s\n"
 			"  pid=%d tid=%d - %s\n",
-			file, line, exp_str, getpid(), gettid(),
+			file, line, exp_str, getpid(), _gettid(),
 			strerror(errno));
 		test_dump_stack();
 		if (fmt) {
diff -druNp --no-dereference linux-libre-5.3.15-gnu/tools/testing/selftests/Makefile linux-libre-5.3.16-gnu/tools/testing/selftests/Makefile
--- linux-libre-5.3.15-gnu/tools/testing/selftests/Makefile	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/tools/testing/selftests/Makefile	2019-12-13 02:49:56.000000000 -0500
@@ -203,7 +203,7 @@ ifdef INSTALL_PATH
 	@# included in the generated runlist.
 	for TARGET in $(TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
-		[ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
+		[ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
 		echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \
 		echo "cd $$TARGET" >> $(ALL_SCRIPT); \
 		echo -n "run_many" >> $(ALL_SCRIPT); \
diff -druNp --no-dereference linux-libre-5.3.15-gnu/virt/kvm/arm/vgic/vgic-v3.c linux-libre-5.3.16-gnu/virt/kvm/arm/vgic/vgic-v3.c
--- linux-libre-5.3.15-gnu/virt/kvm/arm/vgic/vgic-v3.c	2019-12-04 16:34:32.000000000 -0500
+++ linux-libre-5.3.16-gnu/virt/kvm/arm/vgic/vgic-v3.c	2019-12-13 02:49:56.000000000 -0500
@@ -363,8 +363,8 @@ retry:
 int vgic_v3_save_pending_tables(struct kvm *kvm)
 {
 	struct vgic_dist *dist = &kvm->arch.vgic;
-	int last_byte_offset = -1;
 	struct vgic_irq *irq;
+	gpa_t last_ptr = ~(gpa_t)0;
 	int ret;
 	u8 val;
 
@@ -384,11 +384,11 @@ int vgic_v3_save_pending_tables(struct k
 		bit_nr = irq->intid % BITS_PER_BYTE;
 		ptr = pendbase + byte_offset;
 
-		if (byte_offset != last_byte_offset) {
+		if (ptr != last_ptr) {
 			ret = kvm_read_guest_lock(kvm, ptr, &val, 1);
 			if (ret)
 				return ret;
-			last_byte_offset = byte_offset;
+			last_ptr = ptr;
 		}
 
 		stored = val & (1U << bit_nr);
