diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/arc/kernel/traps.c linux-libre-4.14.133-gnu/arch/arc/kernel/traps.c
--- linux-libre-4.14.132-gnu/arch/arc/kernel/traps.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/arc/kernel/traps.c	2019-07-10 03:54:43.000000000 -0400
@@ -155,3 +155,11 @@ void do_insterror_or_kprobe(unsigned lon
 
 	insterror_is_error(address, regs);
 }
+
+/*
+ * abort() call generated by older gcc for __builtin_trap()
+ */
+void abort(void)
+{
+	__asm__ __volatile__("trap_s  5\n");
+}
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/arm64/kernel/module.c linux-libre-4.14.133-gnu/arch/arm64/kernel/module.c
--- linux-libre-4.14.132-gnu/arch/arm64/kernel/module.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/arm64/kernel/module.c	2019-07-10 03:54:43.000000000 -0400
@@ -32,6 +32,7 @@
 
 void *module_alloc(unsigned long size)
 {
+	u64 module_alloc_end = module_alloc_base + MODULES_VSIZE;
 	gfp_t gfp_mask = GFP_KERNEL;
 	void *p;
 
@@ -39,9 +40,12 @@ void *module_alloc(unsigned long size)
 	if (IS_ENABLED(CONFIG_ARM64_MODULE_PLTS))
 		gfp_mask |= __GFP_NOWARN;
 
+	if (IS_ENABLED(CONFIG_KASAN))
+		/* don't exceed the static module region - see below */
+		module_alloc_end = MODULES_END;
+
 	p = __vmalloc_node_range(size, MODULE_ALIGN, module_alloc_base,
-				module_alloc_base + MODULES_VSIZE,
-				gfp_mask, PAGE_KERNEL_EXEC, 0,
+				module_alloc_end, gfp_mask, PAGE_KERNEL_EXEC, 0,
 				NUMA_NO_NODE, __builtin_return_address(0));
 
 	if (!p && IS_ENABLED(CONFIG_ARM64_MODULE_PLTS) &&
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/mips/include/asm/netlogic/xlr/fmn.h linux-libre-4.14.133-gnu/arch/mips/include/asm/netlogic/xlr/fmn.h
--- linux-libre-4.14.132-gnu/arch/mips/include/asm/netlogic/xlr/fmn.h	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/mips/include/asm/netlogic/xlr/fmn.h	2019-07-10 03:54:43.000000000 -0400
@@ -301,8 +301,6 @@ static inline int nlm_fmn_send(unsigned
 	for (i = 0; i < 8; i++) {
 		nlm_msgsnd(dest);
 		status = nlm_read_c2_status0();
-		if ((status & 0x2) == 1)
-			pr_info("Send pending fail!\n");
 		if ((status & 0x4) == 0)
 			return 0;
 	}
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/mips/mm/mmap.c linux-libre-4.14.133-gnu/arch/mips/mm/mmap.c
--- linux-libre-4.14.132-gnu/arch/mips/mm/mmap.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/mips/mm/mmap.c	2019-07-10 03:54:43.000000000 -0400
@@ -203,7 +203,7 @@ unsigned long arch_randomize_brk(struct
 
 int __virt_addr_valid(const volatile void *kaddr)
 {
-	unsigned long vaddr = (unsigned long)vaddr;
+	unsigned long vaddr = (unsigned long)kaddr;
 
 	if ((vaddr < PAGE_OFFSET) || (vaddr >= MAP_BASE))
 		return 0;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/mips/mm/tlbex.c linux-libre-4.14.133-gnu/arch/mips/mm/tlbex.c
--- linux-libre-4.14.132-gnu/arch/mips/mm/tlbex.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/mips/mm/tlbex.c	2019-07-10 03:54:43.000000000 -0400
@@ -388,6 +388,7 @@ static struct work_registers build_get_w
 static void build_restore_work_registers(u32 **p)
 {
 	if (scratch_reg >= 0) {
+		uasm_i_ehb(p);
 		UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
 		return;
 	}
@@ -671,10 +672,12 @@ static void build_restore_pagemask(u32 *
 			uasm_i_mtc0(p, 0, C0_PAGEMASK);
 			uasm_il_b(p, r, lid);
 		}
-		if (scratch_reg >= 0)
+		if (scratch_reg >= 0) {
+			uasm_i_ehb(p);
 			UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
-		else
+		} else {
 			UASM_i_LW(p, 1, scratchpad_offset(0), 0);
+		}
 	} else {
 		/* Reset default page size */
 		if (PM_DEFAULT_MASK >> 16) {
@@ -939,10 +942,12 @@ build_get_pgd_vmalloc64(u32 **p, struct
 		uasm_i_jr(p, ptr);
 
 		if (mode == refill_scratch) {
-			if (scratch_reg >= 0)
+			if (scratch_reg >= 0) {
+				uasm_i_ehb(p);
 				UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
-			else
+			} else {
 				UASM_i_LW(p, 1, scratchpad_offset(0), 0);
+			}
 		} else {
 			uasm_i_nop(p);
 		}
@@ -1259,6 +1264,7 @@ build_fast_tlb_refill_handler (u32 **p,
 	UASM_i_MTC0(p, odd, C0_ENTRYLO1); /* load it */
 
 	if (c0_scratch_reg >= 0) {
+		uasm_i_ehb(p);
 		UASM_i_MFC0(p, scratch, c0_kscratch(), c0_scratch_reg);
 		build_tlb_write_entry(p, l, r, tlb_random);
 		uasm_l_leave(l, *p);
@@ -1615,15 +1621,17 @@ static void build_setup_pgd(void)
 		uasm_i_dinsm(&p, a0, 0, 29, 64 - 29);
 		uasm_l_tlbl_goaround1(&l, p);
 		UASM_i_SLL(&p, a0, a0, 11);
-		uasm_i_jr(&p, 31);
 		UASM_i_MTC0(&p, a0, C0_CONTEXT);
+		uasm_i_jr(&p, 31);
+		uasm_i_ehb(&p);
 	} else {
 		/* PGD in c0_KScratch */
-		uasm_i_jr(&p, 31);
 		if (cpu_has_ldpte)
 			UASM_i_MTC0(&p, a0, C0_PWBASE);
 		else
 			UASM_i_MTC0(&p, a0, c0_kscratch(), pgd_reg);
+		uasm_i_jr(&p, 31);
+		uasm_i_ehb(&p);
 	}
 #else
 #ifdef CONFIG_SMP
@@ -1637,13 +1645,16 @@ static void build_setup_pgd(void)
 	UASM_i_LA_mostly(&p, a2, pgdc);
 	UASM_i_SW(&p, a0, uasm_rel_lo(pgdc), a2);
 #endif /* SMP */
-	uasm_i_jr(&p, 31);
 
 	/* if pgd_reg is allocated, save PGD also to scratch register */
-	if (pgd_reg != -1)
+	if (pgd_reg != -1) {
 		UASM_i_MTC0(&p, a0, c0_kscratch(), pgd_reg);
-	else
+		uasm_i_jr(&p, 31);
+		uasm_i_ehb(&p);
+	} else {
+		uasm_i_jr(&p, 31);
 		uasm_i_nop(&p);
+	}
 #endif
 	if (p >= tlbmiss_handler_setup_pgd_end)
 		panic("tlbmiss_handler_setup_pgd space exceeded");
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/x86/kernel/ftrace.c linux-libre-4.14.133-gnu/arch/x86/kernel/ftrace.c
--- linux-libre-4.14.132-gnu/arch/x86/kernel/ftrace.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/x86/kernel/ftrace.c	2019-07-10 03:54:43.000000000 -0400
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/memory.h>
 
 #include <trace/syscall.h>
 
@@ -36,6 +37,7 @@
 
 int ftrace_arch_code_modify_prepare(void)
 {
+	mutex_lock(&text_mutex);
 	set_kernel_text_rw();
 	set_all_modules_text_rw();
 	return 0;
@@ -45,6 +47,7 @@ int ftrace_arch_code_modify_post_process
 {
 	set_all_modules_text_ro();
 	set_kernel_text_ro();
+	mutex_unlock(&text_mutex);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/x86/kvm/lapic.c linux-libre-4.14.133-gnu/arch/x86/kvm/lapic.c
--- linux-libre-4.14.132-gnu/arch/x86/kvm/lapic.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/x86/kvm/lapic.c	2019-07-10 03:54:43.000000000 -0400
@@ -2161,7 +2161,7 @@ int kvm_apic_has_interrupt(struct kvm_vc
 	struct kvm_lapic *apic = vcpu->arch.apic;
 	u32 ppr;
 
-	if (!apic_enabled(apic))
+	if (!kvm_apic_hw_enabled(apic))
 		return -1;
 
 	__apic_update_ppr(apic, &ppr);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/arch/x86/kvm/x86.c linux-libre-4.14.133-gnu/arch/x86/kvm/x86.c
--- linux-libre-4.14.132-gnu/arch/x86/kvm/x86.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/arch/x86/kvm/x86.c	2019-07-10 03:54:43.000000000 -0400
@@ -1392,7 +1392,7 @@ static int set_tsc_khz(struct kvm_vcpu *
 			vcpu->arch.tsc_always_catchup = 1;
 			return 0;
 		} else {
-			WARN(1, "user requested TSC rate below hardware speed\n");
+			pr_warn_ratelimited("user requested TSC rate below hardware speed\n");
 			return -1;
 		}
 	}
@@ -1402,8 +1402,8 @@ static int set_tsc_khz(struct kvm_vcpu *
 				user_tsc_khz, tsc_khz);
 
 	if (ratio == 0 || ratio >= kvm_max_tsc_scaling_ratio) {
-		WARN_ONCE(1, "Invalid TSC scaling ratio - virtual-tsc-khz=%u\n",
-			  user_tsc_khz);
+		pr_warn_ratelimited("Invalid TSC scaling ratio - virtual-tsc-khz=%u\n",
+			            user_tsc_khz);
 		return -1;
 	}
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/crypto/cryptd.c linux-libre-4.14.133-gnu/crypto/cryptd.c
--- linux-libre-4.14.132-gnu/crypto/cryptd.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/crypto/cryptd.c	2019-07-10 03:54:43.000000000 -0400
@@ -585,6 +585,7 @@ static void cryptd_skcipher_free(struct
 	struct skcipherd_instance_ctx *ctx = skcipher_instance_ctx(inst);
 
 	crypto_drop_skcipher(&ctx->spawn);
+	kfree(inst);
 }
 
 static int cryptd_create_skcipher(struct crypto_template *tmpl,
diff -druNp --no-dereference linux-libre-4.14.132-gnu/crypto/crypto_user.c linux-libre-4.14.133-gnu/crypto/crypto_user.c
--- linux-libre-4.14.132-gnu/crypto/crypto_user.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/crypto/crypto_user.c	2019-07-10 03:54:43.000000000 -0400
@@ -55,6 +55,9 @@ static struct crypto_alg *crypto_alg_mat
 	list_for_each_entry(q, &crypto_alg_list, cra_list) {
 		int match = 0;
 
+		if (crypto_is_larval(q))
+			continue;
+
 		if ((q->cra_flags ^ p->cru_type) & p->cru_mask)
 			continue;
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/dma/imx-sdma.c linux-libre-4.14.133-gnu/drivers/dma/imx-sdma.c
--- linux-libre-4.14.132-gnu/drivers/dma/imx-sdma.c	2019-07-03 18:48:33.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/dma/imx-sdma.c	2019-07-10 17:58:20.000000000 -0400
@@ -632,7 +632,7 @@ static int sdma_load_script(struct sdma_
 	spin_lock_irqsave(&sdma->channel_0_lock, flags);
 
 	bd0->mode.command = C0_SETPM;
-	bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
+	bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
 	bd0->mode.count = size / 2;
 	bd0->buffer_addr = buf_phys;
 	bd0->ext_buffer_addr = address;
@@ -909,7 +909,7 @@ static int sdma_load_context(struct sdma
 	context->gReg[7] = sdmac->watermark_level;
 
 	bd0->mode.command = C0_SETDM;
-	bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
+	bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD;
 	bd0->mode.count = sizeof(*context) / 4;
 	bd0->buffer_addr = sdma->context_phys;
 	bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c linux-libre-4.14.133-gnu/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
--- linux-libre-4.14.132-gnu/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c	2019-07-03 18:45:52.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c	2019-07-10 17:54:45.000000000 -0400
@@ -1522,25 +1522,6 @@ static void gfx_v9_0_gpu_init(struct amd
 	mutex_unlock(&adev->srbm_mutex);
 
 	gfx_v9_0_init_compute_vmid(adev);
-
-	mutex_lock(&adev->grbm_idx_mutex);
-	/*
-	 * making sure that the following register writes will be broadcasted
-	 * to all the shaders
-	 */
-	gfx_v9_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
-
-	WREG32_SOC15(GC, 0, mmPA_SC_FIFO_SIZE,
-		   (adev->gfx.config.sc_prim_fifo_size_frontend <<
-			PA_SC_FIFO_SIZE__SC_FRONTEND_PRIM_FIFO_SIZE__SHIFT) |
-		   (adev->gfx.config.sc_prim_fifo_size_backend <<
-			PA_SC_FIFO_SIZE__SC_BACKEND_PRIM_FIFO_SIZE__SHIFT) |
-		   (adev->gfx.config.sc_hiz_tile_fifo_size <<
-			PA_SC_FIFO_SIZE__SC_HIZ_TILE_FIFO_SIZE__SHIFT) |
-		   (adev->gfx.config.sc_earlyz_tile_fifo_size <<
-			PA_SC_FIFO_SIZE__SC_EARLYZ_TILE_FIFO_SIZE__SHIFT));
-	mutex_unlock(&adev->grbm_idx_mutex);
-
 }
 
 static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/gpu/drm/i915/intel_csr.c linux-libre-4.14.133-gnu/drivers/gpu/drm/i915/intel_csr.c
--- linux-libre-4.14.132-gnu/drivers/gpu/drm/i915/intel_csr.c	2019-07-03 18:47:08.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/gpu/drm/i915/intel_csr.c	2019-07-10 17:56:28.000000000 -0400
@@ -277,10 +277,17 @@ static uint32_t *parse_csr_fw(struct drm
 	uint32_t i;
 	uint32_t *dmc_payload;
 	uint32_t required_version;
+	size_t fsize;
 
 	if (!fw)
 		return NULL;
 
+	fsize = sizeof(struct intel_css_header) +
+		sizeof(struct intel_package_header) +
+		sizeof(struct intel_dmc_header);
+	if (fsize > fw->size)
+		goto error_truncated;
+
 	/* Extract CSS Header information*/
 	css_header = (struct intel_css_header *)fw->data;
 	if (sizeof(struct intel_css_header) !=
@@ -350,6 +357,9 @@ static uint32_t *parse_csr_fw(struct drm
 		return NULL;
 	}
 	readcount += dmc_offset;
+	fsize += dmc_offset;
+	if (fsize > fw->size)
+		goto error_truncated;
 
 	/* Extract dmc_header information. */
 	dmc_header = (struct intel_dmc_header *)&fw->data[readcount];
@@ -380,6 +390,10 @@ static uint32_t *parse_csr_fw(struct drm
 
 	/* fw_size is in dwords, so multiplied by 4 to convert into bytes. */
 	nbytes = dmc_header->fw_size * 4;
+	fsize += nbytes;
+	if (fsize > fw->size)
+		goto error_truncated;
+
 	if (nbytes > CSR_MAX_FW_SIZE) {
 		DRM_ERROR("CSR firmware too big (%u) bytes\n", nbytes);
 		return NULL;
@@ -393,6 +407,10 @@ static uint32_t *parse_csr_fw(struct drm
 	}
 
 	return memcpy(dmc_payload, &fw->data[readcount], nbytes);
+
+error_truncated:
+	DRM_ERROR("Truncated DMC firmware, rejecting.\n");
+	return NULL;
 }
 
 static void csr_load_work_fn(struct work_struct *work)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/gpu/drm/imx/ipuv3-crtc.c linux-libre-4.14.133-gnu/drivers/gpu/drm/imx/ipuv3-crtc.c
--- linux-libre-4.14.132-gnu/drivers/gpu/drm/imx/ipuv3-crtc.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/gpu/drm/imx/ipuv3-crtc.c	2019-07-10 03:54:43.000000000 -0400
@@ -99,14 +99,14 @@ static void ipu_crtc_atomic_disable(stru
 	ipu_dc_disable(ipu);
 	ipu_prg_disable(ipu);
 
+	drm_crtc_vblank_off(crtc);
+
 	spin_lock_irq(&crtc->dev->event_lock);
-	if (crtc->state->event) {
+	if (crtc->state->event && !crtc->state->active) {
 		drm_crtc_send_vblank_event(crtc, crtc->state->event);
 		crtc->state->event = NULL;
 	}
 	spin_unlock_irq(&crtc->dev->event_lock);
-
-	drm_crtc_vblank_off(crtc);
 }
 
 static void imx_drm_crtc_reset(struct drm_crtc *crtc)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/gpu/drm/mediatek/mtk_drm_drv.c linux-libre-4.14.133-gnu/drivers/gpu/drm/mediatek/mtk_drm_drv.c
--- linux-libre-4.14.132-gnu/drivers/gpu/drm/mediatek/mtk_drm_drv.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/gpu/drm/mediatek/mtk_drm_drv.c	2019-07-10 03:54:43.000000000 -0400
@@ -270,6 +270,7 @@ err_config_cleanup:
 static void mtk_drm_kms_deinit(struct drm_device *drm)
 {
 	drm_kms_helper_poll_fini(drm);
+	drm_atomic_helper_shutdown(drm);
 
 	component_unbind_all(drm->dev, drm);
 	drm_mode_config_cleanup(drm);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/gpu/drm/mediatek/mtk_dsi.c linux-libre-4.14.133-gnu/drivers/gpu/drm/mediatek/mtk_dsi.c
--- linux-libre-4.14.132-gnu/drivers/gpu/drm/mediatek/mtk_dsi.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/gpu/drm/mediatek/mtk_dsi.c	2019-07-10 03:54:43.000000000 -0400
@@ -631,6 +631,15 @@ static void mtk_dsi_poweroff(struct mtk_
 	if (--dsi->refcount != 0)
 		return;
 
+	/*
+	 * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since
+	 * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),
+	 * which needs irq for vblank, and mtk_dsi_stop() will disable irq.
+	 * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),
+	 * after dsi is fully set.
+	 */
+	mtk_dsi_stop(dsi);
+
 	if (!mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500)) {
 		if (dsi->panel) {
 			if (drm_panel_unprepare(dsi->panel)) {
@@ -697,7 +706,6 @@ static void mtk_output_dsi_disable(struc
 		}
 	}
 
-	mtk_dsi_stop(dsi);
 	mtk_dsi_poweroff(dsi);
 
 	dsi->enabled = false;
@@ -851,6 +859,8 @@ static void mtk_dsi_destroy_conn_enc(str
 	/* Skip connector cleanup if creation was delegated to the bridge */
 	if (dsi->conn.dev)
 		drm_connector_cleanup(&dsi->conn);
+	if (dsi->panel)
+		drm_panel_detach(dsi->panel);
 }
 
 static void mtk_dsi_ddp_start(struct mtk_ddp_comp *comp)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/platform/x86/mlx-platform.c linux-libre-4.14.133-gnu/drivers/platform/x86/mlx-platform.c
--- linux-libre-4.14.132-gnu/drivers/platform/x86/mlx-platform.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/platform/x86/mlx-platform.c	2019-07-10 03:54:43.000000000 -0400
@@ -318,7 +318,7 @@ static int __init mlxplat_init(void)
 
 	for (i = 0; i < ARRAY_SIZE(mlxplat_mux_data); i++) {
 		priv->pdev_mux[i] = platform_device_register_resndata(
-						&mlxplat_dev->dev,
+						&priv->pdev_i2c->dev,
 						"i2c-mux-reg", i, NULL,
 						0, &mlxplat_mux_data[i],
 						sizeof(mlxplat_mux_data[i]));
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/scsi/hpsa.c linux-libre-4.14.133-gnu/drivers/scsi/hpsa.c
--- linux-libre-4.14.132-gnu/drivers/scsi/hpsa.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/scsi/hpsa.c	2019-07-10 03:54:43.000000000 -0400
@@ -4800,7 +4800,7 @@ static int hpsa_scsi_ioaccel2_queue_comm
 			curr_sg->reserved[0] = 0;
 			curr_sg->reserved[1] = 0;
 			curr_sg->reserved[2] = 0;
-			curr_sg->chain_indicator = 0x80;
+			curr_sg->chain_indicator = IOACCEL2_CHAIN;
 
 			curr_sg = h->ioaccel2_cmd_sg_list[c->cmdindex];
 		}
@@ -4817,6 +4817,11 @@ static int hpsa_scsi_ioaccel2_queue_comm
 			curr_sg++;
 		}
 
+		/*
+		 * Set the last s/g element bit
+		 */
+		(curr_sg - 1)->chain_indicator = IOACCEL2_LAST_SG;
+
 		switch (cmd->sc_data_direction) {
 		case DMA_TO_DEVICE:
 			cp->direction &= ~IOACCEL2_DIRECTION_MASK;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/scsi/hpsa_cmd.h linux-libre-4.14.133-gnu/drivers/scsi/hpsa_cmd.h
--- linux-libre-4.14.132-gnu/drivers/scsi/hpsa_cmd.h	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/scsi/hpsa_cmd.h	2019-07-10 03:54:43.000000000 -0400
@@ -516,6 +516,7 @@ struct ioaccel2_sg_element {
 	u8 reserved[3];
 	u8 chain_indicator;
 #define IOACCEL2_CHAIN 0x80
+#define IOACCEL2_LAST_SG 0x40
 };
 
 /*
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/spi/spi-bitbang.c linux-libre-4.14.133-gnu/drivers/spi/spi-bitbang.c
--- linux-libre-4.14.132-gnu/drivers/spi/spi-bitbang.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/spi/spi-bitbang.c	2019-07-10 03:54:43.000000000 -0400
@@ -392,7 +392,7 @@ int spi_bitbang_start(struct spi_bitbang
 	if (ret)
 		spi_master_put(master);
 
-	return 0;
+	return ret;
 }
 EXPORT_SYMBOL_GPL(spi_bitbang_start);
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/tty/rocket.c linux-libre-4.14.133-gnu/drivers/tty/rocket.c
--- linux-libre-4.14.132-gnu/drivers/tty/rocket.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/tty/rocket.c	2019-07-10 03:54:43.000000000 -0400
@@ -279,7 +279,7 @@ MODULE_PARM_DESC(pc104_3, "set interface
 module_param_array(pc104_4, ulong, NULL, 0);
 MODULE_PARM_DESC(pc104_4, "set interface types for ISA(PC104) board #4 (e.g. pc104_4=232,232,485,485,...");
 
-static int rp_init(void);
+static int __init rp_init(void);
 static void rp_cleanup_module(void);
 
 module_init(rp_init);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/usb/gadget/udc/fusb300_udc.c linux-libre-4.14.133-gnu/drivers/usb/gadget/udc/fusb300_udc.c
--- linux-libre-4.14.132-gnu/drivers/usb/gadget/udc/fusb300_udc.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/usb/gadget/udc/fusb300_udc.c	2019-07-10 03:54:43.000000000 -0400
@@ -1345,12 +1345,15 @@ static const struct usb_gadget_ops fusb3
 static int fusb300_remove(struct platform_device *pdev)
 {
 	struct fusb300 *fusb300 = platform_get_drvdata(pdev);
+	int i;
 
 	usb_del_gadget_udc(&fusb300->gadget);
 	iounmap(fusb300->reg);
 	free_irq(platform_get_irq(pdev, 0), fusb300);
 
 	fusb300_free_request(&fusb300->ep[0]->ep, fusb300->ep0_req);
+	for (i = 0; i < FUSB300_MAX_NUM_EP; i++)
+		kfree(fusb300->ep[i]);
 	kfree(fusb300);
 
 	return 0;
@@ -1494,6 +1497,8 @@ clean_up:
 		if (fusb300->ep0_req)
 			fusb300_free_request(&fusb300->ep[0]->ep,
 				fusb300->ep0_req);
+		for (i = 0; i < FUSB300_MAX_NUM_EP; i++)
+			kfree(fusb300->ep[i]);
 		kfree(fusb300);
 	}
 	if (reg)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c linux-libre-4.14.133-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c
--- linux-libre-4.14.132-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c	2019-07-10 03:54:43.000000000 -0400
@@ -935,8 +935,7 @@ static struct lpc32xx_usbd_dd_gad *udc_d
 	dma_addr_t			dma;
 	struct lpc32xx_usbd_dd_gad	*dd;
 
-	dd = (struct lpc32xx_usbd_dd_gad *) dma_pool_alloc(
-			udc->dd_cache, (GFP_KERNEL | GFP_DMA), &dma);
+	dd = dma_pool_alloc(udc->dd_cache, GFP_ATOMIC | GFP_DMA, &dma);
 	if (dd)
 		dd->this_dma = dma;
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/vhost/net.c linux-libre-4.14.133-gnu/drivers/vhost/net.c
--- linux-libre-4.14.132-gnu/drivers/vhost/net.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/vhost/net.c	2019-07-10 03:54:43.000000000 -0400
@@ -44,6 +44,12 @@ MODULE_PARM_DESC(experimental_zcopytx, "
  * Using this limit prevents one virtqueue from starving others. */
 #define VHOST_NET_WEIGHT 0x80000
 
+/* Max number of packets transferred before requeueing the job.
+ * Using this limit prevents one virtqueue from starving others with small
+ * pkts.
+ */
+#define VHOST_NET_PKT_WEIGHT 256
+
 /* MAX number of TX used buffers for outstanding zerocopy */
 #define VHOST_MAX_PEND 128
 #define VHOST_GOODCOPY_LEN 256
@@ -461,6 +467,7 @@ static void handle_tx(struct vhost_net *
 	struct socket *sock;
 	struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
 	bool zcopy, zcopy_used;
+	int sent_pkts = 0;
 
 	mutex_lock(&vq->mutex);
 	sock = vq->private_data;
@@ -475,7 +482,7 @@ static void handle_tx(struct vhost_net *
 	hdr_size = nvq->vhost_hlen;
 	zcopy = nvq->ubufs;
 
-	for (;;) {
+	do {
 		/* Release DMAs done buffers first */
 		if (zcopy)
 			vhost_zerocopy_signal_used(net, vq);
@@ -543,7 +550,6 @@ static void handle_tx(struct vhost_net *
 			msg.msg_control = NULL;
 			ubufs = NULL;
 		}
-
 		total_len += len;
 		if (total_len < VHOST_NET_WEIGHT &&
 		    !vhost_vq_avail_empty(&net->dev, vq) &&
@@ -572,11 +578,7 @@ static void handle_tx(struct vhost_net *
 		else
 			vhost_zerocopy_signal_used(net, vq);
 		vhost_net_tx_packet(net);
-		if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
-			vhost_poll_queue(&vq->poll);
-			break;
-		}
-	}
+	} while (likely(!vhost_exceeds_weight(vq, ++sent_pkts, total_len)));
 out:
 	mutex_unlock(&vq->mutex);
 }
@@ -754,6 +756,7 @@ static void handle_rx(struct vhost_net *
 	struct socket *sock;
 	struct iov_iter fixup;
 	__virtio16 num_buffers;
+	int recv_pkts = 0;
 
 	mutex_lock_nested(&vq->mutex, 0);
 	sock = vq->private_data;
@@ -773,7 +776,11 @@ static void handle_rx(struct vhost_net *
 		vq->log : NULL;
 	mergeable = vhost_has_feature(vq, VIRTIO_NET_F_MRG_RXBUF);
 
-	while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk))) {
+	do {
+		sock_len = vhost_net_rx_peek_head_len(net, sock->sk);
+
+		if (!sock_len)
+			break;
 		sock_len += sock_hlen;
 		vhost_len = sock_len + vhost_hlen;
 		headcount = get_rx_bufs(vq, vq->heads, vhost_len,
@@ -854,11 +861,8 @@ static void handle_rx(struct vhost_net *
 			vhost_log_write(vq, vq_log, log, vhost_len,
 					vq->iov, in);
 		total_len += vhost_len;
-		if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
-			vhost_poll_queue(&vq->poll);
-			goto out;
-		}
-	}
+	} while (likely(!vhost_exceeds_weight(vq, ++recv_pkts, total_len)));
+
 	vhost_net_enable_vq(net, vq);
 out:
 	mutex_unlock(&vq->mutex);
@@ -936,7 +940,8 @@ static int vhost_net_open(struct inode *
 		n->vqs[i].sock_hlen = 0;
 		vhost_net_buf_init(&n->vqs[i].rxq);
 	}
-	vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX);
+	vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX,
+		       VHOST_NET_PKT_WEIGHT, VHOST_NET_WEIGHT);
 
 	vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, POLLOUT, dev);
 	vhost_poll_init(n->poll + VHOST_NET_VQ_RX, handle_rx_net, POLLIN, dev);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/vhost/scsi.c linux-libre-4.14.133-gnu/drivers/vhost/scsi.c
--- linux-libre-4.14.132-gnu/drivers/vhost/scsi.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/vhost/scsi.c	2019-07-10 03:54:43.000000000 -0400
@@ -58,6 +58,12 @@
 #define VHOST_SCSI_PREALLOC_UPAGES 2048
 #define VHOST_SCSI_PREALLOC_PROT_SGLS 512
 
+/* Max number of requests before requeueing the job.
+ * Using this limit prevents one virtqueue from starving others with
+ * request.
+ */
+#define VHOST_SCSI_WEIGHT 256
+
 struct vhost_scsi_inflight {
 	/* Wait for the flush operation to finish */
 	struct completion comp;
@@ -840,7 +846,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *
 	u64 tag;
 	u32 exp_data_len, data_direction;
 	unsigned int out = 0, in = 0;
-	int head, ret, prot_bytes;
+	int head, ret, prot_bytes, c = 0;
 	size_t req_size, rsp_size = sizeof(struct virtio_scsi_cmd_resp);
 	size_t out_size, in_size;
 	u16 lun;
@@ -859,7 +865,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *
 
 	vhost_disable_notify(&vs->dev, vq);
 
-	for (;;) {
+	do {
 		head = vhost_get_vq_desc(vq, vq->iov,
 					 ARRAY_SIZE(vq->iov), &out, &in,
 					 NULL, NULL);
@@ -1074,7 +1080,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *
 		 */
 		INIT_WORK(&cmd->work, vhost_scsi_submission_work);
 		queue_work(vhost_scsi_workqueue, &cmd->work);
-	}
+	} while (likely(!vhost_exceeds_weight(vq, ++c, 0)));
 out:
 	mutex_unlock(&vq->mutex);
 }
@@ -1427,7 +1433,7 @@ static int vhost_scsi_open(struct inode
 		vqs[i] = &vs->vqs[i].vq;
 		vs->vqs[i].vq.handle_kick = vhost_scsi_handle_kick;
 	}
-	vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ);
+	vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ, VHOST_SCSI_WEIGHT, 0);
 
 	vhost_scsi_init_inflight(vs, NULL);
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/vhost/vhost.c linux-libre-4.14.133-gnu/drivers/vhost/vhost.c
--- linux-libre-4.14.132-gnu/drivers/vhost/vhost.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/vhost/vhost.c	2019-07-10 03:54:43.000000000 -0400
@@ -412,8 +412,24 @@ static void vhost_dev_free_iovecs(struct
 		vhost_vq_free_iovecs(dev->vqs[i]);
 }
 
+bool vhost_exceeds_weight(struct vhost_virtqueue *vq,
+			  int pkts, int total_len)
+{
+	struct vhost_dev *dev = vq->dev;
+
+	if ((dev->byte_weight && total_len >= dev->byte_weight) ||
+	    pkts >= dev->weight) {
+		vhost_poll_queue(&vq->poll);
+		return true;
+	}
+
+	return false;
+}
+EXPORT_SYMBOL_GPL(vhost_exceeds_weight);
+
 void vhost_dev_init(struct vhost_dev *dev,
-		    struct vhost_virtqueue **vqs, int nvqs)
+		    struct vhost_virtqueue **vqs, int nvqs,
+		    int weight, int byte_weight)
 {
 	struct vhost_virtqueue *vq;
 	int i;
@@ -427,6 +443,8 @@ void vhost_dev_init(struct vhost_dev *de
 	dev->iotlb = NULL;
 	dev->mm = NULL;
 	dev->worker = NULL;
+	dev->weight = weight;
+	dev->byte_weight = byte_weight;
 	init_llist_head(&dev->work_list);
 	init_waitqueue_head(&dev->wait);
 	INIT_LIST_HEAD(&dev->read_list);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/vhost/vhost.h linux-libre-4.14.133-gnu/drivers/vhost/vhost.h
--- linux-libre-4.14.132-gnu/drivers/vhost/vhost.h	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/vhost/vhost.h	2019-07-10 03:54:43.000000000 -0400
@@ -173,9 +173,13 @@ struct vhost_dev {
 	struct list_head read_list;
 	struct list_head pending_list;
 	wait_queue_head_t wait;
+	int weight;
+	int byte_weight;
 };
 
-void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs);
+bool vhost_exceeds_weight(struct vhost_virtqueue *vq, int pkts, int total_len);
+void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs,
+		    int nvqs, int weight, int byte_weight);
 long vhost_dev_set_owner(struct vhost_dev *dev);
 bool vhost_dev_has_owner(struct vhost_dev *dev);
 long vhost_dev_check_owner(struct vhost_dev *);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/drivers/vhost/vsock.c linux-libre-4.14.133-gnu/drivers/vhost/vsock.c
--- linux-libre-4.14.132-gnu/drivers/vhost/vsock.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/drivers/vhost/vsock.c	2019-07-10 03:54:43.000000000 -0400
@@ -21,6 +21,14 @@
 #include "vhost.h"
 
 #define VHOST_VSOCK_DEFAULT_HOST_CID	2
+/* Max number of bytes transferred before requeueing the job.
+ * Using this limit prevents one virtqueue from starving others. */
+#define VHOST_VSOCK_WEIGHT 0x80000
+/* Max number of packets transferred before requeueing the job.
+ * Using this limit prevents one virtqueue from starving others with
+ * small pkts.
+ */
+#define VHOST_VSOCK_PKT_WEIGHT 256
 
 enum {
 	VHOST_VSOCK_FEATURES = VHOST_FEATURES,
@@ -78,6 +86,7 @@ vhost_transport_do_send_pkt(struct vhost
 			    struct vhost_virtqueue *vq)
 {
 	struct vhost_virtqueue *tx_vq = &vsock->vqs[VSOCK_VQ_TX];
+	int pkts = 0, total_len = 0;
 	bool added = false;
 	bool restart_tx = false;
 
@@ -89,7 +98,7 @@ vhost_transport_do_send_pkt(struct vhost
 	/* Avoid further vmexits, we're already processing the virtqueue */
 	vhost_disable_notify(&vsock->dev, vq);
 
-	for (;;) {
+	do {
 		struct virtio_vsock_pkt *pkt;
 		struct iov_iter iov_iter;
 		unsigned out, in;
@@ -174,8 +183,9 @@ vhost_transport_do_send_pkt(struct vhost
 		 */
 		virtio_transport_deliver_tap_pkt(pkt);
 
+		total_len += pkt->len;
 		virtio_transport_free_pkt(pkt);
-	}
+	} while(likely(!vhost_exceeds_weight(vq, ++pkts, total_len)));
 	if (added)
 		vhost_signal(&vsock->dev, vq);
 
@@ -350,7 +360,7 @@ static void vhost_vsock_handle_tx_kick(s
 	struct vhost_vsock *vsock = container_of(vq->dev, struct vhost_vsock,
 						 dev);
 	struct virtio_vsock_pkt *pkt;
-	int head;
+	int head, pkts = 0, total_len = 0;
 	unsigned int out, in;
 	bool added = false;
 
@@ -360,7 +370,7 @@ static void vhost_vsock_handle_tx_kick(s
 		goto out;
 
 	vhost_disable_notify(&vsock->dev, vq);
-	for (;;) {
+	do {
 		u32 len;
 
 		if (!vhost_vsock_more_replies(vsock)) {
@@ -401,9 +411,11 @@ static void vhost_vsock_handle_tx_kick(s
 		else
 			virtio_transport_free_pkt(pkt);
 
-		vhost_add_used(vq, head, sizeof(pkt->hdr) + len);
+		len += sizeof(pkt->hdr);
+		vhost_add_used(vq, head, len);
+		total_len += len;
 		added = true;
-	}
+	} while(likely(!vhost_exceeds_weight(vq, ++pkts, total_len)));
 
 no_more_replies:
 	if (added)
@@ -531,7 +543,8 @@ static int vhost_vsock_dev_open(struct i
 	vsock->vqs[VSOCK_VQ_TX].handle_kick = vhost_vsock_handle_tx_kick;
 	vsock->vqs[VSOCK_VQ_RX].handle_kick = vhost_vsock_handle_rx_kick;
 
-	vhost_dev_init(&vsock->dev, vqs, ARRAY_SIZE(vsock->vqs));
+	vhost_dev_init(&vsock->dev, vqs, ARRAY_SIZE(vsock->vqs),
+		       VHOST_VSOCK_PKT_WEIGHT, VHOST_VSOCK_WEIGHT);
 
 	file->private_data = vsock;
 	spin_lock_init(&vsock->send_pkt_list_lock);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/fs/btrfs/backref.c linux-libre-4.14.133-gnu/fs/btrfs/backref.c
--- linux-libre-4.14.132-gnu/fs/btrfs/backref.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/fs/btrfs/backref.c	2019-07-10 03:54:43.000000000 -0400
@@ -1290,8 +1290,6 @@ again:
 					ret = -EIO;
 					goto out;
 				}
-				btrfs_tree_read_lock(eb);
-				btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
 				if (!path->skip_locking) {
 					btrfs_tree_read_lock(eb);
 					btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/fs/btrfs/dev-replace.c linux-libre-4.14.133-gnu/fs/btrfs/dev-replace.c
--- linux-libre-4.14.132-gnu/fs/btrfs/dev-replace.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/fs/btrfs/dev-replace.c	2019-07-10 03:54:43.000000000 -0400
@@ -512,18 +512,27 @@ static int btrfs_dev_replace_finishing(s
 	}
 	btrfs_wait_ordered_roots(fs_info, U64_MAX, 0, (u64)-1);
 
-	trans = btrfs_start_transaction(root, 0);
-	if (IS_ERR(trans)) {
-		mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
-		return PTR_ERR(trans);
+	while (1) {
+		trans = btrfs_start_transaction(root, 0);
+		if (IS_ERR(trans)) {
+			mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
+			return PTR_ERR(trans);
+		}
+		ret = btrfs_commit_transaction(trans);
+		WARN_ON(ret);
+		mutex_lock(&uuid_mutex);
+		/* keep away write_all_supers() during the finishing procedure */
+		mutex_lock(&fs_info->fs_devices->device_list_mutex);
+		mutex_lock(&fs_info->chunk_mutex);
+		if (src_device->has_pending_chunks) {
+			mutex_unlock(&root->fs_info->chunk_mutex);
+			mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
+			mutex_unlock(&uuid_mutex);
+		} else {
+			break;
+		}
 	}
-	ret = btrfs_commit_transaction(trans);
-	WARN_ON(ret);
 
-	mutex_lock(&uuid_mutex);
-	/* keep away write_all_supers() during the finishing procedure */
-	mutex_lock(&fs_info->fs_devices->device_list_mutex);
-	mutex_lock(&fs_info->chunk_mutex);
 	btrfs_dev_replace_lock(dev_replace, 1);
 	dev_replace->replace_state =
 		scrub_ret ? BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED
diff -druNp --no-dereference linux-libre-4.14.132-gnu/fs/btrfs/volumes.c linux-libre-4.14.133-gnu/fs/btrfs/volumes.c
--- linux-libre-4.14.132-gnu/fs/btrfs/volumes.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/fs/btrfs/volumes.c	2019-07-10 03:54:43.000000000 -0400
@@ -4851,6 +4851,7 @@ static int __btrfs_alloc_chunk(struct bt
 	for (i = 0; i < map->num_stripes; i++) {
 		num_bytes = map->stripes[i].dev->bytes_used + stripe_size;
 		btrfs_device_set_bytes_used(map->stripes[i].dev, num_bytes);
+		map->stripes[i].dev->has_pending_chunks = true;
 	}
 
 	atomic64_sub(stripe_size * map->num_stripes, &info->free_chunk_space);
@@ -7310,6 +7311,7 @@ void btrfs_update_commit_device_bytes_us
 		for (i = 0; i < map->num_stripes; i++) {
 			dev = map->stripes[i].dev;
 			dev->commit_bytes_used = dev->bytes_used;
+			dev->has_pending_chunks = false;
 		}
 	}
 	mutex_unlock(&fs_info->chunk_mutex);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/fs/btrfs/volumes.h linux-libre-4.14.133-gnu/fs/btrfs/volumes.h
--- linux-libre-4.14.132-gnu/fs/btrfs/volumes.h	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/fs/btrfs/volumes.h	2019-07-10 03:54:43.000000000 -0400
@@ -61,6 +61,11 @@ struct btrfs_device {
 
 	spinlock_t io_lock ____cacheline_aligned;
 	int running_pending;
+	/* When true means this device has pending chunk alloc in
+	 * current transaction. Protected by chunk_mutex.
+	 */
+	bool has_pending_chunks;
+
 	/* regular prio bios */
 	struct btrfs_pending_bios pending_bios;
 	/* sync bios */
diff -druNp --no-dereference linux-libre-4.14.132-gnu/kernel/cgroup/cpuset.c linux-libre-4.14.133-gnu/kernel/cgroup/cpuset.c
--- linux-libre-4.14.132-gnu/kernel/cgroup/cpuset.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/kernel/cgroup/cpuset.c	2019-07-10 03:54:43.000000000 -0400
@@ -2436,10 +2436,23 @@ void cpuset_cpus_allowed(struct task_str
 	spin_unlock_irqrestore(&callback_lock, flags);
 }
 
+/**
+ * cpuset_cpus_allowed_fallback - final fallback before complete catastrophe.
+ * @tsk: pointer to task_struct with which the scheduler is struggling
+ *
+ * Description: In the case that the scheduler cannot find an allowed cpu in
+ * tsk->cpus_allowed, we fall back to task_cs(tsk)->cpus_allowed. In legacy
+ * mode however, this value is the same as task_cs(tsk)->effective_cpus,
+ * which will not contain a sane cpumask during cases such as cpu hotplugging.
+ * This is the absolute last resort for the scheduler and it is only used if
+ * _every_ other avenue has been traveled.
+ **/
+
 void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
 {
 	rcu_read_lock();
-	do_set_cpus_allowed(tsk, task_cs(tsk)->effective_cpus);
+	do_set_cpus_allowed(tsk, is_in_v2_mode() ?
+		task_cs(tsk)->cpus_allowed : cpu_possible_mask);
 	rcu_read_unlock();
 
 	/*
diff -druNp --no-dereference linux-libre-4.14.132-gnu/kernel/livepatch/core.c linux-libre-4.14.133-gnu/kernel/livepatch/core.c
--- linux-libre-4.14.132-gnu/kernel/livepatch/core.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/kernel/livepatch/core.c	2019-07-10 03:54:43.000000000 -0400
@@ -30,6 +30,7 @@
 #include <linux/elf.h>
 #include <linux/moduleloader.h>
 #include <linux/completion.h>
+#include <linux/memory.h>
 #include <asm/cacheflush.h>
 #include "core.h"
 #include "patch.h"
@@ -635,16 +636,21 @@ static int klp_init_object_loaded(struct
 	struct klp_func *func;
 	int ret;
 
+	mutex_lock(&text_mutex);
+
 	module_disable_ro(patch->mod);
 	ret = klp_write_object_relocations(patch->mod, obj);
 	if (ret) {
 		module_enable_ro(patch->mod, true);
+		mutex_unlock(&text_mutex);
 		return ret;
 	}
 
 	arch_klp_init_object_loaded(patch, obj);
 	module_enable_ro(patch->mod, true);
 
+	mutex_unlock(&text_mutex);
+
 	klp_for_each_func(obj, func) {
 		ret = klp_find_object_symbol(obj->name, func->old_name,
 					     func->old_sympos,
diff -druNp --no-dereference linux-libre-4.14.132-gnu/kernel/ptrace.c linux-libre-4.14.133-gnu/kernel/ptrace.c
--- linux-libre-4.14.132-gnu/kernel/ptrace.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/kernel/ptrace.c	2019-07-10 03:54:43.000000000 -0400
@@ -78,9 +78,7 @@ void __ptrace_link(struct task_struct *c
  */
 static void ptrace_link(struct task_struct *child, struct task_struct *new_parent)
 {
-	rcu_read_lock();
-	__ptrace_link(child, new_parent, __task_cred(new_parent));
-	rcu_read_unlock();
+	__ptrace_link(child, new_parent, current_cred());
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.14.132-gnu/kernel/trace/ftrace.c linux-libre-4.14.133-gnu/kernel/trace/ftrace.c
--- linux-libre-4.14.132-gnu/kernel/trace/ftrace.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/kernel/trace/ftrace.c	2019-07-10 03:54:43.000000000 -0400
@@ -4280,10 +4280,13 @@ void free_ftrace_func_mapper(struct ftra
 	struct ftrace_func_entry *entry;
 	struct ftrace_func_map *map;
 	struct hlist_head *hhd;
-	int size = 1 << mapper->hash.size_bits;
-	int i;
+	int size, i;
+
+	if (!mapper)
+		return;
 
 	if (free_func && mapper->hash.count) {
+		size = 1 << mapper->hash.size_bits;
 		for (i = 0; i < size; i++) {
 			hhd = &mapper->hash.buckets[i];
 			hlist_for_each_entry(entry, hhd, hlist) {
diff -druNp --no-dereference linux-libre-4.14.132-gnu/kernel/trace/trace.c linux-libre-4.14.133-gnu/kernel/trace/trace.c
--- linux-libre-4.14.132-gnu/kernel/trace/trace.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/kernel/trace/trace.c	2019-07-10 03:54:43.000000000 -0400
@@ -6394,11 +6394,13 @@ tracing_snapshot_write(struct file *filp
 			break;
 		}
 #endif
-		if (!tr->allocated_snapshot) {
+		if (tr->allocated_snapshot)
+			ret = resize_buffer_duplicate_size(&tr->max_buffer,
+					&tr->trace_buffer, iter->cpu_file);
+		else
 			ret = tracing_alloc_snapshot_instance(tr);
-			if (ret < 0)
-				break;
-		}
+		if (ret < 0)
+			break;
 		local_irq_disable();
 		/* Now, we're going to swap */
 		if (iter->cpu_file == RING_BUFFER_ALL_CPUS)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/lib/mpi/mpi-pow.c linux-libre-4.14.133-gnu/lib/mpi/mpi-pow.c
--- linux-libre-4.14.132-gnu/lib/mpi/mpi-pow.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/lib/mpi/mpi-pow.c	2019-07-10 03:54:43.000000000 -0400
@@ -37,6 +37,7 @@
 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod)
 {
 	mpi_ptr_t mp_marker = NULL, bp_marker = NULL, ep_marker = NULL;
+	struct karatsuba_ctx karactx = {};
 	mpi_ptr_t xp_marker = NULL;
 	mpi_ptr_t tspace = NULL;
 	mpi_ptr_t rp, ep, mp, bp;
@@ -164,13 +165,11 @@ int mpi_powm(MPI res, MPI base, MPI exp,
 		int c;
 		mpi_limb_t e;
 		mpi_limb_t carry_limb;
-		struct karatsuba_ctx karactx;
 
 		xp = xp_marker = mpi_alloc_limb_space(2 * (msize + 1));
 		if (!xp)
 			goto enomem;
 
-		memset(&karactx, 0, sizeof karactx);
 		negative_result = (ep[0] & 1) && base->sign;
 
 		i = esize - 1;
@@ -295,8 +294,6 @@ int mpi_powm(MPI res, MPI base, MPI exp,
 		if (mod_shift_cnt)
 			mpihelp_rshift(rp, rp, rsize, mod_shift_cnt);
 		MPN_NORMALIZE(rp, rsize);
-
-		mpihelp_release_karatsuba_ctx(&karactx);
 	}
 
 	if (negative_result && rsize) {
@@ -313,6 +310,7 @@ int mpi_powm(MPI res, MPI base, MPI exp,
 leave:
 	rc = 0;
 enomem:
+	mpihelp_release_karatsuba_ctx(&karactx);
 	if (assign_rp)
 		mpi_assign_limb_space(res, rp, size);
 	if (mp_marker)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/Makefile linux-libre-4.14.133-gnu/Makefile
--- linux-libre-4.14.132-gnu/Makefile	2019-07-03 18:43:25.000000000 -0400
+++ linux-libre-4.14.133-gnu/Makefile	2019-07-10 17:52:07.000000000 -0400
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 132
+SUBLEVEL = 133
 EXTRAVERSION = -gnu
 NAME = Petit Gorille
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/mm/mlock.c linux-libre-4.14.133-gnu/mm/mlock.c
--- linux-libre-4.14.132-gnu/mm/mlock.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/mm/mlock.c	2019-07-10 03:54:43.000000000 -0400
@@ -629,11 +629,11 @@ static int apply_vma_lock_flags(unsigned
  * is also counted.
  * Return value: previously mlocked page counts
  */
-static int count_mm_mlocked_page_nr(struct mm_struct *mm,
+static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm,
 		unsigned long start, size_t len)
 {
 	struct vm_area_struct *vma;
-	int count = 0;
+	unsigned long count = 0;
 
 	if (mm == NULL)
 		mm = current->mm;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/mm/vmscan.c linux-libre-4.14.133-gnu/mm/vmscan.c
--- linux-libre-4.14.132-gnu/mm/vmscan.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/mm/vmscan.c	2019-07-10 03:54:43.000000000 -0400
@@ -3439,19 +3439,18 @@ out:
 }
 
 /*
- * pgdat->kswapd_classzone_idx is the highest zone index that a recent
- * allocation request woke kswapd for. When kswapd has not woken recently,
- * the value is MAX_NR_ZONES which is not a valid index. This compares a
- * given classzone and returns it or the highest classzone index kswapd
- * was recently woke for.
+ * The pgdat->kswapd_classzone_idx is used to pass the highest zone index to be
+ * reclaimed by kswapd from the waker. If the value is MAX_NR_ZONES which is not
+ * a valid index then either kswapd runs for first time or kswapd couldn't sleep
+ * after previous reclaim attempt (node is still unbalanced). In that case
+ * return the zone index of the previous kswapd reclaim cycle.
  */
 static enum zone_type kswapd_classzone_idx(pg_data_t *pgdat,
-					   enum zone_type classzone_idx)
+					   enum zone_type prev_classzone_idx)
 {
 	if (pgdat->kswapd_classzone_idx == MAX_NR_ZONES)
-		return classzone_idx;
-
-	return max(pgdat->kswapd_classzone_idx, classzone_idx);
+		return prev_classzone_idx;
+	return pgdat->kswapd_classzone_idx;
 }
 
 static void kswapd_try_to_sleep(pg_data_t *pgdat, int alloc_order, int reclaim_order,
@@ -3592,7 +3591,7 @@ kswapd_try_sleep:
 
 		/* Read the new order and classzone_idx */
 		alloc_order = reclaim_order = pgdat->kswapd_order;
-		classzone_idx = kswapd_classzone_idx(pgdat, 0);
+		classzone_idx = kswapd_classzone_idx(pgdat, classzone_idx);
 		pgdat->kswapd_order = 0;
 		pgdat->kswapd_classzone_idx = MAX_NR_ZONES;
 
@@ -3643,8 +3642,12 @@ void wakeup_kswapd(struct zone *zone, in
 	if (!cpuset_zone_allowed(zone, GFP_KERNEL | __GFP_HARDWALL))
 		return;
 	pgdat = zone->zone_pgdat;
-	pgdat->kswapd_classzone_idx = kswapd_classzone_idx(pgdat,
-							   classzone_idx);
+
+	if (pgdat->kswapd_classzone_idx == MAX_NR_ZONES)
+		pgdat->kswapd_classzone_idx = classzone_idx;
+	else
+		pgdat->kswapd_classzone_idx = max(pgdat->kswapd_classzone_idx,
+						  classzone_idx);
 	pgdat->kswapd_order = max(pgdat->kswapd_order, order);
 	if (!waitqueue_active(&pgdat->kswapd_wait))
 		return;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/net/bluetooth/l2cap_core.c linux-libre-4.14.133-gnu/net/bluetooth/l2cap_core.c
--- linux-libre-4.14.132-gnu/net/bluetooth/l2cap_core.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/net/bluetooth/l2cap_core.c	2019-07-10 03:54:43.000000000 -0400
@@ -1352,7 +1352,7 @@ static bool l2cap_check_enc_key_size(str
 	 * actually encrypted before enforcing a key size.
 	 */
 	return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
-		hcon->enc_key_size > HCI_MIN_ENC_KEY_SIZE);
+		hcon->enc_key_size >= HCI_MIN_ENC_KEY_SIZE);
 }
 
 static void l2cap_do_start(struct l2cap_chan *chan)
diff -druNp --no-dereference linux-libre-4.14.132-gnu/net/sunrpc/xprtrdma/svc_rdma_transport.c linux-libre-4.14.133-gnu/net/sunrpc/xprtrdma/svc_rdma_transport.c
--- linux-libre-4.14.132-gnu/net/sunrpc/xprtrdma/svc_rdma_transport.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/net/sunrpc/xprtrdma/svc_rdma_transport.c	2019-07-10 03:54:43.000000000 -0400
@@ -524,9 +524,14 @@ static void handle_connect_req(struct rd
 	/* Save client advertised inbound read limit for use later in accept. */
 	newxprt->sc_ord = param->initiator_depth;
 
-	/* Set the local and remote addresses in the transport */
 	sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
 	svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa));
+	/* The remote port is arbitrary and not under the control of the
+	 * client ULP. Set it to a fixed value so that the DRC continues
+	 * to be effective after a reconnect.
+	 */
+	rpc_set_port((struct sockaddr *)&newxprt->sc_xprt.xpt_remote, 0);
+
 	sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
 	svc_xprt_set_local(&newxprt->sc_xprt, sa, svc_addr_len(sa));
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/scripts/decode_stacktrace.sh linux-libre-4.14.133-gnu/scripts/decode_stacktrace.sh
--- linux-libre-4.14.132-gnu/scripts/decode_stacktrace.sh	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/scripts/decode_stacktrace.sh	2019-07-10 03:54:43.000000000 -0400
@@ -66,7 +66,7 @@ parse_symbol() {
 	if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then
 		local code=${cache[$module,$address]}
 	else
-		local code=$(addr2line -i -e "$objfile" "$address")
+		local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address")
 		cache[$module,$address]=$code
 	fi
 
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/core/seq/oss/seq_oss_ioctl.c linux-libre-4.14.133-gnu/sound/core/seq/oss/seq_oss_ioctl.c
--- linux-libre-4.14.132-gnu/sound/core/seq/oss/seq_oss_ioctl.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/core/seq/oss/seq_oss_ioctl.c	2019-07-10 03:54:43.000000000 -0400
@@ -62,7 +62,7 @@ static int snd_seq_oss_oob_user(struct s
 	if (copy_from_user(ev, arg, 8))
 		return -EFAULT;
 	memset(&tmpev, 0, sizeof(tmpev));
-	snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client);
+	snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.client, dp->addr.port);
 	tmpev.time.tick = 0;
 	if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
 		snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/core/seq/oss/seq_oss_rw.c linux-libre-4.14.133-gnu/sound/core/seq/oss/seq_oss_rw.c
--- linux-libre-4.14.132-gnu/sound/core/seq/oss/seq_oss_rw.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/core/seq/oss/seq_oss_rw.c	2019-07-10 03:54:43.000000000 -0400
@@ -174,7 +174,7 @@ insert_queue(struct seq_oss_devinfo *dp,
 	memset(&event, 0, sizeof(event));
 	/* set dummy -- to be sure */
 	event.type = SNDRV_SEQ_EVENT_NOTEOFF;
-	snd_seq_oss_fill_addr(dp, &event, dp->addr.port, dp->addr.client);
+	snd_seq_oss_fill_addr(dp, &event, dp->addr.client, dp->addr.port);
 
 	if (snd_seq_oss_process_event(dp, rec, &event))
 		return 0; /* invalid event - no need to insert queue */
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/firewire/amdtp-am824.c linux-libre-4.14.133-gnu/sound/firewire/amdtp-am824.c
--- linux-libre-4.14.132-gnu/sound/firewire/amdtp-am824.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/firewire/amdtp-am824.c	2019-07-10 03:54:43.000000000 -0400
@@ -321,7 +321,7 @@ static void read_midi_messages(struct am
 	u8 *b;
 
 	for (f = 0; f < frames; f++) {
-		port = (s->data_block_counter + f) % 8;
+		port = (8 - s->tx_first_dbc + s->data_block_counter + f) % 8;
 		b = (u8 *)&buffer[p->midi_position];
 
 		len = b[0] - 0x80;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/pci/hda/patch_realtek.c linux-libre-4.14.133-gnu/sound/pci/hda/patch_realtek.c
--- linux-libre-4.14.132-gnu/sound/pci/hda/patch_realtek.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/pci/hda/patch_realtek.c	2019-07-10 03:54:43.000000000 -0400
@@ -6590,6 +6590,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
 	SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
 	SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
+	SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
 	SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
 	SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
 	SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/soc/codecs/cs4265.c linux-libre-4.14.133-gnu/sound/soc/codecs/cs4265.c
--- linux-libre-4.14.132-gnu/sound/soc/codecs/cs4265.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/soc/codecs/cs4265.c	2019-07-10 03:54:43.000000000 -0400
@@ -60,7 +60,7 @@ static const struct reg_default cs4265_r
 static bool cs4265_readable_register(struct device *dev, unsigned int reg)
 {
 	switch (reg) {
-	case CS4265_CHIP_ID ... CS4265_SPDIF_CTL2:
+	case CS4265_CHIP_ID ... CS4265_MAX_REGISTER:
 		return true;
 	default:
 		return false;
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/soc/codecs/max98090.c linux-libre-4.14.133-gnu/sound/soc/codecs/max98090.c
--- linux-libre-4.14.132-gnu/sound/soc/codecs/max98090.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/soc/codecs/max98090.c	2019-07-10 03:54:43.000000000 -0400
@@ -1924,6 +1924,21 @@ static int max98090_configure_dmic(struc
 	return 0;
 }
 
+static int max98090_dai_startup(struct snd_pcm_substream *substream,
+				struct snd_soc_dai *dai)
+{
+	struct snd_soc_component *component = dai->component;
+	struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component);
+	unsigned int fmt = max98090->dai_fmt;
+
+	/* Remove 24-bit format support if it is not in right justified mode. */
+	if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) != SND_SOC_DAIFMT_RIGHT_J) {
+		substream->runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
+		snd_pcm_hw_constraint_msbits(substream->runtime, 0, 16, 16);
+	}
+	return 0;
+}
+
 static int max98090_dai_hw_params(struct snd_pcm_substream *substream,
 				   struct snd_pcm_hw_params *params,
 				   struct snd_soc_dai *dai)
@@ -2331,6 +2346,7 @@ EXPORT_SYMBOL_GPL(max98090_mic_detect);
 #define MAX98090_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
 
 static const struct snd_soc_dai_ops max98090_dai_ops = {
+	.startup = max98090_dai_startup,
 	.set_sysclk = max98090_dai_set_sysclk,
 	.set_fmt = max98090_dai_set_fmt,
 	.set_tdm_slot = max98090_set_tdm_slot,
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/soc/codecs/rt274.c linux-libre-4.14.133-gnu/sound/soc/codecs/rt274.c
--- linux-libre-4.14.132-gnu/sound/soc/codecs/rt274.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/soc/codecs/rt274.c	2019-07-10 03:54:43.000000000 -0400
@@ -398,6 +398,8 @@ static int rt274_mic_detect(struct snd_s
 {
 	struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
 
+	rt274->jack = jack;
+
 	if (jack == NULL) {
 		/* Disable jack detection */
 		regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
@@ -405,7 +407,6 @@ static int rt274_mic_detect(struct snd_s
 
 		return 0;
 	}
-	rt274->jack = jack;
 
 	regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
 				RT274_IRQ_EN, RT274_IRQ_EN);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/soc/soc-pcm.c linux-libre-4.14.133-gnu/sound/soc/soc-pcm.c
--- linux-libre-4.14.132-gnu/sound/soc/soc-pcm.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/soc/soc-pcm.c	2019-07-10 03:54:43.000000000 -0400
@@ -2233,7 +2233,8 @@ int dpcm_be_dai_prepare(struct snd_soc_p
 
 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) &&
-		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND))
+		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) &&
+		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED))
 			continue;
 
 		dev_dbg(be->dev, "ASoC: prepare BE %s\n",
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/soc/sunxi/sun4i-i2s.c linux-libre-4.14.133-gnu/sound/soc/sunxi/sun4i-i2s.c
--- linux-libre-4.14.132-gnu/sound/soc/sunxi/sun4i-i2s.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/soc/sunxi/sun4i-i2s.c	2019-07-10 03:54:43.000000000 -0400
@@ -110,7 +110,7 @@
 
 #define SUN8I_I2S_TX_CHAN_MAP_REG	0x44
 #define SUN8I_I2S_TX_CHAN_SEL_REG	0x34
-#define SUN8I_I2S_TX_CHAN_OFFSET_MASK		GENMASK(13, 11)
+#define SUN8I_I2S_TX_CHAN_OFFSET_MASK		GENMASK(13, 12)
 #define SUN8I_I2S_TX_CHAN_OFFSET(offset)	(offset << 12)
 #define SUN8I_I2S_TX_CHAN_EN_MASK		GENMASK(11, 4)
 #define SUN8I_I2S_TX_CHAN_EN(num_chan)		(((1 << num_chan) - 1) << 4)
@@ -442,6 +442,10 @@ static int sun4i_i2s_set_fmt(struct snd_
 		regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,
 				   SUN8I_I2S_TX_CHAN_OFFSET_MASK,
 				   SUN8I_I2S_TX_CHAN_OFFSET(offset));
+
+		regmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG,
+				   SUN8I_I2S_TX_CHAN_OFFSET_MASK,
+				   SUN8I_I2S_TX_CHAN_OFFSET(offset));
 	}
 
 	regmap_field_write(i2s->field_fmt_mode, val);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/usb/line6/pcm.c linux-libre-4.14.133-gnu/sound/usb/line6/pcm.c
--- linux-libre-4.14.132-gnu/sound/usb/line6/pcm.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/usb/line6/pcm.c	2019-07-10 03:54:43.000000000 -0400
@@ -558,6 +558,11 @@ int line6_init_pcm(struct usb_line6 *lin
 	line6pcm->max_packet_size_out =
 		usb_maxpacket(line6->usbdev,
 			usb_sndisocpipe(line6->usbdev, ep_write), 1);
+	if (!line6pcm->max_packet_size_in || !line6pcm->max_packet_size_out) {
+		dev_err(line6pcm->line6->ifcdev,
+			"cannot get proper max packet size\n");
+		return -EINVAL;
+	}
 
 	spin_lock_init(&line6pcm->out.lock);
 	spin_lock_init(&line6pcm->in.lock);
diff -druNp --no-dereference linux-libre-4.14.132-gnu/sound/usb/mixer_quirks.c linux-libre-4.14.133-gnu/sound/usb/mixer_quirks.c
--- linux-libre-4.14.132-gnu/sound/usb/mixer_quirks.c	2019-07-03 07:16:04.000000000 -0400
+++ linux-libre-4.14.133-gnu/sound/usb/mixer_quirks.c	2019-07-10 03:54:43.000000000 -0400
@@ -754,7 +754,7 @@ static int snd_ni_control_init_val(struc
 		return err;
 	}
 
-	kctl->private_value |= (value << 24);
+	kctl->private_value |= ((unsigned int)value << 24);
 	return 0;
 }
 
@@ -915,7 +915,7 @@ static int snd_ftu_eff_switch_init(struc
 	if (err < 0)
 		return err;
 
-	kctl->private_value |= value[0] << 24;
+	kctl->private_value |= (unsigned int)value[0] << 24;
 	return 0;
 }
 
