diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/arm/mach-s3c24xx/mach-osiris-dvs.c linux-libre-3.18.137-gnu/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
--- linux-libre-3.18.136-gnu/arch/arm/mach-s3c24xx/mach-osiris-dvs.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/arm/mach-s3c24xx/mach-osiris-dvs.c	2019-03-23 03:19:03.000000000 -0400
@@ -70,16 +70,16 @@ static int osiris_dvs_notify(struct noti
 
 	switch (val) {
 	case CPUFREQ_PRECHANGE:
-		if (old_dvs & !new_dvs ||
-		    cur_dvs & !new_dvs) {
+		if ((old_dvs && !new_dvs) ||
+		    (cur_dvs && !new_dvs)) {
 			pr_debug("%s: exiting dvs\n", __func__);
 			cur_dvs = false;
 			gpio_set_value(OSIRIS_GPIO_DVS, 1);
 		}
 		break;
 	case CPUFREQ_POSTCHANGE:
-		if (!old_dvs & new_dvs ||
-		    !cur_dvs & new_dvs) {
+		if ((!old_dvs && new_dvs) ||
+		    (!cur_dvs && new_dvs)) {
 			pr_debug("entering dvs\n");
 			cur_dvs = true;
 			gpio_set_value(OSIRIS_GPIO_DVS, 0);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/arm/plat-pxa/ssp.c linux-libre-3.18.137-gnu/arch/arm/plat-pxa/ssp.c
--- linux-libre-3.18.136-gnu/arch/arm/plat-pxa/ssp.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/arm/plat-pxa/ssp.c	2019-03-23 03:19:03.000000000 -0400
@@ -239,8 +239,6 @@ static int pxa_ssp_remove(struct platfor
 	if (ssp == NULL)
 		return -ENODEV;
 
-	iounmap(ssp->mmio_base);
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	release_mem_region(res->start, resource_size(res));
 
@@ -250,7 +248,6 @@ static int pxa_ssp_remove(struct platfor
 	list_del(&ssp->node);
 	mutex_unlock(&ssp_lock);
 
-	kfree(ssp);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/arm64/kernel/head.S linux-libre-3.18.137-gnu/arch/arm64/kernel/head.S
--- linux-libre-3.18.136-gnu/arch/arm64/kernel/head.S	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/arm64/kernel/head.S	2019-03-23 03:19:03.000000000 -0400
@@ -295,8 +295,7 @@ CPU_LE(	bic	x0, x0, #(3 << 24)	)	// Clea
 	/* GICv3 system register access */
 	mrs	x0, id_aa64pfr0_el1
 	ubfx	x0, x0, #24, #4
-	cmp	x0, #1
-	b.ne	3f
+	cbz	x0, 3f
 
 	mrs_s	x0, ICC_SRE_EL2
 	orr	x0, x0, #ICC_SRE_EL2_SRE	// Set ICC_SRE_EL2.SRE==1
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/m68k/Makefile linux-libre-3.18.137-gnu/arch/m68k/Makefile
--- linux-libre-3.18.136-gnu/arch/m68k/Makefile	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/m68k/Makefile	2019-03-23 03:19:03.000000000 -0400
@@ -59,7 +59,10 @@ cpuflags-$(CONFIG_M5206e)	:= $(call cc-o
 cpuflags-$(CONFIG_M5206)	:= $(call cc-option,-mcpu=5206,-m5200)
 
 KBUILD_AFLAGS += $(cpuflags-y)
-KBUILD_CFLAGS += $(cpuflags-y) -pipe
+KBUILD_CFLAGS += $(cpuflags-y)
+
+KBUILD_CFLAGS += -pipe -ffreestanding
+
 ifdef CONFIG_MMU
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
 KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/mips/configs/ath79_defconfig linux-libre-3.18.137-gnu/arch/mips/configs/ath79_defconfig
--- linux-libre-3.18.136-gnu/arch/mips/configs/ath79_defconfig	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/mips/configs/ath79_defconfig	2019-03-23 03:19:03.000000000 -0400
@@ -74,6 +74,7 @@ CONFIG_SERIAL_8250_CONSOLE=y
 # CONFIG_SERIAL_8250_PCI is not set
 CONFIG_SERIAL_8250_NR_UARTS=1
 CONFIG_SERIAL_8250_RUNTIME_UARTS=1
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_AR933X=y
 CONFIG_SERIAL_AR933X_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/mips/jazz/jazzdma.c linux-libre-3.18.137-gnu/arch/mips/jazz/jazzdma.c
--- linux-libre-3.18.136-gnu/arch/mips/jazz/jazzdma.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/mips/jazz/jazzdma.c	2019-03-23 03:19:03.000000000 -0400
@@ -71,14 +71,15 @@ static int __init vdma_init(void)
 						    get_order(VDMA_PGTBL_SIZE));
 	BUG_ON(!pgtbl);
 	dma_cache_wback_inv((unsigned long)pgtbl, VDMA_PGTBL_SIZE);
-	pgtbl = (VDMA_PGTBL_ENTRY *)KSEG1ADDR(pgtbl);
+	pgtbl = (VDMA_PGTBL_ENTRY *)CKSEG1ADDR((unsigned long)pgtbl);
 
 	/*
 	 * Clear the R4030 translation table
 	 */
 	vdma_pgtbl_init();
 
-	r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE, CPHYSADDR(pgtbl));
+	r4030_write_reg32(JAZZ_R4030_TRSTBL_BASE,
+			  CPHYSADDR((unsigned long)pgtbl));
 	r4030_write_reg32(JAZZ_R4030_TRSTBL_LIM, VDMA_PGTBL_SIZE);
 	r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/powerpc/kernel/entry_32.S linux-libre-3.18.137-gnu/arch/powerpc/kernel/entry_32.S
--- linux-libre-3.18.136-gnu/arch/powerpc/kernel/entry_32.S	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/powerpc/kernel/entry_32.S	2019-03-23 03:19:03.000000000 -0400
@@ -757,6 +757,9 @@ fast_exception_return:
 	mtcr	r10
 	lwz	r10,_LINK(r11)
 	mtlr	r10
+	/* Clear the exception_marker on the stack to avoid confusing stacktrace */
+	li	r10, 0
+	stw	r10, 8(r11)
 	REST_GPR(10, r11)
 	mtspr	SPRN_SRR1,r9
 	mtspr	SPRN_SRR0,r12
@@ -987,6 +990,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE
 	mtcrf	0xFF,r10
 	mtlr	r11
 
+	/* Clear the exception_marker on the stack to avoid confusing stacktrace */
+	li	r10, 0
+	stw	r10, 8(r1)
 	/*
 	 * Once we put values in SRR0 and SRR1, we are in a state
 	 * where exceptions are not recoverable, since taking an
@@ -1024,6 +1030,9 @@ exc_exit_restart_end:
 	mtlr	r11
 	lwz	r10,_CCR(r1)
 	mtcrf	0xff,r10
+	/* Clear the exception_marker on the stack to avoid confusing stacktrace */
+	li	r10, 0
+	stw	r10, 8(r1)
 	REST_2GPRS(9, r1)
 	.globl exc_exit_restart
 exc_exit_restart:
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/powerpc/platforms/83xx/suspend-asm.S linux-libre-3.18.137-gnu/arch/powerpc/platforms/83xx/suspend-asm.S
--- linux-libre-3.18.136-gnu/arch/powerpc/platforms/83xx/suspend-asm.S	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/powerpc/platforms/83xx/suspend-asm.S	2019-03-23 03:19:03.000000000 -0400
@@ -26,13 +26,13 @@
 #define SS_MSR		0x74
 #define SS_SDR1		0x78
 #define SS_LR		0x7c
-#define SS_SPRG		0x80 /* 4 SPRGs */
-#define SS_DBAT		0x90 /* 8 DBATs */
-#define SS_IBAT		0xd0 /* 8 IBATs */
-#define SS_TB		0x110
-#define SS_CR		0x118
-#define SS_GPREG	0x11c /* r12-r31 */
-#define STATE_SAVE_SIZE 0x16c
+#define SS_SPRG		0x80 /* 8 SPRGs */
+#define SS_DBAT		0xa0 /* 8 DBATs */
+#define SS_IBAT		0xe0 /* 8 IBATs */
+#define SS_TB		0x120
+#define SS_CR		0x128
+#define SS_GPREG	0x12c /* r12-r31 */
+#define STATE_SAVE_SIZE 0x17c
 
 	.section .data
 	.align	5
@@ -103,6 +103,16 @@ _GLOBAL(mpc83xx_enter_deep_sleep)
 	stw	r7, SS_SPRG+12(r3)
 	stw	r8, SS_SDR1(r3)
 
+	mfspr	r4, SPRN_SPRG4
+	mfspr	r5, SPRN_SPRG5
+	mfspr	r6, SPRN_SPRG6
+	mfspr	r7, SPRN_SPRG7
+
+	stw	r4, SS_SPRG+16(r3)
+	stw	r5, SS_SPRG+20(r3)
+	stw	r6, SS_SPRG+24(r3)
+	stw	r7, SS_SPRG+28(r3)
+
 	mfspr	r4, SPRN_DBAT0U
 	mfspr	r5, SPRN_DBAT0L
 	mfspr	r6, SPRN_DBAT1U
@@ -493,6 +503,16 @@ mpc83xx_deep_resume:
 	mtspr	SPRN_IBAT7U, r6
 	mtspr	SPRN_IBAT7L, r7
 
+	lwz	r4, SS_SPRG+16(r3)
+	lwz	r5, SS_SPRG+20(r3)
+	lwz	r6, SS_SPRG+24(r3)
+	lwz	r7, SS_SPRG+28(r3)
+
+	mtspr	SPRN_SPRG4, r4
+	mtspr	SPRN_SPRG5, r5
+	mtspr	SPRN_SPRG6, r6
+	mtspr	SPRN_SPRG7, r7
+
 	lwz	r4, SS_SPRG+0(r3)
 	lwz	r5, SS_SPRG+4(r3)
 	lwz	r6, SS_SPRG+8(r3)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/powerpc/platforms/embedded6xx/wii.c linux-libre-3.18.137-gnu/arch/powerpc/platforms/embedded6xx/wii.c
--- linux-libre-3.18.136-gnu/arch/powerpc/platforms/embedded6xx/wii.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/powerpc/platforms/embedded6xx/wii.c	2019-03-23 03:19:03.000000000 -0400
@@ -104,6 +104,10 @@ unsigned long __init wii_mmu_mapin_mem2(
 	/* MEM2 64MB@0x10000000 */
 	delta = wii_hole_start + wii_hole_size;
 	size = top - delta;
+
+	if (__map_without_bats)
+		return delta;
+
 	for (bl = 128<<10; bl < max_size; bl <<= 1) {
 		if (bl * 2 > size)
 			break;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/powerpc/platforms/powernv/opal-msglog.c linux-libre-3.18.137-gnu/arch/powerpc/platforms/powernv/opal-msglog.c
--- linux-libre-3.18.136-gnu/arch/powerpc/platforms/powernv/opal-msglog.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/powerpc/platforms/powernv/opal-msglog.c	2019-03-23 03:19:03.000000000 -0400
@@ -92,7 +92,7 @@ out:
 }
 
 static struct bin_attribute opal_msglog_attr = {
-	.attr = {.name = "msglog", .mode = 0444},
+	.attr = {.name = "msglog", .mode = 0400},
 	.read = opal_msglog_read
 };
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/x86/kernel/kexec-bzimage64.c linux-libre-3.18.137-gnu/arch/x86/kernel/kexec-bzimage64.c
--- linux-libre-3.18.136-gnu/arch/x86/kernel/kexec-bzimage64.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/x86/kernel/kexec-bzimage64.c	2019-03-23 03:19:03.000000000 -0400
@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *para
 	struct efi_info *current_ei = &boot_params.efi_info;
 	struct efi_info *ei = &params->efi_info;
 
+	if (!efi_enabled(EFI_RUNTIME_SERVICES))
+		return 0;
+
 	if (!current_ei->efi_memmap_size)
 		return 0;
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/x86/kvm/svm.c linux-libre-3.18.137-gnu/arch/x86/kvm/svm.c
--- linux-libre-3.18.136-gnu/arch/x86/kvm/svm.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/x86/kvm/svm.c	2019-03-23 03:19:03.000000000 -0400
@@ -2431,6 +2431,14 @@ static int nested_svm_vmexit(struct vcpu
 	kvm_mmu_reset_context(&svm->vcpu);
 	kvm_mmu_load(&svm->vcpu);
 
+	/*
+	 * Drop what we picked up for L2 via svm_complete_interrupts() so it
+	 * doesn't end up in L1.
+	 */
+	svm->vcpu.arch.nmi_injected = false;
+	kvm_clear_exception_queue(&svm->vcpu);
+	kvm_clear_interrupt_queue(&svm->vcpu);
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/xtensa/configs/smp_lx200_defconfig linux-libre-3.18.137-gnu/arch/xtensa/configs/smp_lx200_defconfig
--- linux-libre-3.18.136-gnu/arch/xtensa/configs/smp_lx200_defconfig	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/xtensa/configs/smp_lx200_defconfig	2019-03-23 03:19:03.000000000 -0400
@@ -35,6 +35,7 @@ CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is not set
 # CONFIG_PCI is not set
+CONFIG_VECTORS_OFFSET=0x00002000
 CONFIG_XTENSA_PLATFORM_XTFPGA=y
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="earlycon=uart8250,mmio32,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug"
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/xtensa/kernel/head.S linux-libre-3.18.137-gnu/arch/xtensa/kernel/head.S
--- linux-libre-3.18.136-gnu/arch/xtensa/kernel/head.S	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/xtensa/kernel/head.S	2019-03-23 03:19:03.000000000 -0400
@@ -281,12 +281,13 @@ should_never_return:
 
 	movi	a2, cpu_start_ccount
 1:
+	memw
 	l32i	a3, a2, 0
 	beqi	a3, 0, 1b
 	movi	a3, 0
 	s32i	a3, a2, 0
-	memw
 1:
+	memw
 	l32i	a3, a2, 0
 	beqi	a3, 0, 1b
 	wsr	a3, ccount
@@ -323,11 +324,13 @@ ENTRY(cpu_restart)
 	rsr	a0, prid
 	neg	a2, a0
 	movi	a3, cpu_start_id
+	memw
 	s32i	a2, a3, 0
 #if XCHAL_DCACHE_IS_WRITEBACK
 	dhwbi	a3, 0
 #endif
 1:
+	memw
 	l32i	a2, a3, 0
 	dhi	a3, 0
 	bne	a2, a0, 1b
diff -druNp --no-dereference linux-libre-3.18.136-gnu/arch/xtensa/kernel/smp.c linux-libre-3.18.137-gnu/arch/xtensa/kernel/smp.c
--- linux-libre-3.18.136-gnu/arch/xtensa/kernel/smp.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/arch/xtensa/kernel/smp.c	2019-03-23 03:19:03.000000000 -0400
@@ -80,7 +80,7 @@ void __init smp_prepare_cpus(unsigned in
 {
 	unsigned i;
 
-	for (i = 0; i < max_cpus; ++i)
+	for_each_possible_cpu(i)
 		set_cpu_present(i, true);
 }
 
@@ -93,6 +93,11 @@ void __init smp_init_cpus(void)
 	pr_info("%s: Core Count = %d\n", __func__, ncpus);
 	pr_info("%s: Core Id = %d\n", __func__, core_id);
 
+	if (ncpus > NR_CPUS) {
+		ncpus = NR_CPUS;
+		pr_info("%s: limiting core count by %d\n", __func__, ncpus);
+	}
+
 	for (i = 0; i < ncpus; ++i)
 		set_cpu_possible(i, true);
 }
@@ -192,9 +197,11 @@ static int boot_secondary(unsigned int c
 	int i;
 
 #ifdef CONFIG_HOTPLUG_CPU
-	cpu_start_id = cpu;
-	system_flush_invalidate_dcache_range(
-			(unsigned long)&cpu_start_id, sizeof(cpu_start_id));
+	WRITE_ONCE(cpu_start_id, cpu);
+	/* Pairs with the third memw in the cpu_restart */
+	mb();
+	system_flush_invalidate_dcache_range((unsigned long)&cpu_start_id,
+					     sizeof(cpu_start_id));
 #endif
 	smp_call_function_single(0, mx_cpu_start, (void *)cpu, 1);
 
@@ -203,18 +210,21 @@ static int boot_secondary(unsigned int c
 			ccount = get_ccount();
 		while (!ccount);
 
-		cpu_start_ccount = ccount;
+		WRITE_ONCE(cpu_start_ccount, ccount);
 
-		while (time_before(jiffies, timeout)) {
+		do {
+			/*
+			 * Pairs with the first two memws in the
+			 * .Lboot_secondary.
+			 */
 			mb();
-			if (!cpu_start_ccount)
-				break;
-		}
+			ccount = READ_ONCE(cpu_start_ccount);
+		} while (ccount && time_before(jiffies, timeout));
 
-		if (cpu_start_ccount) {
+		if (ccount) {
 			smp_call_function_single(0, mx_cpu_stop,
-					(void *)cpu, 1);
-			cpu_start_ccount = 0;
+						 (void *)cpu, 1);
+			WRITE_ONCE(cpu_start_ccount, 0);
 			return -EIO;
 		}
 	}
@@ -234,6 +244,7 @@ int __cpu_up(unsigned int cpu, struct ta
 	pr_debug("%s: Calling wakeup_secondary(cpu:%d, idle:%p, sp: %08lx)\n",
 			__func__, cpu, idle, start_info.stack);
 
+	init_completion(&cpu_running);
 	ret = boot_secondary(cpu, idle);
 	if (ret == 0) {
 		wait_for_completion_timeout(&cpu_running,
@@ -295,8 +306,10 @@ void __cpu_die(unsigned int cpu)
 	unsigned long timeout = jiffies + msecs_to_jiffies(1000);
 	while (time_before(jiffies, timeout)) {
 		system_invalidate_dcache_range((unsigned long)&cpu_start_id,
-				sizeof(cpu_start_id));
-		if (cpu_start_id == -cpu) {
+					       sizeof(cpu_start_id));
+		/* Pairs with the second memw in the cpu_restart */
+		mb();
+		if (READ_ONCE(cpu_start_id) == -cpu) {
 			platform_cpu_kill(cpu);
 			return;
 		}
diff -druNp --no-dereference linux-libre-3.18.136-gnu/crypto/ahash.c linux-libre-3.18.137-gnu/crypto/ahash.c
--- linux-libre-3.18.136-gnu/crypto/ahash.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/crypto/ahash.c	2019-03-23 03:19:03.000000000 -0400
@@ -84,17 +84,17 @@ static int hash_walk_new_entry(struct cr
 int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
 {
 	unsigned int alignmask = walk->alignmask;
-	unsigned int nbytes = walk->entrylen;
 
 	walk->data -= walk->offset;
 
-	if (nbytes && walk->offset & alignmask && !err) {
-		walk->offset = ALIGN(walk->offset, alignmask + 1);
-		nbytes = min(nbytes,
-			     ((unsigned int)(PAGE_SIZE)) - walk->offset);
-		walk->entrylen -= nbytes;
+	if (walk->entrylen && (walk->offset & alignmask) && !err) {
+		unsigned int nbytes;
 
+		walk->offset = ALIGN(walk->offset, alignmask + 1);
+		nbytes = min(walk->entrylen,
+			     (unsigned int)(PAGE_SIZE - walk->offset));
 		if (nbytes) {
+			walk->entrylen -= nbytes;
 			walk->data += walk->offset;
 			return nbytes;
 		}
@@ -114,7 +114,7 @@ int crypto_hash_walk_done(struct crypto_
 	if (err)
 		return err;
 
-	if (nbytes) {
+	if (walk->entrylen) {
 		walk->offset = 0;
 		walk->pg++;
 		return hash_walk_next(walk);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/crypto/pcbc.c linux-libre-3.18.137-gnu/crypto/pcbc.c
--- linux-libre-3.18.136-gnu/crypto/pcbc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/crypto/pcbc.c	2019-03-23 03:19:03.000000000 -0400
@@ -52,7 +52,7 @@ static int crypto_pcbc_encrypt_segment(s
 	unsigned int nbytes = walk->nbytes;
 	u8 *src = walk->src.virt.addr;
 	u8 *dst = walk->dst.virt.addr;
-	u8 *iv = walk->iv;
+	u8 * const iv = walk->iv;
 
 	do {
 		crypto_xor(iv, src, bsize);
@@ -76,7 +76,7 @@ static int crypto_pcbc_encrypt_inplace(s
 	int bsize = crypto_cipher_blocksize(tfm);
 	unsigned int nbytes = walk->nbytes;
 	u8 *src = walk->src.virt.addr;
-	u8 *iv = walk->iv;
+	u8 * const iv = walk->iv;
 	u8 tmpbuf[bsize];
 
 	do {
@@ -89,8 +89,6 @@ static int crypto_pcbc_encrypt_inplace(s
 		src += bsize;
 	} while ((nbytes -= bsize) >= bsize);
 
-	memcpy(walk->iv, iv, bsize);
-
 	return nbytes;
 }
 
@@ -130,7 +128,7 @@ static int crypto_pcbc_decrypt_segment(s
 	unsigned int nbytes = walk->nbytes;
 	u8 *src = walk->src.virt.addr;
 	u8 *dst = walk->dst.virt.addr;
-	u8 *iv = walk->iv;
+	u8 * const iv = walk->iv;
 
 	do {
 		fn(crypto_cipher_tfm(tfm), dst, src);
@@ -142,8 +140,6 @@ static int crypto_pcbc_decrypt_segment(s
 		dst += bsize;
 	} while ((nbytes -= bsize) >= bsize);
 
-	memcpy(walk->iv, iv, bsize);
-
 	return nbytes;
 }
 
@@ -156,7 +152,7 @@ static int crypto_pcbc_decrypt_inplace(s
 	int bsize = crypto_cipher_blocksize(tfm);
 	unsigned int nbytes = walk->nbytes;
 	u8 *src = walk->src.virt.addr;
-	u8 *iv = walk->iv;
+	u8 * const iv = walk->iv;
 	u8 tmpbuf[bsize];
 
 	do {
@@ -169,8 +165,6 @@ static int crypto_pcbc_decrypt_inplace(s
 		src += bsize;
 	} while ((nbytes -= bsize) >= bsize);
 
-	memcpy(walk->iv, iv, bsize);
-
 	return nbytes;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/atm/he.c linux-libre-3.18.137-gnu/drivers/atm/he.c
--- linux-libre-3.18.136-gnu/drivers/atm/he.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/atm/he.c	2019-03-23 03:19:03.000000000 -0400
@@ -717,7 +717,7 @@ static int he_init_cs_block_rcm(struct h
 			instead of '/ 512', use '>> 9' to prevent a call
 			to divdu3 on x86 platforms
 		*/
-		rate_cps = (unsigned long long) (1 << exp) * (man + 512) >> 9;
+		rate_cps = (unsigned long long) (1UL << exp) * (man + 512) >> 9;
 
 		if (rate_cps < 10)
 			rate_cps = 10;	/* 2.2.1 minimum payload rate is 10 cps */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/cpufreq/pxa2xx-cpufreq.c linux-libre-3.18.137-gnu/drivers/cpufreq/pxa2xx-cpufreq.c
--- linux-libre-3.18.136-gnu/drivers/cpufreq/pxa2xx-cpufreq.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/cpufreq/pxa2xx-cpufreq.c	2019-03-23 03:19:03.000000000 -0400
@@ -191,7 +191,7 @@ static int pxa_cpufreq_change_voltage(px
 	return ret;
 }
 
-static void __init pxa_cpufreq_init_voltages(void)
+static void pxa_cpufreq_init_voltages(void)
 {
 	vcc_core = regulator_get(NULL, "vcc_core");
 	if (IS_ERR(vcc_core)) {
@@ -207,7 +207,7 @@ static int pxa_cpufreq_change_voltage(px
 	return 0;
 }
 
-static void __init pxa_cpufreq_init_voltages(void) { }
+static void pxa_cpufreq_init_voltages(void) { }
 #endif
 
 static void find_freq_tables(struct cpufreq_frequency_table **freq_table,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/dma/dmatest.c linux-libre-3.18.137-gnu/drivers/dma/dmatest.c
--- linux-libre-3.18.136-gnu/drivers/dma/dmatest.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/dma/dmatest.c	2019-03-23 03:19:03.000000000 -0400
@@ -548,11 +548,9 @@ static int dmatest_func(void *data)
 			srcs[i] = um->addr[i] + src_off;
 			ret = dma_mapping_error(dev->dev, um->addr[i]);
 			if (ret) {
-				dmaengine_unmap_put(um);
 				result("src mapping error", total_tests,
 				       src_off, dst_off, len, ret);
-				failed_tests++;
-				continue;
+				goto error_unmap_continue;
 			}
 			um->to_cnt++;
 		}
@@ -567,11 +565,9 @@ static int dmatest_func(void *data)
 					       DMA_BIDIRECTIONAL);
 			ret = dma_mapping_error(dev->dev, dsts[i]);
 			if (ret) {
-				dmaengine_unmap_put(um);
 				result("dst mapping error", total_tests,
 				       src_off, dst_off, len, ret);
-				failed_tests++;
-				continue;
+				goto error_unmap_continue;
 			}
 			um->bidi_cnt++;
 		}
@@ -596,12 +592,10 @@ static int dmatest_func(void *data)
 		}
 
 		if (!tx) {
-			dmaengine_unmap_put(um);
 			result("prep error", total_tests, src_off,
 			       dst_off, len, ret);
 			msleep(100);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 
 		done.done = false;
@@ -610,12 +604,10 @@ static int dmatest_func(void *data)
 		cookie = tx->tx_submit(tx);
 
 		if (dma_submit_error(cookie)) {
-			dmaengine_unmap_put(um);
 			result("submit error", total_tests, src_off,
 			       dst_off, len, ret);
 			msleep(100);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 		dma_async_issue_pending(chan);
 
@@ -636,16 +628,14 @@ static int dmatest_func(void *data)
 			dmaengine_unmap_put(um);
 			result("test timed out", total_tests, src_off, dst_off,
 			       len, 0);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		} else if (status != DMA_COMPLETE) {
 			dmaengine_unmap_put(um);
 			result(status == DMA_ERROR ?
 			       "completion error status" :
 			       "completion busy status", total_tests, src_off,
 			       dst_off, len, ret);
-			failed_tests++;
-			continue;
+			goto error_unmap_continue;
 		}
 
 		dmaengine_unmap_put(um);
@@ -684,6 +674,12 @@ static int dmatest_func(void *data)
 			verbose_result("test passed", total_tests, src_off,
 				       dst_off, len, 0);
 		}
+
+		continue;
+
+error_unmap_continue:
+		dmaengine_unmap_put(um);
+		failed_tests++;
 	}
 	runtime = ktime_us_delta(ktime_get(), ktime);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/firmware/iscsi_ibft.c linux-libre-3.18.137-gnu/drivers/firmware/iscsi_ibft.c
--- linux-libre-3.18.136-gnu/drivers/firmware/iscsi_ibft.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/firmware/iscsi_ibft.c	2019-03-23 03:19:03.000000000 -0400
@@ -503,6 +503,7 @@ static umode_t __init ibft_check_tgt_for
 	case ISCSI_BOOT_TGT_NIC_ASSOC:
 	case ISCSI_BOOT_TGT_CHAP_TYPE:
 		rc = S_IRUGO;
+		break;
 	case ISCSI_BOOT_TGT_NAME:
 		if (tgt->tgt_name_len)
 			rc = S_IRUGO;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/gpu/drm/msm/msm_rd.c linux-libre-3.18.137-gnu/drivers/gpu/drm/msm/msm_rd.c
--- linux-libre-3.18.136-gnu/drivers/gpu/drm/msm/msm_rd.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/gpu/drm/msm/msm_rd.c	2019-03-23 03:19:03.000000000 -0400
@@ -103,7 +103,9 @@ static void rd_write(struct msm_rd_state
 		char *fptr = &fifo->buf[fifo->head];
 		int n;
 
-		wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0);
+		wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0 || !rd->open);
+		if (!rd->open)
+			return;
 
 		n = min(sz, circ_space_to_end(&rd->fifo));
 		memcpy(fptr, ptr, n);
@@ -192,7 +194,10 @@ out:
 static int rd_release(struct inode *inode, struct file *file)
 {
 	struct msm_rd_state *rd = inode->i_private;
+
 	rd->open = false;
+	wake_up_all(&rd->fifo_event);
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/gpu/drm/radeon/evergreen_cs.c linux-libre-3.18.137-gnu/drivers/gpu/drm/radeon/evergreen_cs.c
--- linux-libre-3.18.136-gnu/drivers/gpu/drm/radeon/evergreen_cs.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/gpu/drm/radeon/evergreen_cs.c	2019-03-23 03:19:03.000000000 -0400
@@ -1318,6 +1318,7 @@ static int evergreen_cs_check_reg(struct
 			return -EINVAL;
 		}
 		ib[idx] += (u32)((reloc->gpu_offset >> 8) & 0xffffffff);
+		break;
 	case CB_TARGET_MASK:
 		track->cb_target_mask = radeon_get_ib_value(p, idx);
 		track->cb_dirty = true;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/i2c/busses/i2c-cadence.c linux-libre-3.18.137-gnu/drivers/i2c/busses/i2c-cadence.c
--- linux-libre-3.18.136-gnu/drivers/i2c/busses/i2c-cadence.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/i2c/busses/i2c-cadence.c	2019-03-23 03:19:03.000000000 -0400
@@ -320,8 +320,10 @@ static void cdns_i2c_mrecv(struct cdns_i
 	 * Check for the message size against FIFO depth and set the
 	 * 'hold bus' bit if it is greater than FIFO depth.
 	 */
-	if (id->recv_count > CDNS_I2C_FIFO_DEPTH)
+	if ((id->recv_count > CDNS_I2C_FIFO_DEPTH)  || id->bus_hold_flag)
 		ctrl_reg |= CDNS_I2C_CR_HOLD;
+	else
+		ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD;
 
 	cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
 
@@ -375,8 +377,11 @@ static void cdns_i2c_msend(struct cdns_i
 	 * Check for the message size against FIFO depth and set the
 	 * 'hold bus' bit if it is greater than FIFO depth.
 	 */
-	if (id->send_count > CDNS_I2C_FIFO_DEPTH)
+	if ((id->send_count > CDNS_I2C_FIFO_DEPTH) || id->bus_hold_flag)
 		ctrl_reg |= CDNS_I2C_CR_HOLD;
+	else
+		ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD;
+
 	cdns_i2c_writereg(ctrl_reg, CDNS_I2C_CR_OFFSET);
 
 	/* Clear the interrupts in interrupt status register. */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/input/keyboard/matrix_keypad.c linux-libre-3.18.137-gnu/drivers/input/keyboard/matrix_keypad.c
--- linux-libre-3.18.136-gnu/drivers/input/keyboard/matrix_keypad.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/input/keyboard/matrix_keypad.c	2019-03-23 03:19:03.000000000 -0400
@@ -220,7 +220,7 @@ static void matrix_keypad_stop(struct in
 	keypad->stopped = true;
 	spin_unlock_irq(&keypad->lock);
 
-	flush_work(&keypad->work.work);
+	flush_delayed_work(&keypad->work);
 	/*
 	 * matrix_keypad_scan() will leave IRQs enabled;
 	 * we should disable them now.
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/input/keyboard/st-keyscan.c linux-libre-3.18.137-gnu/drivers/input/keyboard/st-keyscan.c
--- linux-libre-3.18.136-gnu/drivers/input/keyboard/st-keyscan.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/input/keyboard/st-keyscan.c	2019-03-23 03:19:03.000000000 -0400
@@ -153,6 +153,8 @@ static int keyscan_probe(struct platform
 
 	input_dev->id.bustype = BUS_HOST;
 
+	keypad_data->input_dev = input_dev;
+
 	error = keypad_matrix_key_parse_dt(keypad_data);
 	if (error)
 		return error;
@@ -168,8 +170,6 @@ static int keyscan_probe(struct platform
 
 	input_set_drvdata(input_dev, keypad_data);
 
-	keypad_data->input_dev = input_dev;
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	keypad_data->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(keypad_data->base))
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/input/tablet/wacom_serial4.c linux-libre-3.18.137-gnu/drivers/input/tablet/wacom_serial4.c
--- linux-libre-3.18.136-gnu/drivers/input/tablet/wacom_serial4.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/input/tablet/wacom_serial4.c	2019-03-23 03:19:03.000000000 -0400
@@ -187,6 +187,7 @@ enum {
 	MODEL_DIGITIZER_II	= 0x5544, /* UD */
 	MODEL_GRAPHIRE		= 0x4554, /* ET */
 	MODEL_PENPARTNER	= 0x4354, /* CT */
+	MODEL_ARTPAD_II		= 0x4B54, /* KT */
 };
 
 static void wacom_handle_model_response(struct wacom *wacom)
@@ -245,6 +246,7 @@ static void wacom_handle_model_response(
 		wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
 		break;
 
+	case MODEL_ARTPAD_II:
 	case MODEL_DIGITIZER_II:
 		wacom->dev->name = "Wacom Digitizer II";
 		wacom->dev->id.version = MODEL_DIGITIZER_II;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/iommu/amd_iommu.c linux-libre-3.18.137-gnu/drivers/iommu/amd_iommu.c
--- linux-libre-3.18.136-gnu/drivers/iommu/amd_iommu.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/iommu/amd_iommu.c	2019-03-23 03:19:03.000000000 -0400
@@ -2132,14 +2132,11 @@ static void do_attach(struct iommu_dev_d
 
 static void do_detach(struct iommu_dev_data *dev_data)
 {
+	struct protection_domain *domain = dev_data->domain;
 	struct amd_iommu *iommu;
 
 	iommu = amd_iommu_rlookup_table[dev_data->devid];
 
-	/* decrease reference counters */
-	dev_data->domain->dev_iommu[iommu->index] -= 1;
-	dev_data->domain->dev_cnt                 -= 1;
-
 	/* Update data structures */
 	dev_data->domain = NULL;
 	list_del(&dev_data->list);
@@ -2147,6 +2144,16 @@ static void do_detach(struct iommu_dev_d
 
 	/* Flush the DTE entry */
 	device_flush_dte(dev_data);
+
+	/* Flush IOTLB */
+	domain_flush_tlb_pde(domain);
+
+	/* Wait for the flushes to finish */
+	domain_flush_complete(domain);
+
+	/* decrease reference counters - needs to happen after the flushes */
+	domain->dev_iommu[iommu->index] -= 1;
+	domain->dev_cnt                 -= 1;
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/irqchip/irq-mmp.c linux-libre-3.18.137-gnu/drivers/irqchip/irq-mmp.c
--- linux-libre-3.18.136-gnu/drivers/irqchip/irq-mmp.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/irqchip/irq-mmp.c	2019-03-23 03:19:03.000000000 -0400
@@ -35,6 +35,9 @@
 #define SEL_INT_PENDING		(1 << 6)
 #define SEL_INT_NUM_MASK	0x3f
 
+#define MMP2_ICU_INT_ROUTE_PJ4_IRQ	(1 << 5)
+#define MMP2_ICU_INT_ROUTE_PJ4_FIQ	(1 << 6)
+
 struct icu_chip_data {
 	int			nr_irqs;
 	unsigned int		virq_base;
@@ -191,7 +194,8 @@ static struct mmp_intc_conf mmp_conf = {
 static struct mmp_intc_conf mmp2_conf = {
 	.conf_enable	= 0x20,
 	.conf_disable	= 0x0,
-	.conf_mask	= 0x7f,
+	.conf_mask	= MMP2_ICU_INT_ROUTE_PJ4_IRQ |
+			  MMP2_ICU_INT_ROUTE_PJ4_FIQ,
 };
 
 static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/isdn/hardware/avm/b1.c linux-libre-3.18.137-gnu/drivers/isdn/hardware/avm/b1.c
--- linux-libre-3.18.136-gnu/drivers/isdn/hardware/avm/b1.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/isdn/hardware/avm/b1.c	2019-03-23 03:19:03.000000000 -0400
@@ -423,7 +423,7 @@ void b1_parse_version(avmctrl_info *cinf
 	int i, j;
 
 	for (j = 0; j < AVM_MAXVERSION; j++)
-		cinfo->version[j] = "\0\0" + 1;
+		cinfo->version[j] = "";
 	for (i = 0, j = 0;
 	     j < AVM_MAXVERSION && i < cinfo->versionlen;
 	     j++, i += cinfo->versionbuf[i] + 1)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/isdn/i4l/isdn_tty.c linux-libre-3.18.137-gnu/drivers/isdn/i4l/isdn_tty.c
--- linux-libre-3.18.136-gnu/drivers/isdn/i4l/isdn_tty.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/isdn/i4l/isdn_tty.c	2019-03-23 03:19:03.000000000 -0400
@@ -1459,15 +1459,19 @@ isdn_tty_set_termios(struct tty_struct *
 {
 	modem_info *info = (modem_info *) tty->driver_data;
 
+	mutex_lock(&modem_info_mutex);
 	if (!old_termios)
 		isdn_tty_change_speed(info);
 	else {
 		if (tty->termios.c_cflag == old_termios->c_cflag &&
 		    tty->termios.c_ispeed == old_termios->c_ispeed &&
-		    tty->termios.c_ospeed == old_termios->c_ospeed)
+		    tty->termios.c_ospeed == old_termios->c_ospeed) {
+			mutex_unlock(&modem_info_mutex);
 			return;
+		}
 		isdn_tty_change_speed(info);
 	}
+	mutex_unlock(&modem_info_mutex);
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/leds/leds-lp5523.c linux-libre-3.18.137-gnu/drivers/leds/leds-lp5523.c
--- linux-libre-3.18.136-gnu/drivers/leds/leds-lp5523.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/leds/leds-lp5523.c	2019-03-23 03:19:03.000000000 -0400
@@ -313,7 +313,9 @@ static int lp5523_init_program_engine(st
 
 	/* Let the programs run for couple of ms and check the engine status */
 	usleep_range(3000, 6000);
-	lp55xx_read(chip, LP5523_REG_STATUS, &status);
+	ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
+	if (ret)
+		return ret;
 	status &= LP5523_ENG_STATUS_MASK;
 
 	if (status != LP5523_ENG_STATUS_MASK) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/md/raid10.c linux-libre-3.18.137-gnu/drivers/md/raid10.c
--- linux-libre-3.18.136-gnu/drivers/md/raid10.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/md/raid10.c	2019-03-23 03:19:03.000000000 -0400
@@ -3836,6 +3836,8 @@ static int run(struct mddev *mddev)
 		set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
 		mddev->sync_thread = md_register_thread(md_do_sync, mddev,
 							"reshape");
+		if (!mddev->sync_thread)
+			goto out_free_conf;
 	}
 
 	return 0;
@@ -4528,7 +4530,6 @@ bio_full:
 	atomic_inc(&r10_bio->remaining);
 	read_bio->bi_next = NULL;
 	generic_make_request(read_bio);
-	sector_nr += nr_sectors;
 	sectors_done += nr_sectors;
 	if (sector_nr <= last)
 		goto read_more;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/md/raid5.c linux-libre-3.18.137-gnu/drivers/md/raid5.c
--- linux-libre-3.18.136-gnu/drivers/md/raid5.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/md/raid5.c	2019-03-23 03:19:03.000000000 -0400
@@ -6171,6 +6171,8 @@ static int run(struct mddev *mddev)
 		set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
 		mddev->sync_thread = md_register_thread(md_do_sync, mddev,
 							"reshape");
+		if (!mddev->sync_thread)
+			goto abort;
 	}
 
 	/* Ok, everything is just fine now */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/media/usb/uvc/uvc_driver.c linux-libre-3.18.137-gnu/drivers/media/usb/uvc/uvc_driver.c
--- linux-libre-3.18.136-gnu/drivers/media/usb/uvc/uvc_driver.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/media/usb/uvc/uvc_driver.c	2019-03-23 03:19:03.000000000 -0400
@@ -977,11 +977,19 @@ static int uvc_parse_standard_control(st
 			return -EINVAL;
 		}
 
-		/* Make sure the terminal type MSB is not null, otherwise it
-		 * could be confused with a unit.
+		/*
+		 * Reject invalid terminal types that would cause issues:
+		 *
+		 * - The high byte must be non-zero, otherwise it would be
+		 *   confused with a unit.
+		 *
+		 * - Bit 15 must be 0, as we use it internally as a terminal
+		 *   direction flag.
+		 *
+		 * Other unknown types are accepted.
 		 */
 		type = get_unaligned_le16(&buffer[4]);
-		if ((type & 0xff00) == 0) {
+		if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
 			uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
 				"interface %d INPUT_TERMINAL %d has invalid "
 				"type 0x%04x, skipping\n", udev->devnum,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/media/usb/uvc/uvc_video.c linux-libre-3.18.137-gnu/drivers/media/usb/uvc/uvc_video.c
--- linux-libre-3.18.136-gnu/drivers/media/usb/uvc/uvc_video.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/media/usb/uvc/uvc_video.c	2019-03-23 03:19:03.000000000 -0400
@@ -627,6 +627,14 @@ void uvc_video_clock_update(struct uvc_s
 	u32 rem;
 	u64 y;
 
+	/*
+	 * We will get called from __vb2_queue_cancel() if there are buffers
+	 * done but not dequeued by the user, but the sample array has already
+	 * been released at that time. Just bail out in that case.
+	 */
+	if (!clock->samples)
+		return;
+
 	spin_lock_irqsave(&clock->lock, flags);
 
 	if (clock->count < clock->size)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/ab8500-core.c linux-libre-3.18.137-gnu/drivers/mfd/ab8500-core.c
--- linux-libre-3.18.136-gnu/drivers/mfd/ab8500-core.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/ab8500-core.c	2019-03-23 03:19:03.000000000 -0400
@@ -259,7 +259,7 @@ static int get_register_interruptible(st
 	mutex_unlock(&ab8500->lock);
 	dev_vdbg(ab8500->dev, "rd: addr %#x => data %#x\n", addr, ret);
 
-	return ret;
+	return (ret < 0) ? ret : 0;
 }
 
 static int ab8500_get_register(struct device *dev, u8 bank,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/db8500-prcmu.c linux-libre-3.18.137-gnu/drivers/mfd/db8500-prcmu.c
--- linux-libre-3.18.136-gnu/drivers/mfd/db8500-prcmu.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/db8500-prcmu.c	2019-03-23 03:19:03.000000000 -0400
@@ -2616,7 +2616,7 @@ static struct irq_chip prcmu_irq_chip =
 	.irq_unmask	= prcmu_irq_unmask,
 };
 
-static __init char *fw_project_name(u32 project)
+static char *fw_project_name(u32 project)
 {
 	switch (project) {
 	case PRCMU_FW_PROJECT_U8500:
@@ -2765,7 +2765,7 @@ void __init db8500_prcmu_early_init(u32
 	INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
 }
 
-static void __init init_prcm_registers(void)
+static void init_prcm_registers(void)
 {
 	u32 val;
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/mc13xxx-core.c linux-libre-3.18.137-gnu/drivers/mfd/mc13xxx-core.c
--- linux-libre-3.18.136-gnu/drivers/mfd/mc13xxx-core.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/mc13xxx-core.c	2019-03-23 03:19:03.000000000 -0400
@@ -274,7 +274,9 @@ int mc13xxx_adc_do_conversion(struct mc1
 
 	mc13xxx->adcflags |= MC13XXX_ADC_WORKING;
 
-	mc13xxx_reg_read(mc13xxx, MC13XXX_ADC0, &old_adc0);
+	ret = mc13xxx_reg_read(mc13xxx, MC13XXX_ADC0, &old_adc0);
+	if (ret)
+		goto out;
 
 	adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2;
 	adc1 = MC13XXX_ADC1_ADEN | MC13XXX_ADC1_ADTRIGIGN | MC13XXX_ADC1_ASC;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/ti_am335x_tscadc.c linux-libre-3.18.137-gnu/drivers/mfd/ti_am335x_tscadc.c
--- linux-libre-3.18.136-gnu/drivers/mfd/ti_am335x_tscadc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/ti_am335x_tscadc.c	2019-03-23 03:19:03.000000000 -0400
@@ -282,8 +282,9 @@ static	int ti_tscadc_probe(struct platfo
 		cell->pdata_size = sizeof(tscadc);
 	}
 
-	err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells,
-			tscadc->used_cells, NULL, 0, NULL);
+	err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
+			      tscadc->cells, tscadc->used_cells, NULL,
+			      0, NULL);
 	if (err < 0)
 		goto err_disable_clk;
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/twl-core.c linux-libre-3.18.137-gnu/drivers/mfd/twl-core.c
--- linux-libre-3.18.136-gnu/drivers/mfd/twl-core.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/twl-core.c	2019-03-23 03:19:03.000000000 -0400
@@ -983,7 +983,7 @@ add_children(struct twl4030_platform_dat
  * letting it generate the right frequencies for USB, MADC, and
  * other purposes.
  */
-static inline int __init protect_pm_master(void)
+static inline int protect_pm_master(void)
 {
 	int e = 0;
 
@@ -992,7 +992,7 @@ static inline int __init protect_pm_mast
 	return e;
 }
 
-static inline int __init unprotect_pm_master(void)
+static inline int unprotect_pm_master(void)
 {
 	int e = 0;
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mfd/wm5110-tables.c linux-libre-3.18.137-gnu/drivers/mfd/wm5110-tables.c
--- linux-libre-3.18.136-gnu/drivers/mfd/wm5110-tables.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mfd/wm5110-tables.c	2019-03-23 03:19:03.000000000 -0400
@@ -1617,6 +1617,7 @@ static const struct reg_default wm5110_r
 	{ 0x00000ECD, 0x0000 },    /* R3789  - HPLPF4_2 */
 	{ 0x00000EE0, 0x0000 },    /* R3808  - ASRC_ENABLE */
 	{ 0x00000EE2, 0x0000 },    /* R3810  - ASRC_RATE1 */
+	{ 0x00000EE3, 0x4000 },    /* R3811  - ASRC_RATE2 */
 	{ 0x00000EF0, 0x0000 },    /* R3824  - ISRC 1 CTRL 1 */
 	{ 0x00000EF1, 0x0000 },    /* R3825  - ISRC 1 CTRL 2 */
 	{ 0x00000EF2, 0x0000 },    /* R3826  - ISRC 1 CTRL 3 */
@@ -2684,6 +2685,7 @@ static bool wm5110_readable_register(str
 	case ARIZONA_ASRC_ENABLE:
 	case ARIZONA_ASRC_STATUS:
 	case ARIZONA_ASRC_RATE1:
+	case ARIZONA_ASRC_RATE2:
 	case ARIZONA_ISRC_1_CTRL_1:
 	case ARIZONA_ISRC_1_CTRL_2:
 	case ARIZONA_ISRC_1_CTRL_3:
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/mmc/host/mmc_spi.c linux-libre-3.18.137-gnu/drivers/mmc/host/mmc_spi.c
--- linux-libre-3.18.136-gnu/drivers/mmc/host/mmc_spi.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/mmc/host/mmc_spi.c	2019-03-23 03:19:03.000000000 -0400
@@ -1451,6 +1451,7 @@ static int mmc_spi_probe(struct spi_devi
 		if (status != 0)
 			goto fail_add_host;
 	}
+	mmc_detect_change(mmc, 0);
 
 	dev_info(&spi->dev, "SD/MMC host %s%s%s%s%s\n",
 			dev_name(&mmc->class_dev),
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/altera/altera_msgdma.c linux-libre-3.18.137-gnu/drivers/net/ethernet/altera/altera_msgdma.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/altera/altera_msgdma.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/altera/altera_msgdma.c	2019-03-23 03:19:03.000000000 -0400
@@ -145,7 +145,8 @@ u32 msgdma_tx_completions(struct altera_
 			& 0xffff;
 
 	if (inuse) { /* Tx FIFO is not empty */
-		ready = priv->tx_prod - priv->tx_cons - inuse - 1;
+		ready = max_t(int,
+			      priv->tx_prod - priv->tx_cons - inuse - 1, 0);
 	} else {
 		/* Check for buffered last packet */
 		status = csrrd32(priv->tx_dma_csr, msgdma_csroffs(status));
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/altera/altera_tse_main.c linux-libre-3.18.137-gnu/drivers/net/ethernet/altera/altera_tse_main.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/altera/altera_tse_main.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/altera/altera_tse_main.c	2019-03-23 03:19:03.000000000 -0400
@@ -706,8 +706,10 @@ static struct phy_device *connect_local_
 
 		phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link,
 				     priv->phy_iface);
-		if (IS_ERR(phydev))
+		if (IS_ERR(phydev)) {
 			netdev_err(dev, "Could not attach to PHY\n");
+			phydev = NULL;
+		}
 
 	} else {
 		int ret;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/atheros/atlx/atl2.c linux-libre-3.18.137-gnu/drivers/net/ethernet/atheros/atlx/atl2.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/atheros/atlx/atl2.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/atheros/atlx/atl2.c	2019-03-23 03:19:03.000000000 -0400
@@ -1338,13 +1338,11 @@ static int atl2_probe(struct pci_dev *pd
 {
 	struct net_device *netdev;
 	struct atl2_adapter *adapter;
-	static int cards_found;
+	static int cards_found = 0;
 	unsigned long mmio_start;
 	int mmio_len;
 	int err;
 
-	cards_found = 0;
-
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/broadcom/bcmsysport.c linux-libre-3.18.137-gnu/drivers/net/ethernet/broadcom/bcmsysport.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/broadcom/bcmsysport.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/broadcom/bcmsysport.c	2019-03-23 03:19:03.000000000 -0400
@@ -126,6 +126,10 @@ static int bcm_sysport_set_rx_csum(struc
 
 	priv->rx_chk_en = !!(wanted & NETIF_F_RXCSUM);
 	reg = rxchk_readl(priv, RXCHK_CONTROL);
+	/* Clear L2 header checks, which would prevent BPDUs
+	 * from being received.
+	 */
+	reg &= ~RXCHK_L2_HDR_DIS;
 	if (priv->rx_chk_en)
 		reg |= RXCHK_EN;
 	else
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/ibm/ibmveth.c linux-libre-3.18.137-gnu/drivers/net/ethernet/ibm/ibmveth.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/ibm/ibmveth.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/ibm/ibmveth.c	2019-03-23 03:19:03.000000000 -0400
@@ -1085,7 +1085,6 @@ static int ibmveth_poll(struct napi_stru
 	int frames_processed = 0;
 	unsigned long lpar_rc;
 
-restart_poll:
 	while (frames_processed < budget) {
 		if (!ibmveth_rxq_pending_buffer(adapter))
 			break;
@@ -1154,7 +1153,6 @@ restart_poll:
 		    napi_reschedule(napi)) {
 			lpar_rc = h_vio_signal(adapter->vdev->unit_address,
 					       VIO_IRQ_DISABLE);
-			goto restart_poll;
 		}
 	}
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/marvell/mv643xx_eth.c linux-libre-3.18.137-gnu/drivers/net/ethernet/marvell/mv643xx_eth.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/marvell/mv643xx_eth.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/marvell/mv643xx_eth.c	2019-03-23 03:19:03.000000000 -0400
@@ -2814,7 +2814,7 @@ static int mv643xx_eth_shared_probe(stru
 
 	ret = mv643xx_eth_shared_of_probe(pdev);
 	if (ret)
-		return ret;
+		goto err_put_clk;
 	pd = dev_get_platdata(&pdev->dev);
 
 	msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
@@ -2822,6 +2822,11 @@ static int mv643xx_eth_shared_probe(stru
 	infer_hw_params(msp);
 
 	return 0;
+
+err_put_clk:
+	if (!IS_ERR(msp->clk))
+		clk_disable_unprepare(msp->clk);
+	return ret;
 }
 
 static int mv643xx_eth_shared_remove(struct platform_device *pdev)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/marvell/sky2.c linux-libre-3.18.137-gnu/drivers/net/ethernet/marvell/sky2.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/marvell/sky2.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/marvell/sky2.c	2019-03-23 03:19:03.000000000 -0400
@@ -46,6 +46,7 @@
 #include <linux/mii.h>
 #include <linux/of_device.h>
 #include <linux/of_net.h>
+#include <linux/dmi.h>
 
 #include <asm/irq.h>
 
@@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128
 module_param(copybreak, int, 0);
 MODULE_PARM_DESC(copybreak, "Receive copy threshold");
 
-static int disable_msi = 0;
+static int disable_msi = -1;
 module_param(disable_msi, int, 0);
 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
 
@@ -4913,6 +4914,24 @@ static const char *sky2_name(u8 chipid,
 	return buf;
 }
 
+static const struct dmi_system_id msi_blacklist[] = {
+	{
+		.ident = "Dell Inspiron 1545",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"),
+		},
+	},
+	{
+		.ident = "Gateway P-79",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Gateway"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "P-79"),
+		},
+	},
+	{}
+};
+
 static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct net_device *dev, *dev1;
@@ -5024,6 +5043,9 @@ static int sky2_probe(struct pci_dev *pd
 		goto err_out_free_pci;
 	}
 
+	if (disable_msi == -1)
+		disable_msi = !!dmi_check_system(msi_blacklist);
+
 	if (!disable_msi && pci_enable_msi(pdev) == 0) {
 		err = sky2_test_msi(hw);
 		if (err) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c linux-libre-3.18.137-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
--- linux-libre-3.18.136-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c	2019-03-23 03:19:03.000000000 -0400
@@ -2474,13 +2474,13 @@ static int qp_get_mtt_size(struct mlx4_q
 	int total_pages;
 	int total_mem;
 	int page_offset = (be32_to_cpu(qpc->params2) >> 6) & 0x3f;
+	int tot;
 
 	sq_size = 1 << (log_sq_size + log_sq_sride + 4);
 	rq_size = (srq|rss|xrc) ? 0 : (1 << (log_rq_size + log_rq_stride + 4));
 	total_mem = sq_size + rq_size;
-	total_pages =
-		roundup_pow_of_two((total_mem + (page_offset << 6)) >>
-				   page_shift);
+	tot = (total_mem + (page_offset << 6)) >> page_shift;
+	total_pages = !tot ? 1 : roundup_pow_of_two(tot);
 
 	return total_pages;
 }
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/phy/mdio_bus.c linux-libre-3.18.137-gnu/drivers/net/phy/mdio_bus.c
--- linux-libre-3.18.136-gnu/drivers/net/phy/mdio_bus.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/phy/mdio_bus.c	2019-03-23 03:19:03.000000000 -0400
@@ -261,7 +261,6 @@ int mdiobus_register(struct mii_bus *bus
 	err = device_register(&bus->dev);
 	if (err) {
 		pr_err("mii_bus %s failed to register\n", bus->id);
-		put_device(&bus->dev);
 		return -EINVAL;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/phy/micrel.c linux-libre-3.18.137-gnu/drivers/net/phy/micrel.c
--- linux-libre-3.18.136-gnu/drivers/net/phy/micrel.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/phy/micrel.c	2019-03-23 03:19:03.000000000 -0400
@@ -27,6 +27,7 @@
 #include <linux/micrel_phy.h>
 #include <linux/of.h>
 #include <linux/clk.h>
+#include <uapi/linux/mdio.h>
 
 /* Operation Mode Strap Override */
 #define MII_KSZPHY_OMSO				0x16
@@ -217,6 +218,17 @@ static int ks8051_config_init(struct phy
 	return rc < 0 ? rc : 0;
 }
 
+static int ksz8061_config_init(struct phy_device *phydev)
+{
+	int ret;
+
+	ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_DEVID1, 0xB61A);
+	if (ret)
+		return ret;
+
+	return kszphy_config_init(phydev);
+}
+
 static int ksz9021_load_values_from_of(struct phy_device *phydev,
 				       struct device_node *of_node, u16 reg,
 				       char *field1, char *field2,
@@ -593,7 +605,7 @@ static struct phy_driver ksphy_driver[]
 	.phy_id_mask	= 0x00fffff0,
 	.features	= (PHY_BASIC_FEATURES | SUPPORTED_Pause),
 	.flags		= PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
-	.config_init	= kszphy_config_init,
+	.config_init	= ksz8061_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/ppp/pptp.c linux-libre-3.18.137-gnu/drivers/net/ppp/pptp.c
--- linux-libre-3.18.136-gnu/drivers/net/ppp/pptp.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/ppp/pptp.c	2019-03-23 03:19:03.000000000 -0400
@@ -564,6 +564,7 @@ static void pptp_sock_destruct(struct so
 		pppox_unbind_sock(sk);
 	}
 	skb_queue_purge(&sk->sk_receive_queue);
+	dst_release(rcu_dereference_protected(sk->sk_dst_cache, 1));
 }
 
 static int pptp_create(struct net *net, struct socket *sock)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/team/team.c linux-libre-3.18.137-gnu/drivers/net/team/team.c
--- linux-libre-3.18.136-gnu/drivers/net/team/team.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/team/team.c	2019-03-23 03:19:03.000000000 -0400
@@ -253,17 +253,6 @@ static void __team_option_inst_mark_remo
 	}
 }
 
-static bool __team_option_inst_tmp_find(const struct list_head *opts,
-					const struct team_option_inst *needle)
-{
-	struct team_option_inst *opt_inst;
-
-	list_for_each_entry(opt_inst, opts, tmp_list)
-		if (opt_inst == needle)
-			return true;
-	return false;
-}
-
 static int __team_options_register(struct team *team,
 				   const struct team_option *option,
 				   size_t option_count)
@@ -2435,7 +2424,6 @@ static int team_nl_cmd_options_set(struc
 	int err = 0;
 	int i;
 	struct nlattr *nl_option;
-	LIST_HEAD(opt_inst_list);
 
 	team = team_nl_team_get(info);
 	if (!team)
@@ -2451,6 +2439,7 @@ static int team_nl_cmd_options_set(struc
 		struct nlattr *opt_attrs[TEAM_ATTR_OPTION_MAX + 1];
 		struct nlattr *attr;
 		struct nlattr *attr_data;
+		LIST_HEAD(opt_inst_list);
 		enum team_option_type opt_type;
 		int opt_port_ifindex = 0; /* != 0 for per-port options */
 		u32 opt_array_index = 0;
@@ -2554,23 +2543,17 @@ static int team_nl_cmd_options_set(struc
 			if (err)
 				goto team_put;
 			opt_inst->changed = true;
-
-			/* dumb/evil user-space can send us duplicate opt,
-			 * keep only the last one
-			 */
-			if (__team_option_inst_tmp_find(&opt_inst_list,
-							opt_inst))
-				continue;
-
 			list_add(&opt_inst->tmp_list, &opt_inst_list);
 		}
 		if (!opt_found) {
 			err = -ENOENT;
 			goto team_put;
 		}
-	}
 
-	err = team_nl_send_event_options_get(team, &opt_inst_list);
+		err = team_nl_send_event_options_get(team, &opt_inst_list);
+		if (err)
+			break;
+	}
 
 team_put:
 	team_nl_team_put(team);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/team/team_mode_loadbalance.c linux-libre-3.18.137-gnu/drivers/net/team/team_mode_loadbalance.c
--- linux-libre-3.18.136-gnu/drivers/net/team/team_mode_loadbalance.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/team/team_mode_loadbalance.c	2019-03-23 03:19:03.000000000 -0400
@@ -305,6 +305,20 @@ static int lb_bpf_func_set(struct team *
 	return 0;
 }
 
+static void lb_bpf_func_free(struct team *team)
+{
+	struct lb_priv *lb_priv = get_lb_priv(team);
+	struct bpf_prog *fp;
+
+	if (!lb_priv->ex->orig_fprog)
+		return;
+
+	__fprog_destroy(lb_priv->ex->orig_fprog);
+	fp = rcu_dereference_protected(lb_priv->fp,
+				       lockdep_is_held(&team->lock));
+	bpf_prog_destroy(fp);
+}
+
 static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
 {
 	struct lb_priv *lb_priv = get_lb_priv(team);
@@ -619,6 +633,7 @@ static void lb_exit(struct team *team)
 
 	team_options_unregister(team, lb_options,
 				ARRAY_SIZE(lb_options));
+	lb_bpf_func_free(team);
 	cancel_delayed_work_sync(&lb_priv->ex->stats.refresh_dw);
 	free_percpu(lb_priv->pcpu_stats);
 	kfree(lb_priv->ex);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/net/vxlan.c linux-libre-3.18.137-gnu/drivers/net/vxlan.c
--- linux-libre-3.18.136-gnu/drivers/net/vxlan.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/net/vxlan.c	2019-03-23 03:19:03.000000000 -0400
@@ -1238,6 +1238,14 @@ static void vxlan_rcv(struct vxlan_sock
 		}
 	}
 
+	rcu_read_lock();
+
+	if (unlikely(!(vxlan->dev->flags & IFF_UP))) {
+		rcu_read_unlock();
+		atomic_long_inc(&vxlan->dev->rx_dropped);
+		goto drop;
+	}
+
 	stats = this_cpu_ptr(vxlan->dev->tstats);
 	u64_stats_update_begin(&stats->syncp);
 	stats->rx_packets++;
@@ -1246,6 +1254,8 @@ static void vxlan_rcv(struct vxlan_sock
 
 	netif_rx(skb);
 
+	rcu_read_unlock();
+
 	return;
 drop:
 	/* Consume bad packet */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/parport/parport_pc.c linux-libre-3.18.137-gnu/drivers/parport/parport_pc.c
--- linux-libre-3.18.136-gnu/drivers/parport/parport_pc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/parport/parport_pc.c	2019-03-23 03:19:03.000000000 -0400
@@ -1377,7 +1377,7 @@ static struct superio_struct *find_super
 {
 	int i;
 	for (i = 0; i < NR_SUPERIOS; i++)
-		if (superios[i].io != p->base)
+		if (superios[i].io == p->base)
 			return &superios[i];
 	return NULL;
 }
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/platform/x86/Kconfig linux-libre-3.18.137-gnu/drivers/platform/x86/Kconfig
--- linux-libre-3.18.136-gnu/drivers/platform/x86/Kconfig	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/platform/x86/Kconfig	2019-03-23 03:19:03.000000000 -0400
@@ -806,6 +806,7 @@ config INTEL_OAKTRAIL
 config SAMSUNG_Q10
 	tristate "Samsung Q10 Extras"
 	depends on ACPI
+	depends on BACKLIGHT_LCD_SUPPORT
 	select BACKLIGHT_CLASS_DEVICE
 	---help---
 	  This driver provides support for backlight control on Samsung Q10
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/regulator/s2mpa01.c linux-libre-3.18.137-gnu/drivers/regulator/s2mpa01.c
--- linux-libre-3.18.136-gnu/drivers/regulator/s2mpa01.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/regulator/s2mpa01.c	2019-03-23 03:19:03.000000000 -0400
@@ -303,13 +303,13 @@ static struct regulator_desc regulators[
 	regulator_desc_ldo(2, STEP_50_MV),
 	regulator_desc_ldo(3, STEP_50_MV),
 	regulator_desc_ldo(4, STEP_50_MV),
-	regulator_desc_ldo(5, STEP_50_MV),
+	regulator_desc_ldo(5, STEP_25_MV),
 	regulator_desc_ldo(6, STEP_25_MV),
 	regulator_desc_ldo(7, STEP_50_MV),
 	regulator_desc_ldo(8, STEP_50_MV),
 	regulator_desc_ldo(9, STEP_50_MV),
 	regulator_desc_ldo(10, STEP_50_MV),
-	regulator_desc_ldo(11, STEP_25_MV),
+	regulator_desc_ldo(11, STEP_50_MV),
 	regulator_desc_ldo(12, STEP_50_MV),
 	regulator_desc_ldo(13, STEP_50_MV),
 	regulator_desc_ldo(14, STEP_50_MV),
@@ -320,11 +320,11 @@ static struct regulator_desc regulators[
 	regulator_desc_ldo(19, STEP_50_MV),
 	regulator_desc_ldo(20, STEP_50_MV),
 	regulator_desc_ldo(21, STEP_50_MV),
-	regulator_desc_ldo(22, STEP_25_MV),
-	regulator_desc_ldo(23, STEP_25_MV),
+	regulator_desc_ldo(22, STEP_50_MV),
+	regulator_desc_ldo(23, STEP_50_MV),
 	regulator_desc_ldo(24, STEP_50_MV),
 	regulator_desc_ldo(25, STEP_50_MV),
-	regulator_desc_ldo(26, STEP_50_MV),
+	regulator_desc_ldo(26, STEP_25_MV),
 	regulator_desc_buck1_4(1),
 	regulator_desc_buck1_4(2),
 	regulator_desc_buck1_4(3),
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/regulator/s2mps11.c linux-libre-3.18.137-gnu/drivers/regulator/s2mps11.c
--- linux-libre-3.18.136-gnu/drivers/regulator/s2mps11.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/regulator/s2mps11.c	2019-03-23 03:19:03.000000000 -0400
@@ -369,7 +369,7 @@ static const struct regulator_desc s2mps
 	regulator_desc_s2mps11_ldo(32, STEP_50_MV),
 	regulator_desc_s2mps11_ldo(33, STEP_50_MV),
 	regulator_desc_s2mps11_ldo(34, STEP_50_MV),
-	regulator_desc_s2mps11_ldo(35, STEP_50_MV),
+	regulator_desc_s2mps11_ldo(35, STEP_25_MV),
 	regulator_desc_s2mps11_ldo(36, STEP_50_MV),
 	regulator_desc_s2mps11_ldo(37, STEP_50_MV),
 	regulator_desc_s2mps11_ldo(38, STEP_50_MV),
@@ -379,8 +379,8 @@ static const struct regulator_desc s2mps
 	regulator_desc_s2mps11_buck1_4(4),
 	regulator_desc_s2mps11_buck5,
 	regulator_desc_s2mps11_buck67810(6, MIN_600_MV, STEP_6_25_MV),
-	regulator_desc_s2mps11_buck67810(7, MIN_600_MV, STEP_6_25_MV),
-	regulator_desc_s2mps11_buck67810(8, MIN_600_MV, STEP_6_25_MV),
+	regulator_desc_s2mps11_buck67810(7, MIN_600_MV, STEP_12_5_MV),
+	regulator_desc_s2mps11_buck67810(8, MIN_600_MV, STEP_12_5_MV),
 	regulator_desc_s2mps11_buck9,
 	regulator_desc_s2mps11_buck67810(10, MIN_750_MV, STEP_12_5_MV),
 };
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/s390/block/dasd_eckd.c linux-libre-3.18.137-gnu/drivers/s390/block/dasd_eckd.c
--- linux-libre-3.18.136-gnu/drivers/s390/block/dasd_eckd.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/s390/block/dasd_eckd.c	2019-03-23 03:19:03.000000000 -0400
@@ -3990,6 +3990,14 @@ static int dasd_symm_io(struct dasd_devi
 		usrparm.psf_data &= 0x7fffffffULL;
 		usrparm.rssd_result &= 0x7fffffffULL;
 	}
+	/* at least 2 bytes are accessed and should be allocated */
+	if (usrparm.psf_data_len < 2) {
+		DBF_DEV_EVENT(DBF_WARNING, device,
+			      "Symmetrix ioctl invalid data length %d",
+			      usrparm.psf_data_len);
+		rc = -EINVAL;
+		goto out;
+	}
 	/* alloc I/O data area */
 	psf_data = kzalloc(usrparm.psf_data_len, GFP_KERNEL | GFP_DMA);
 	rssd_result = kzalloc(usrparm.rssd_result_len, GFP_KERNEL | GFP_DMA);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/s390/net/qeth_core_main.c linux-libre-3.18.137-gnu/drivers/s390/net/qeth_core_main.c
--- linux-libre-3.18.136-gnu/drivers/s390/net/qeth_core_main.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/s390/net/qeth_core_main.c	2019-03-23 03:19:03.000000000 -0400
@@ -2423,11 +2423,12 @@ out:
 	return rc;
 }
 
-static void qeth_free_qdio_out_buf(struct qeth_qdio_out_q *q)
+static void qeth_free_output_queue(struct qeth_qdio_out_q *q)
 {
 	if (!q)
 		return;
 
+	qeth_clear_outq_buffers(q, 1);
 	qdio_free_buffers(q->qdio_bufs, QDIO_MAX_BUFFERS_PER_Q);
 	kfree(q);
 }
@@ -2500,10 +2501,8 @@ out_freeoutqbufs:
 		card->qdio.out_qs[i]->bufs[j] = NULL;
 	}
 out_freeoutq:
-	while (i > 0) {
-		qeth_free_qdio_out_buf(card->qdio.out_qs[--i]);
-		qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
-	}
+	while (i > 0)
+		qeth_free_output_queue(card->qdio.out_qs[--i]);
 	kfree(card->qdio.out_qs);
 	card->qdio.out_qs = NULL;
 out_freepool:
@@ -2536,10 +2535,8 @@ static void qeth_free_qdio_buffers(struc
 	qeth_free_buffer_pool(card);
 	/* free outbound qdio_qs */
 	if (card->qdio.out_qs) {
-		for (i = 0; i < card->qdio.no_out_queues; ++i) {
-			qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
-			qeth_free_qdio_out_buf(card->qdio.out_qs[i]);
-		}
+		for (i = 0; i < card->qdio.no_out_queues; i++)
+			qeth_free_output_queue(card->qdio.out_qs[i]);
 		kfree(card->qdio.out_qs);
 		card->qdio.out_qs = NULL;
 	}
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/csiostor/csio_attr.c linux-libre-3.18.137-gnu/drivers/scsi/csiostor/csio_attr.c
--- linux-libre-3.18.136-gnu/drivers/scsi/csiostor/csio_attr.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/csiostor/csio_attr.c	2019-03-23 03:19:03.000000000 -0400
@@ -582,12 +582,12 @@ csio_vport_create(struct fc_vport *fc_vp
 	}
 
 	fc_vport_set_state(fc_vport, FC_VPORT_INITIALIZING);
+	ln->fc_vport = fc_vport;
 
 	if (csio_fcoe_alloc_vnp(hw, ln))
 		goto error;
 
 	*(struct csio_lnode **)fc_vport->dd_data = ln;
-	ln->fc_vport = fc_vport;
 	if (!fc_vport->node_name)
 		fc_vport->node_name = wwn_to_u64(csio_ln_wwnn(ln));
 	if (!fc_vport->port_name)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/isci/init.c linux-libre-3.18.137-gnu/drivers/scsi/isci/init.c
--- linux-libre-3.18.136-gnu/drivers/scsi/isci/init.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/isci/init.c	2019-03-23 03:19:03.000000000 -0400
@@ -598,6 +598,13 @@ static struct isci_host *isci_host_alloc
 	shost->max_lun = ~0;
 	shost->max_cmd_len = MAX_COMMAND_SIZE;
 
+	/* turn on DIF support */
+	scsi_host_set_prot(shost,
+			   SHOST_DIF_TYPE1_PROTECTION |
+			   SHOST_DIF_TYPE2_PROTECTION |
+			   SHOST_DIF_TYPE3_PROTECTION);
+	scsi_host_set_guard(shost, SHOST_DIX_GUARD_CRC);
+
 	err = scsi_add_host(shost, &pdev->dev);
 	if (err)
 		goto err_shost;
@@ -685,13 +692,6 @@ static int isci_pci_probe(struct pci_dev
 			goto err_host_alloc;
 		}
 		pci_info->hosts[i] = h;
-
-		/* turn on DIF support */
-		scsi_host_set_prot(to_shost(h),
-				   SHOST_DIF_TYPE1_PROTECTION |
-				   SHOST_DIF_TYPE2_PROTECTION |
-				   SHOST_DIF_TYPE3_PROTECTION);
-		scsi_host_set_guard(to_shost(h), SHOST_DIX_GUARD_CRC);
 	}
 
 	err = isci_setup_interrupts(pdev);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/libfc/fc_lport.c linux-libre-3.18.137-gnu/drivers/scsi/libfc/fc_lport.c
--- linux-libre-3.18.136-gnu/drivers/scsi/libfc/fc_lport.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/libfc/fc_lport.c	2019-03-23 03:19:03.000000000 -0400
@@ -1739,14 +1739,14 @@ void fc_lport_flogi_resp(struct fc_seq *
 	    fc_frame_payload_op(fp) != ELS_LS_ACC) {
 		FC_LPORT_DBG(lport, "FLOGI not accepted or bad response\n");
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	flp = fc_frame_payload_get(fp, sizeof(*flp));
 	if (!flp) {
 		FC_LPORT_DBG(lport, "FLOGI bad response\n");
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	mfs = ntohs(flp->fl_csp.sp_bb_data) &
@@ -1756,7 +1756,7 @@ void fc_lport_flogi_resp(struct fc_seq *
 		FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, "
 			     "lport->mfs:%hu\n", mfs, lport->mfs);
 		fc_lport_error(lport, fp);
-		goto err;
+		goto out;
 	}
 
 	if (mfs <= lport->mfs) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/libiscsi.c linux-libre-3.18.137-gnu/drivers/scsi/libiscsi.c
--- linux-libre-3.18.136-gnu/drivers/scsi/libiscsi.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/libiscsi.c	2019-03-23 03:19:03.000000000 -0400
@@ -1448,7 +1448,13 @@ static int iscsi_xmit_task(struct iscsi_
 	if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx))
 		return -ENODATA;
 
+	spin_lock_bh(&conn->session->back_lock);
+	if (conn->task == NULL) {
+		spin_unlock_bh(&conn->session->back_lock);
+		return -ENODATA;
+	}
 	__iscsi_get_task(task);
+	spin_unlock_bh(&conn->session->back_lock);
 	spin_unlock_bh(&conn->session->frwd_lock);
 	rc = conn->session->tt->xmit_task(task);
 	spin_lock_bh(&conn->session->frwd_lock);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/libsas/sas_expander.c linux-libre-3.18.137-gnu/drivers/scsi/libsas/sas_expander.c
--- linux-libre-3.18.136-gnu/drivers/scsi/libsas/sas_expander.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/libsas/sas_expander.c	2019-03-23 03:19:03.000000000 -0400
@@ -818,6 +818,7 @@ static struct domain_device *sas_ex_disc
 		rphy = sas_end_device_alloc(phy->port);
 		if (!rphy)
 			goto out_free;
+		rphy->identify.phy_identifier = phy_id;
 
 		child->rphy = rphy;
 		get_device(&rphy->dev);
@@ -845,6 +846,7 @@ static struct domain_device *sas_ex_disc
 
 		child->rphy = rphy;
 		get_device(&rphy->dev);
+		rphy->identify.phy_identifier = phy_id;
 		sas_fill_in_rphy(child, rphy);
 
 		list_add_tail(&child->disco_list_node, &parent->port->disco_list);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/qla4xxx/ql4_os.c linux-libre-3.18.137-gnu/drivers/scsi/qla4xxx/ql4_os.c
--- linux-libre-3.18.136-gnu/drivers/scsi/qla4xxx/ql4_os.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/qla4xxx/ql4_os.c	2019-03-23 03:19:03.000000000 -0400
@@ -7251,6 +7251,8 @@ static int qla4xxx_sysfs_ddb_tgt_create(
 
 	rc = qla4xxx_copy_from_fwddb_param(fnode_sess, fnode_conn,
 					   fw_ddb_entry);
+	if (rc)
+		goto free_sess;
 
 	ql4_printk(KERN_INFO, ha, "%s: sysfs entry %s created\n",
 		   __func__, fnode_sess->dev.kobj.name);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/scsi/virtio_scsi.c linux-libre-3.18.137-gnu/drivers/scsi/virtio_scsi.c
--- linux-libre-3.18.136-gnu/drivers/scsi/virtio_scsi.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/scsi/virtio_scsi.c	2019-03-23 03:19:03.000000000 -0400
@@ -653,7 +653,6 @@ static int virtscsi_device_reset(struct
 		return FAILED;
 
 	memset(cmd, 0, sizeof(*cmd));
-	cmd->sc = sc;
 	cmd->req.tmf = (struct virtio_scsi_ctrl_tmf_req){
 		.type = VIRTIO_SCSI_T_TMF,
 		.subtype = VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET,
@@ -728,7 +727,6 @@ static int virtscsi_abort(struct scsi_cm
 		return FAILED;
 
 	memset(cmd, 0, sizeof(*cmd));
-	cmd->sc = sc;
 	cmd->req.tmf = (struct virtio_scsi_ctrl_tmf_req){
 		.type = VIRTIO_SCSI_T_TMF,
 		.subtype = VIRTIO_SCSI_T_TMF_ABORT_TASK,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/target/iscsi/iscsi_target.c linux-libre-3.18.137-gnu/drivers/target/iscsi/iscsi_target.c
--- linux-libre-3.18.136-gnu/drivers/target/iscsi/iscsi_target.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/target/iscsi/iscsi_target.c	2019-03-23 03:19:03.000000000 -0400
@@ -4198,9 +4198,9 @@ static void iscsit_release_commands_from
 		struct se_cmd *se_cmd = &cmd->se_cmd;
 
 		if (se_cmd->se_tfo != NULL) {
-			spin_lock(&se_cmd->t_state_lock);
+			spin_lock_irq(&se_cmd->t_state_lock);
 			se_cmd->transport_state |= CMD_T_FABRIC_STOP;
-			spin_unlock(&se_cmd->t_state_lock);
+			spin_unlock_irq(&se_cmd->t_state_lock);
 		}
 	}
 	spin_unlock_bh(&conn->cmd_lock);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/tty/serial/fsl_lpuart.c linux-libre-3.18.137-gnu/drivers/tty/serial/fsl_lpuart.c
--- linux-libre-3.18.136-gnu/drivers/tty/serial/fsl_lpuart.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/tty/serial/fsl_lpuart.c	2019-03-23 03:19:03.000000000 -0400
@@ -1426,7 +1426,7 @@ lpuart32_set_termios(struct uart_port *p
 	}
 
 	/* ask the core to calculate the divisor */
-	baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16);
+	baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 4);
 
 	spin_lock_irqsave(&sport->port.lock, flags);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/usb/dwc3/gadget.c linux-libre-3.18.137-gnu/drivers/usb/dwc3/gadget.c
--- linux-libre-3.18.136-gnu/drivers/usb/dwc3/gadget.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/usb/dwc3/gadget.c	2019-03-23 03:19:03.000000000 -0400
@@ -1641,6 +1641,7 @@ static int dwc3_gadget_start(struct usb_
 
 	/* begin to receive SETUP packets */
 	dwc->ep0state = EP0_SETUP_PHASE;
+	dwc->link_state = DWC3_LINK_STATE_SS_DIS;
 	dwc3_ep0_out_start(dwc);
 
 	dwc3_gadget_enable_irq(dwc);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/usb/gadget/function/f_sourcesink.c linux-libre-3.18.137-gnu/drivers/usb/gadget/function/f_sourcesink.c
--- linux-libre-3.18.136-gnu/drivers/usb/gadget/function/f_sourcesink.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/usb/gadget/function/f_sourcesink.c	2019-03-23 03:19:03.000000000 -0400
@@ -1149,7 +1149,7 @@ static struct usb_function *source_sink_
 
 	ss = kzalloc(sizeof(*ss), GFP_KERNEL);
 	if (!ss)
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 
 	ss_opts =  container_of(fi, struct f_ss_opts, func_inst);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/drivers/usb/serial/cp210x.c linux-libre-3.18.137-gnu/drivers/usb/serial/cp210x.c
--- linux-libre-3.18.136-gnu/drivers/usb/serial/cp210x.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/drivers/usb/serial/cp210x.c	2019-03-23 03:19:03.000000000 -0400
@@ -57,6 +57,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
 	{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
 	{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
+	{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
 	{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
 	{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
 	{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/autofs4/expire.c linux-libre-3.18.137-gnu/fs/autofs4/expire.c
--- linux-libre-3.18.136-gnu/fs/autofs4/expire.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/autofs4/expire.c	2019-03-23 03:19:03.000000000 -0400
@@ -570,7 +570,6 @@ int autofs4_expire_run(struct super_bloc
 	pkt.len = dentry->d_name.len;
 	memcpy(pkt.name, dentry->d_name.name, pkt.len);
 	pkt.name[pkt.len] = '\0';
-	dput(dentry);
 
 	if ( copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)) )
 		ret = -EFAULT;
@@ -583,6 +582,8 @@ int autofs4_expire_run(struct super_bloc
 	complete_all(&ino->expire_complete);
 	spin_unlock(&sbi->fs_lock);
 
+	dput(dentry);
+
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/autofs4/inode.c linux-libre-3.18.137-gnu/fs/autofs4/inode.c
--- linux-libre-3.18.136-gnu/fs/autofs4/inode.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/autofs4/inode.c	2019-03-23 03:19:03.000000000 -0400
@@ -256,8 +256,10 @@ int autofs4_fill_super(struct super_bloc
 	}
 	root_inode = autofs4_get_inode(s, S_IFDIR | 0755);
 	root = d_make_root(root_inode);
-	if (!root)
+	if (!root) {
+		ret = -ENOMEM;
 		goto fail_ino;
+	}
 	pipe = NULL;
 
 	root->d_fsdata = ino;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/btrfs/extent_io.c linux-libre-3.18.137-gnu/fs/btrfs/extent_io.c
--- linux-libre-3.18.136-gnu/fs/btrfs/extent_io.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/btrfs/extent_io.c	2019-03-23 03:19:03.000000000 -0400
@@ -3015,11 +3015,11 @@ static int __do_readpage(struct extent_i
 		 */
 		if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags) &&
 		    prev_em_start && *prev_em_start != (u64)-1 &&
-		    *prev_em_start != em->orig_start)
+		    *prev_em_start != em->start)
 			force_bio_submit = true;
 
 		if (prev_em_start)
-			*prev_em_start = em->orig_start;
+			*prev_em_start = em->start;
 
 		free_extent_map(em);
 		em = NULL;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/ceph/snap.c linux-libre-3.18.137-gnu/fs/ceph/snap.c
--- linux-libre-3.18.136-gnu/fs/ceph/snap.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/ceph/snap.c	2019-03-23 03:19:03.000000000 -0400
@@ -566,7 +566,8 @@ int __ceph_finish_cap_snap(struct ceph_i
 	     capsnap->size);
 
 	spin_lock(&mdsc->snap_flush_lock);
-	list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
+	if (list_empty(&ci->i_snap_flush_item))
+		list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list);
 	spin_unlock(&mdsc->snap_flush_lock);
 	return 1;  /* caller may want to ceph_flush_snaps */
 }
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/cifs/file.c linux-libre-3.18.137-gnu/fs/cifs/file.c
--- linux-libre-3.18.136-gnu/fs/cifs/file.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/cifs/file.c	2019-03-23 03:19:03.000000000 -0400
@@ -2772,14 +2772,16 @@ cifs_strict_writev(struct kiocb *iocb, s
 	 * these pages but not on the region from pos to ppos+len-1.
 	 */
 	written = cifs_user_writev(iocb, from);
-	if (written > 0 && CIFS_CACHE_READ(cinode)) {
+	if (CIFS_CACHE_READ(cinode)) {
 		/*
-		 * Windows 7 server can delay breaking level2 oplock if a write
-		 * request comes - break it on the client to prevent reading
-		 * an old data.
+		 * We have read level caching and we have just sent a write
+		 * request to the server thus making data in the cache stale.
+		 * Zap the cache and set oplock/lease level to NONE to avoid
+		 * reading stale data from the cache. All subsequent read
+		 * operations will read new data from the server.
 		 */
 		cifs_zap_mapping(inode);
-		cifs_dbg(FYI, "Set no oplock for inode=%p after a write operation\n",
+		cifs_dbg(FYI, "Set Oplock/Lease to NONE for inode=%p after write\n",
 			 inode);
 		cinode->oplock = 0;
 	}
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/cifs/smb2pdu.h linux-libre-3.18.137-gnu/fs/cifs/smb2pdu.h
--- linux-libre-3.18.136-gnu/fs/cifs/smb2pdu.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/cifs/smb2pdu.h	2019-03-23 03:19:03.000000000 -0400
@@ -82,8 +82,8 @@
 
 #define NUMBER_OF_SMB2_COMMANDS	0x0013
 
-/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
-#define MAX_SMB2_HDR_SIZE 0x00b0
+/* 52 transform hdr + 64 hdr + 88 create rsp */
+#define MAX_SMB2_HDR_SIZE 204
 
 #define SMB2_PROTO_NUMBER __constant_cpu_to_le32(0x424d53fe)
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/ext2/super.c linux-libre-3.18.137-gnu/fs/ext2/super.c
--- linux-libre-3.18.136-gnu/fs/ext2/super.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/ext2/super.c	2019-03-23 03:19:03.000000000 -0400
@@ -701,7 +701,8 @@ static loff_t ext2_max_size(int bits)
 {
 	loff_t res = EXT2_NDIR_BLOCKS;
 	int meta_blocks;
-	loff_t upper_limit;
+	unsigned int upper_limit;
+	unsigned int ppb = 1 << (bits-2);
 
 	/* This is calculated to be the largest file size for a
 	 * dense, file such that the total number of
@@ -715,24 +716,34 @@ static loff_t ext2_max_size(int bits)
 	/* total blocks in file system block size */
 	upper_limit >>= (bits - 9);
 
+	/* Compute how many blocks we can address by block tree */
+	res += 1LL << (bits-2);
+	res += 1LL << (2*(bits-2));
+	res += 1LL << (3*(bits-2));
+	/* Does block tree limit file size? */
+	if (res < upper_limit)
+		goto check_lfs;
 
+	res = upper_limit;
+	/* How many metadata blocks are needed for addressing upper_limit? */
+	upper_limit -= EXT2_NDIR_BLOCKS;
 	/* indirect blocks */
 	meta_blocks = 1;
+	upper_limit -= ppb;
 	/* double indirect blocks */
-	meta_blocks += 1 + (1LL << (bits-2));
-	/* tripple indirect blocks */
-	meta_blocks += 1 + (1LL << (bits-2)) + (1LL << (2*(bits-2)));
-
-	upper_limit -= meta_blocks;
-	upper_limit <<= bits;
-
-	res += 1LL << (bits-2);
-	res += 1LL << (2*(bits-2));
-	res += 1LL << (3*(bits-2));
+	if (upper_limit < ppb * ppb) {
+		meta_blocks += 1 + DIV_ROUND_UP(upper_limit, ppb);
+		res -= meta_blocks;
+		goto check_lfs;
+	}
+	meta_blocks += 1 + ppb;
+	upper_limit -= ppb * ppb;
+	/* tripple indirect blocks for the rest */
+	meta_blocks += 1 + DIV_ROUND_UP(upper_limit, ppb) +
+		DIV_ROUND_UP(upper_limit, ppb*ppb);
+	res -= meta_blocks;
+check_lfs:
 	res <<= bits;
-	if (res > upper_limit)
-		res = upper_limit;
-
 	if (res > MAX_LFS_FILESIZE)
 		res = MAX_LFS_FILESIZE;
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/ext4/resize.c linux-libre-3.18.137-gnu/fs/ext4/resize.c
--- linux-libre-3.18.136-gnu/fs/ext4/resize.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/ext4/resize.c	2019-03-23 03:19:03.000000000 -0400
@@ -1930,7 +1930,8 @@ retry:
 				le16_to_cpu(es->s_reserved_gdt_blocks);
 			n_group = n_desc_blocks * EXT4_DESC_PER_BLOCK(sb);
 			n_blocks_count = (ext4_fsblk_t)n_group *
-				EXT4_BLOCKS_PER_GROUP(sb);
+				EXT4_BLOCKS_PER_GROUP(sb) +
+				le32_to_cpu(es->s_first_data_block);
 			n_group--; /* set to last group number */
 		}
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/hugetlbfs/inode.c linux-libre-3.18.137-gnu/fs/hugetlbfs/inode.c
--- linux-libre-3.18.136-gnu/fs/hugetlbfs/inode.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/hugetlbfs/inode.c	2019-03-23 03:19:03.000000000 -0400
@@ -609,6 +609,18 @@ static int hugetlbfs_migrate_page(struct
 	rc = migrate_huge_page_move_mapping(mapping, newpage, page);
 	if (rc != MIGRATEPAGE_SUCCESS)
 		return rc;
+
+	/*
+	 * page_private is subpool pointer in hugetlb pages.  Transfer to
+	 * new page.  PagePrivate is not associated with page_private for
+	 * hugetlb pages and can not be set here as only page_huge_active
+	 * pages can be migrated.
+	 */
+	if (page_private(page)) {
+		set_page_private(newpage, page_private(page));
+		set_page_private(page, 0);
+	}
+
 	migrate_page_copy(newpage, page);
 
 	return MIGRATEPAGE_SUCCESS;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/jbd2/transaction.c linux-libre-3.18.137-gnu/fs/jbd2/transaction.c
--- linux-libre-3.18.136-gnu/fs/jbd2/transaction.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/jbd2/transaction.c	2019-03-23 03:19:03.000000000 -0400
@@ -1473,14 +1473,21 @@ int jbd2_journal_forget (handle_t *handl
 		/* However, if the buffer is still owned by a prior
 		 * (committing) transaction, we can't drop it yet... */
 		JBUFFER_TRACE(jh, "belongs to older transaction");
-		/* ... but we CAN drop it from the new transaction if we
-		 * have also modified it since the original commit. */
+		/* ... but we CAN drop it from the new transaction through
+		 * marking the buffer as freed and set j_next_transaction to
+		 * the new transaction, so that not only the commit code
+		 * knows it should clear dirty bits when it is done with the
+		 * buffer, but also the buffer can be checkpointed only
+		 * after the new transaction commits. */
 
-		if (jh->b_next_transaction) {
-			J_ASSERT(jh->b_next_transaction == transaction);
+		set_buffer_freed(bh);
+
+		if (!jh->b_next_transaction) {
 			spin_lock(&journal->j_list_lock);
-			jh->b_next_transaction = NULL;
+			jh->b_next_transaction = transaction;
 			spin_unlock(&journal->j_list_lock);
+		} else {
+			J_ASSERT(jh->b_next_transaction == transaction);
 
 			/*
 			 * only drop a reference if this transaction modified
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/nfs/super.c linux-libre-3.18.137-gnu/fs/nfs/super.c
--- linux-libre-3.18.136-gnu/fs/nfs/super.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/nfs/super.c	2019-03-23 03:19:03.000000000 -0400
@@ -1876,6 +1876,11 @@ static int nfs_parse_devname(const char
 	size_t len;
 	char *end;
 
+	if (unlikely(!dev_name || !*dev_name)) {
+		dfprintk(MOUNT, "NFS: device name not specified\n");
+		return -EINVAL;
+	}
+
 	/* Is the host name protected with square brakcets? */
 	if (*dev_name == '[') {
 		end = strchr(++dev_name, ']');
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/nfsd/nfs3proc.c linux-libre-3.18.137-gnu/fs/nfsd/nfs3proc.c
--- linux-libre-3.18.136-gnu/fs/nfsd/nfs3proc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/nfsd/nfs3proc.c	2019-03-23 03:19:03.000000000 -0400
@@ -430,8 +430,19 @@ nfsd3_proc_readdir(struct svc_rqst *rqst
 					&resp->common, nfs3svc_encode_entry);
 	memcpy(resp->verf, argp->verf, 8);
 	resp->count = resp->buffer - argp->buffer;
-	if (resp->offset)
-		xdr_encode_hyper(resp->offset, argp->cookie);
+	if (resp->offset) {
+		loff_t offset = argp->cookie;
+
+		if (unlikely(resp->offset1)) {
+			/* we ended up with offset on a page boundary */
+			*resp->offset = htonl(offset >> 32);
+			*resp->offset1 = htonl(offset & 0xffffffff);
+			resp->offset1 = NULL;
+		} else {
+			xdr_encode_hyper(resp->offset, offset);
+		}
+		resp->offset = NULL;
+	}
 
 	RETURN_STATUS(nfserr);
 }
@@ -499,6 +510,7 @@ nfsd3_proc_readdirplus(struct svc_rqst *
 		} else {
 			xdr_encode_hyper(resp->offset, offset);
 		}
+		resp->offset = NULL;
 	}
 
 	RETURN_STATUS(nfserr);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/nfsd/nfs3xdr.c linux-libre-3.18.137-gnu/fs/nfsd/nfs3xdr.c
--- linux-libre-3.18.136-gnu/fs/nfsd/nfs3xdr.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/nfsd/nfs3xdr.c	2019-03-23 03:19:03.000000000 -0400
@@ -892,6 +892,7 @@ encode_entry(struct readdir_cd *ccd, con
 		} else {
 			xdr_encode_hyper(cd->offset, offset64);
 		}
+		cd->offset = NULL;
 	}
 
 	/*
diff -druNp --no-dereference linux-libre-3.18.136-gnu/fs/nfsd/nfsctl.c linux-libre-3.18.137-gnu/fs/nfsd/nfsctl.c
--- linux-libre-3.18.136-gnu/fs/nfsd/nfsctl.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/fs/nfsd/nfsctl.c	2019-03-23 03:19:03.000000000 -0400
@@ -1110,7 +1110,7 @@ static ssize_t write_v4_end_grace(struct
 		case 'Y':
 		case 'y':
 		case '1':
-			if (nn->nfsd_serv)
+			if (!nn->nfsd_serv)
 				return -EBUSY;
 			nfsd4_end_grace(nn);
 			break;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/include/keys/user-type.h linux-libre-3.18.137-gnu/include/keys/user-type.h
--- linux-libre-3.18.136-gnu/include/keys/user-type.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/include/keys/user-type.h	2019-03-23 03:19:03.000000000 -0400
@@ -29,7 +29,7 @@
 struct user_key_payload {
 	struct rcu_head	rcu;		/* RCU destructor */
 	unsigned short	datalen;	/* length of this data */
-	char		data[0];	/* actual data */
+	char		data[0] __aligned(__alignof__(u64)); /* actual data */
 };
 
 extern struct key_type key_type_user;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/include/net/gro_cells.h linux-libre-3.18.137-gnu/include/net/gro_cells.h
--- linux-libre-3.18.136-gnu/include/net/gro_cells.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/include/net/gro_cells.h	2019-03-23 03:19:03.000000000 -0400
@@ -20,18 +20,23 @@ static inline void gro_cells_receive(str
 	struct gro_cell *cell = gcells->cells;
 	struct net_device *dev = skb->dev;
 
+	rcu_read_lock();
+	if (unlikely(!(dev->flags & IFF_UP)))
+		goto drop;
+
 	if (!cell || skb_cloned(skb) || !(dev->features & NETIF_F_GRO)) {
 		netif_rx(skb);
-		return;
+		goto unlock;
 	}
 
 	if (skb_rx_queue_recorded(skb))
 		cell += skb_get_rx_queue(skb) & gcells->gro_cells_mask;
 
 	if (skb_queue_len(&cell->napi_skbs) > netdev_max_backlog) {
+drop:
 		atomic_long_inc(&dev->rx_dropped);
 		kfree_skb(skb);
-		return;
+		goto unlock;
 	}
 
 	/* We run in BH context */
@@ -42,6 +47,9 @@ static inline void gro_cells_receive(str
 		napi_schedule(&cell->napi);
 
 	spin_unlock(&cell->napi_skbs.lock);
+
+unlock:
+	rcu_read_unlock();
 }
 
 /* called unser BH context */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/include/net/icmp.h linux-libre-3.18.137-gnu/include/net/icmp.h
--- linux-libre-3.18.136-gnu/include/net/icmp.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/include/net/icmp.h	2019-03-23 03:19:03.000000000 -0400
@@ -22,6 +22,7 @@
 
 #include <net/inet_sock.h>
 #include <net/snmp.h>
+#include <net/ip.h>
 
 struct icmp_err {
   int		errno;
@@ -39,7 +40,13 @@ struct net_proto_family;
 struct sk_buff;
 struct net;
 
-void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info);
+void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
+		 const struct ip_options *opt);
+static inline void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+{
+	__icmp_send(skb_in, type, code, info, &IPCB(skb_in)->opt);
+}
+
 int icmp_rcv(struct sk_buff *skb);
 void icmp_err(struct sk_buff *skb, u32 info);
 int icmp_init(void);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/include/net/ip.h linux-libre-3.18.137-gnu/include/net/ip.h
--- linux-libre-3.18.136-gnu/include/net/ip.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/include/net/ip.h	2019-03-23 03:19:03.000000000 -0400
@@ -512,6 +512,8 @@ static inline int ip_options_echo(struct
 }
 
 void ip_options_fragment(struct sk_buff *skb);
+int __ip_options_compile(struct net *net, struct ip_options *opt,
+			 struct sk_buff *skb, __be32 *info);
 int ip_options_compile(struct net *net, struct ip_options *opt,
 		       struct sk_buff *skb);
 int ip_options_get(struct net *net, struct ip_options_rcu **optp,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/kernel/sysctl.c linux-libre-3.18.137-gnu/kernel/sysctl.c
--- linux-libre-3.18.136-gnu/kernel/sysctl.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/kernel/sysctl.c	2019-03-23 03:19:03.000000000 -0400
@@ -2153,7 +2153,16 @@ static int do_proc_dointvec_minmax_conv(
 {
 	struct do_proc_dointvec_minmax_conv_param *param = data;
 	if (write) {
-		int val = *negp ? -*lvalp : *lvalp;
+		int val;
+		if (*negp) {
+			if (*lvalp > (unsigned long) INT_MAX + 1)
+				return -EINVAL;
+			val = -*lvalp;
+		} else {
+			if (*lvalp > (unsigned long) INT_MAX)
+				return -EINVAL;
+			val = *lvalp;
+		}
 		if ((param->min && *param->min > val) ||
 		    (param->max && *param->max < val))
 			return -EINVAL;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/lib/assoc_array.c linux-libre-3.18.137-gnu/lib/assoc_array.c
--- linux-libre-3.18.136-gnu/lib/assoc_array.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/lib/assoc_array.c	2019-03-23 03:19:03.000000000 -0400
@@ -780,9 +780,11 @@ all_leaves_cluster_together:
 		new_s0->index_key[i] =
 			ops->get_key_chunk(index_key, i * ASSOC_ARRAY_KEY_CHUNK_SIZE);
 
-	blank = ULONG_MAX << (level & ASSOC_ARRAY_KEY_CHUNK_MASK);
-	pr_devel("blank off [%zu] %d: %lx\n", keylen - 1, level, blank);
-	new_s0->index_key[keylen - 1] &= ~blank;
+	if (level & ASSOC_ARRAY_KEY_CHUNK_MASK) {
+		blank = ULONG_MAX << (level & ASSOC_ARRAY_KEY_CHUNK_MASK);
+		pr_devel("blank off [%zu] %d: %lx\n", keylen - 1, level, blank);
+		new_s0->index_key[keylen - 1] &= ~blank;
+	}
 
 	/* This now reduces to a node splitting exercise for which we'll need
 	 * to regenerate the disparity table.
diff -druNp --no-dereference linux-libre-3.18.136-gnu/Makefile linux-libre-3.18.137-gnu/Makefile
--- linux-libre-3.18.136-gnu/Makefile	2019-02-23 16:38:01.000000000 -0500
+++ linux-libre-3.18.137-gnu/Makefile	2019-03-23 09:01:55.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 136
+SUBLEVEL = 137
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/hugetlb.c linux-libre-3.18.137-gnu/mm/hugetlb.c
--- linux-libre-3.18.136-gnu/mm/hugetlb.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/hugetlb.c	2019-03-23 03:19:03.000000000 -0400
@@ -2938,7 +2938,6 @@ retry_avoidcopy:
 	copy_user_huge_page(new_page, old_page, address, vma,
 			    pages_per_huge_page(h));
 	__SetPageUptodate(new_page);
-	set_page_huge_active(new_page);
 
 	mmun_start = address & huge_page_mask(h);
 	mmun_end = mmun_start + huge_page_size(h);
@@ -2959,6 +2958,7 @@ retry_avoidcopy:
 				make_huge_pte(vma, new_page, 1));
 		page_remove_rmap(old_page);
 		hugepage_add_new_anon_rmap(new_page, vma, address);
+		set_page_huge_active(new_page);
 		/* Make the old page be freed below */
 		new_page = old_page;
 	}
@@ -3017,6 +3017,7 @@ static int hugetlb_no_page(struct mm_str
 	struct page *page;
 	pte_t new_pte;
 	spinlock_t *ptl;
+	bool new_page = false;
 
 	/*
 	 * Currently, we are forced to kill the process in the event the
@@ -3050,7 +3051,7 @@ retry:
 		}
 		clear_huge_page(page, address, pages_per_huge_page(h));
 		__SetPageUptodate(page);
-		set_page_huge_active(page);
+		new_page = true;
 
 		if (vma->vm_flags & VM_MAYSHARE) {
 			int err;
@@ -3126,6 +3127,15 @@ retry:
 	}
 
 	spin_unlock(ptl);
+
+	/*
+	 * Only make newly allocated pages active.  Existing pages found
+	 * in the pagecache could be !page_huge_active() if they have been
+	 * isolated for migration.
+	 */
+	if (new_page)
+		set_page_huge_active(page);
+
 	unlock_page(page);
 out:
 	return ret;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/memory_hotplug.c linux-libre-3.18.137-gnu/mm/memory_hotplug.c
--- linux-libre-3.18.136-gnu/mm/memory_hotplug.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/memory_hotplug.c	2019-03-23 03:19:03.000000000 -0400
@@ -1321,7 +1321,8 @@ static struct page *next_active_pagebloc
 int is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages)
 {
 	struct page *page = pfn_to_page(start_pfn);
-	struct page *end_page = page + nr_pages;
+	unsigned long end_pfn = min(start_pfn + nr_pages, zone_end_pfn(page_zone(page)));
+	struct page *end_page = pfn_to_page(end_pfn);
 
 	/* Check the starting page of each pageblock within the range */
 	for (; page < end_page; page = next_active_pageblock(page)) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/mempolicy.c linux-libre-3.18.137-gnu/mm/mempolicy.c
--- linux-libre-3.18.136-gnu/mm/mempolicy.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/mempolicy.c	2019-03-23 03:19:03.000000000 -0400
@@ -1349,7 +1349,7 @@ static int copy_nodes_to_user(unsigned l
 			      nodemask_t *nodes)
 {
 	unsigned long copy = ALIGN(maxnode-1, 64) / 8;
-	const int nbytes = BITS_TO_LONGS(MAX_NUMNODES) * sizeof(long);
+	unsigned int nbytes = BITS_TO_LONGS(nr_node_ids) * sizeof(long);
 
 	if (copy > nbytes) {
 		if (copy > PAGE_SIZE)
@@ -1510,7 +1510,7 @@ SYSCALL_DEFINE5(get_mempolicy, int __use
 	int uninitialized_var(pval);
 	nodemask_t nodes;
 
-	if (nmask != NULL && maxnode < MAX_NUMNODES)
+	if (nmask != NULL && maxnode < nr_node_ids)
 		return -EINVAL;
 
 	err = do_get_mempolicy(&pval, &nodes, addr, flags);
@@ -1539,7 +1539,7 @@ COMPAT_SYSCALL_DEFINE5(get_mempolicy, in
 	unsigned long nr_bits, alloc_size;
 	DECLARE_BITMAP(bm, MAX_NUMNODES);
 
-	nr_bits = min_t(unsigned long, maxnode-1, MAX_NUMNODES);
+	nr_bits = min_t(unsigned long, maxnode-1, nr_node_ids);
 	alloc_size = ALIGN(nr_bits, BITS_PER_LONG) / 8;
 
 	if (nmask)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/migrate.c linux-libre-3.18.137-gnu/mm/migrate.c
--- linux-libre-3.18.136-gnu/mm/migrate.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/migrate.c	2019-03-23 03:19:03.000000000 -0400
@@ -1050,6 +1050,16 @@ static int unmap_and_move_huge_page(new_
 		lock_page(hpage);
 	}
 
+	/*
+	 * Check for pages which are in the process of being freed.  Without
+	 * page_mapping() set, hugetlbfs specific move page routine will not
+	 * be called and we could leak usage counts for subpools.
+	 */
+	if (page_private(hpage) && !page_mapping(hpage)) {
+		rc = -EBUSY;
+		goto out_unlock;
+	}
+
 	if (PageAnon(hpage))
 		anon_vma = page_get_anon_vma(hpage);
 
@@ -1067,6 +1077,7 @@ static int unmap_and_move_huge_page(new_
 	if (rc == MIGRATEPAGE_SUCCESS)
 		hugetlb_cgroup_migrate(hpage, new_hpage);
 
+out_unlock:
 	unlock_page(hpage);
 out:
 	if (rc != -EAGAIN)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/mmap.c linux-libre-3.18.137-gnu/mm/mmap.c
--- linux-libre-3.18.136-gnu/mm/mmap.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/mmap.c	2019-03-23 03:19:03.000000000 -0400
@@ -2292,12 +2292,11 @@ int expand_downwards(struct vm_area_stru
 {
 	struct vm_area_struct *prev;
 	unsigned long gap_addr;
-	int error;
+	int error = 0;
 
 	address &= PAGE_MASK;
-	error = security_mmap_addr(address);
-	if (error)
-		return error;
+	if (address < mmap_min_addr)
+		return -EPERM;
 
 	/* Enforce stack_guard_gap */
 	gap_addr = address - stack_guard_gap;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/shmem.c linux-libre-3.18.137-gnu/mm/shmem.c
--- linux-libre-3.18.136-gnu/mm/shmem.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/shmem.c	2019-03-23 03:19:03.000000000 -0400
@@ -2280,16 +2280,20 @@ static int shmem_create(struct inode *di
 static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
 {
 	struct inode *inode = old_dentry->d_inode;
-	int ret;
+	int ret = 0;
 
 	/*
 	 * No ordinary (disk based) filesystem counts links as inodes;
 	 * but each new link needs a new dentry, pinning lowmem, and
 	 * tmpfs dentries cannot be pruned until they are unlinked.
+	 * But if an O_TMPFILE file is linked into the tmpfs, the
+	 * first link must skip that, to get the accounting right.
 	 */
-	ret = shmem_reserve_inode(inode->i_sb);
-	if (ret)
-		goto out;
+	if (inode->i_nlink) {
+		ret = shmem_reserve_inode(inode->i_sb);
+		if (ret)
+			goto out;
+	}
 
 	dir->i_size += BOGO_DIRENT_SIZE;
 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/mm/vmalloc.c linux-libre-3.18.137-gnu/mm/vmalloc.c
--- linux-libre-3.18.136-gnu/mm/vmalloc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/mm/vmalloc.c	2019-03-23 03:19:03.000000000 -0400
@@ -2140,7 +2140,7 @@ int remap_vmalloc_range_partial(struct v
 	if (!(area->flags & VM_USERMAP))
 		return -EINVAL;
 
-	if (kaddr + size > area->addr + area->size)
+	if (kaddr + size > area->addr + get_vm_area_size(area))
 		return -EINVAL;
 
 	do {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/9p/client.c linux-libre-3.18.137-gnu/net/9p/client.c
--- linux-libre-3.18.136-gnu/net/9p/client.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/9p/client.c	2019-03-23 03:19:03.000000000 -0400
@@ -1065,7 +1065,7 @@ struct p9_client *p9_client_create(const
 		p9_debug(P9_DEBUG_ERROR,
 			 "Please specify a msize of at least 4k\n");
 		err = -EINVAL;
-		goto free_client;
+		goto close_trans;
 	}
 
 	err = p9_client_version(clnt);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/batman-adv/soft-interface.c linux-libre-3.18.137-gnu/net/batman-adv/soft-interface.c
--- linux-libre-3.18.136-gnu/net/batman-adv/soft-interface.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/batman-adv/soft-interface.c	2019-03-23 03:19:03.000000000 -0400
@@ -186,6 +186,8 @@ static int batadv_interface_tx(struct sk
 
 	switch (ntohs(ethhdr->h_proto)) {
 	case ETH_P_8021Q:
+		if (!pskb_may_pull(skb, sizeof(*vhdr)))
+			goto dropped;
 		vhdr = vlan_eth_hdr(skb);
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ceph/messenger.c linux-libre-3.18.137-gnu/net/ceph/messenger.c
--- linux-libre-3.18.136-gnu/net/ceph/messenger.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ceph/messenger.c	2019-03-23 03:19:03.000000000 -0400
@@ -1980,15 +1980,19 @@ static int process_connect(struct ceph_c
 	dout("process_connect on %p tag %d\n", con, (int)con->in_tag);
 
 	if (con->auth_reply_buf) {
+		int len = le32_to_cpu(con->in_reply.authorizer_len);
+
 		/*
 		 * Any connection that defines ->get_authorizer()
 		 * should also define ->verify_authorizer_reply().
 		 * See get_connect_authorizer().
 		 */
-		ret = con->ops->verify_authorizer_reply(con, 0);
-		if (ret < 0) {
-			con->error_msg = "bad authorize reply";
-			return ret;
+		if (len) {
+			ret = con->ops->verify_authorizer_reply(con, 0);
+			if (ret < 0) {
+				con->error_msg = "bad authorize reply";
+				return ret;
+			}
 		}
 	}
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/core/net-sysfs.c linux-libre-3.18.137-gnu/net/core/net-sysfs.c
--- linux-libre-3.18.136-gnu/net/core/net-sysfs.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/core/net-sysfs.c	2019-03-23 03:19:03.000000000 -0400
@@ -1241,6 +1241,9 @@ static int register_queue_kobjects(struc
 error:
 	netdev_queue_update_kobjects(dev, txq, 0);
 	net_rx_queue_update_kobjects(dev, rxq, 0);
+#ifdef CONFIG_SYSFS
+	kset_unregister(dev->queues_kset);
+#endif
 	return error;
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/hsr/hsr_device.c linux-libre-3.18.137-gnu/net/hsr/hsr_device.c
--- linux-libre-3.18.136-gnu/net/hsr/hsr_device.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/hsr/hsr_device.c	2019-03-23 03:19:03.000000000 -0400
@@ -93,9 +93,8 @@ static void hsr_check_announce(struct ne
 	if ((hsr_dev->operstate == IF_OPER_UP) && (old_operstate != IF_OPER_UP)) {
 		/* Went up */
 		hsr->announce_count = 0;
-		hsr->announce_timer.expires = jiffies +
-				msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
-		add_timer(&hsr->announce_timer);
+		mod_timer(&hsr->announce_timer,
+			  jiffies + msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL));
 	}
 
 	if ((hsr_dev->operstate != IF_OPER_UP) && (old_operstate == IF_OPER_UP))
@@ -323,6 +322,7 @@ static void hsr_announce(unsigned long d
 {
 	struct hsr_priv *hsr;
 	struct hsr_port *master;
+	unsigned long interval;
 
 	hsr = (struct hsr_priv *) data;
 
@@ -337,14 +337,12 @@ static void hsr_announce(unsigned long d
 	}
 
 	if (hsr->announce_count < 3)
-		hsr->announce_timer.expires = jiffies +
-				msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
+		interval = msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
 	else
-		hsr->announce_timer.expires = jiffies +
-				msecs_to_jiffies(HSR_LIFE_CHECK_INTERVAL);
+		interval = msecs_to_jiffies(HSR_LIFE_CHECK_INTERVAL);
 
 	if (is_admin_up(master->dev))
-		add_timer(&hsr->announce_timer);
+		mod_timer(&hsr->announce_timer, jiffies + interval);
 
 	rcu_read_unlock();
 }
@@ -474,7 +472,7 @@ int hsr_dev_finalize(struct net_device *
 
 	res = hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER);
 	if (res)
-		return res;
+		goto err_add_port;
 
 	res = register_netdevice(hsr_dev);
 	if (res)
@@ -495,6 +493,8 @@ int hsr_dev_finalize(struct net_device *
 fail:
 	hsr_for_each_port(hsr, port)
 		hsr_del_port(port);
+err_add_port:
+	hsr_del_node(&hsr->self_node_db);
 
 	return res;
 }
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/hsr/hsr_framereg.c linux-libre-3.18.137-gnu/net/hsr/hsr_framereg.c
--- linux-libre-3.18.136-gnu/net/hsr/hsr_framereg.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/hsr/hsr_framereg.c	2019-03-23 03:19:03.000000000 -0400
@@ -124,6 +124,18 @@ int hsr_create_self_node(struct list_hea
 	return 0;
 }
 
+void hsr_del_node(struct list_head *self_node_db)
+{
+	struct hsr_node *node;
+
+	rcu_read_lock();
+	node = list_first_or_null_rcu(self_node_db, struct hsr_node, mac_list);
+	rcu_read_unlock();
+	if (node) {
+		list_del_rcu(&node->mac_list);
+		kfree(node);
+	}
+}
 
 /* Allocate an hsr_node and add it to node_db. 'addr' is the node's AddressA;
  * seq_out is used to initialize filtering of outgoing duplicate frames
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/hsr/hsr_framereg.h linux-libre-3.18.137-gnu/net/hsr/hsr_framereg.h
--- linux-libre-3.18.136-gnu/net/hsr/hsr_framereg.h	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/hsr/hsr_framereg.h	2019-03-23 03:19:03.000000000 -0400
@@ -16,6 +16,7 @@
 
 struct hsr_node;
 
+void hsr_del_node(struct list_head *self_node_db);
 struct hsr_node *hsr_add_node(struct list_head *node_db, unsigned char addr[],
 			      u16 seq_out);
 struct hsr_node *hsr_get_node(struct list_head *node_db, struct sk_buff *skb,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv4/cipso_ipv4.c linux-libre-3.18.137-gnu/net/ipv4/cipso_ipv4.c
--- linux-libre-3.18.136-gnu/net/ipv4/cipso_ipv4.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv4/cipso_ipv4.c	2019-03-23 03:19:03.000000000 -0400
@@ -165,7 +165,8 @@ static int cipso_v4_bitmap_walk(const un
 		    (state == 0 && (byte & bitmask) == 0))
 			return bit_spot;
 
-		bit_spot++;
+		if (++bit_spot >= bitmap_len)
+			return -1;
 		bitmask >>= 1;
 		if (bitmask == 0) {
 			byte = bitmap[++byte_offset];
@@ -735,7 +736,8 @@ static int cipso_v4_map_lvl_valid(const
 	case CIPSO_V4_MAP_PASS:
 		return 0;
 	case CIPSO_V4_MAP_TRANS:
-		if (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL)
+		if ((level < doi_def->map.std->lvl.cipso_size) &&
+		    (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL))
 			return 0;
 		break;
 	}
@@ -1803,13 +1805,26 @@ validate_return:
  */
 void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway)
 {
+	unsigned char optbuf[sizeof(struct ip_options) + 40];
+	struct ip_options *opt = (struct ip_options *)optbuf;
+
 	if (ip_hdr(skb)->protocol == IPPROTO_ICMP || error != -EACCES)
 		return;
 
+	/*
+	 * We might be called above the IP layer,
+	 * so we can not use icmp_send and IPCB here.
+	 */
+
+	memset(opt, 0, sizeof(struct ip_options));
+	opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
+	if (__ip_options_compile(dev_net(skb->dev), opt, skb, NULL))
+		return;
+
 	if (gateway)
-		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0);
+		__icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0, opt);
 	else
-		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0);
+		__icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0, opt);
 }
 
 /**
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv4/icmp.c linux-libre-3.18.137-gnu/net/ipv4/icmp.c
--- linux-libre-3.18.136-gnu/net/ipv4/icmp.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv4/icmp.c	2019-03-23 03:19:03.000000000 -0400
@@ -541,7 +541,8 @@ relookup_failed:
  *			MUST reply to only the first fragment.
  */
 
-void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
+void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
+		 const struct ip_options *opt)
 {
 	struct iphdr *iph;
 	int room;
@@ -655,7 +656,7 @@ void icmp_send(struct sk_buff *skb_in, i
 					  iph->tos;
 	mark = IP4_REPLY_MARK(net, skb_in->mark);
 
-	if (ip_options_echo(&icmp_param->replyopts.opt.opt, skb_in))
+	if (__ip_options_echo(&icmp_param->replyopts.opt.opt, skb_in, opt))
 		goto out_unlock;
 
 
@@ -707,7 +708,7 @@ out_free:
 	kfree(icmp_param);
 out:;
 }
-EXPORT_SYMBOL(icmp_send);
+EXPORT_SYMBOL(__icmp_send);
 
 
 static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv4/ip_options.c linux-libre-3.18.137-gnu/net/ipv4/ip_options.c
--- linux-libre-3.18.136-gnu/net/ipv4/ip_options.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv4/ip_options.c	2019-03-23 03:19:03.000000000 -0400
@@ -253,8 +253,9 @@ static void spec_dst_fill(__be32 *spec_d
  * If opt == NULL, then skb->data should point to IP header.
  */
 
-int ip_options_compile(struct net *net,
-		       struct ip_options *opt, struct sk_buff *skb)
+int __ip_options_compile(struct net *net,
+			 struct ip_options *opt, struct sk_buff *skb,
+			 __be32 *info)
 {
 	__be32 spec_dst = htonl(INADDR_ANY);
 	unsigned char *pp_ptr = NULL;
@@ -470,11 +471,22 @@ eol:
 		return 0;
 
 error:
-	if (skb) {
-		icmp_send(skb, ICMP_PARAMETERPROB, 0, htonl((pp_ptr-iph)<<24));
-	}
+	if (info)
+		*info = htonl((pp_ptr-iph)<<24);
 	return -EINVAL;
 }
+
+int ip_options_compile(struct net *net,
+		       struct ip_options *opt, struct sk_buff *skb)
+{
+	int ret;
+	__be32 info;
+
+	ret = __ip_options_compile(net, opt, skb, &info);
+	if (ret != 0 && skb)
+		icmp_send(skb, ICMP_PARAMETERPROB, 0, info);
+	return ret;
+}
 EXPORT_SYMBOL(ip_options_compile);
 
 /*
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv4/ip_vti.c linux-libre-3.18.137-gnu/net/ipv4/ip_vti.c
--- linux-libre-3.18.136-gnu/net/ipv4/ip_vti.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv4/ip_vti.c	2019-03-23 03:19:03.000000000 -0400
@@ -75,6 +75,33 @@ drop:
 	return 0;
 }
 
+static int vti_input_ipip(struct sk_buff *skb, int nexthdr, __be32 spi,
+		     int encap_type)
+{
+	struct ip_tunnel *tunnel;
+	const struct iphdr *iph = ip_hdr(skb);
+	struct net *net = dev_net(skb->dev);
+	struct ip_tunnel_net *itn = net_generic(net, vti_net_id);
+
+	tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
+				  iph->saddr, iph->daddr, 0);
+	if (tunnel) {
+		if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
+			goto drop;
+
+		XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel;
+
+		skb->dev = tunnel->dev;
+
+		return xfrm_input(skb, nexthdr, spi, encap_type);
+	}
+
+	return -EINVAL;
+drop:
+	kfree_skb(skb);
+	return 0;
+}
+
 static int vti_rcv(struct sk_buff *skb)
 {
 	XFRM_SPI_SKB_CB(skb)->family = AF_INET;
@@ -83,6 +110,14 @@ static int vti_rcv(struct sk_buff *skb)
 	return vti_input(skb, ip_hdr(skb)->protocol, 0, 0);
 }
 
+static int vti_rcv_ipip(struct sk_buff *skb)
+{
+	XFRM_SPI_SKB_CB(skb)->family = AF_INET;
+	XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct iphdr, daddr);
+
+	return vti_input_ipip(skb, ip_hdr(skb)->protocol, ip_hdr(skb)->saddr, 0);
+}
+
 static int vti_rcv_cb(struct sk_buff *skb, int err)
 {
 	unsigned short family;
@@ -409,6 +444,12 @@ static struct xfrm4_protocol vti_ipcomp4
 	.priority	=	100,
 };
 
+static struct xfrm_tunnel ipip_handler __read_mostly = {
+	.handler	=	vti_rcv_ipip,
+	.err_handler	=	vti4_err,
+	.priority	=	0,
+};
+
 static int __net_init vti_init_net(struct net *net)
 {
 	int err;
@@ -562,6 +603,13 @@ static int __init vti_init(void)
 	if (err < 0)
 		goto xfrm_proto_comp_failed;
 
+	msg = "ipip tunnel";
+	err = xfrm4_tunnel_register(&ipip_handler, AF_INET);
+	if (err < 0) {
+		pr_info("%s: cant't register tunnel\n",__func__);
+		goto xfrm_tunnel_failed;
+	}
+
 	msg = "netlink interface";
 	err = rtnl_link_register(&vti_link_ops);
 	if (err < 0)
@@ -571,6 +619,8 @@ static int __init vti_init(void)
 
 rtnl_link_failed:
 	xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
+xfrm_tunnel_failed:
+	xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
 xfrm_proto_comp_failed:
 	xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
 xfrm_proto_ah_failed:
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv6/ip6mr.c linux-libre-3.18.137-gnu/net/ipv6/ip6mr.c
--- linux-libre-3.18.136-gnu/net/ipv6/ip6mr.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv6/ip6mr.c	2019-03-23 03:19:03.000000000 -0400
@@ -1987,10 +1987,10 @@ int ip6mr_compat_ioctl(struct sock *sk,
 
 static inline int ip6mr_forward2_finish(struct sk_buff *skb)
 {
-	IP6_INC_STATS_BH(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
-			 IPSTATS_MIB_OUTFORWDATAGRAMS);
-	IP6_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
-			 IPSTATS_MIB_OUTOCTETS, skb->len);
+	IP6_INC_STATS(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
+		      IPSTATS_MIB_OUTFORWDATAGRAMS);
+	IP6_ADD_STATS(dev_net(skb_dst(skb)->dev), ip6_dst_idev(skb_dst(skb)),
+		      IPSTATS_MIB_OUTOCTETS, skb->len);
 	return dst_output(skb);
 }
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv6/route.c linux-libre-3.18.137-gnu/net/ipv6/route.c
--- linux-libre-3.18.136-gnu/net/ipv6/route.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv6/route.c	2019-03-23 03:19:03.000000000 -0400
@@ -2558,7 +2558,7 @@ static int rt6_fill_node(struct net *net
 		table = rt->rt6i_table->tb6_id;
 	else
 		table = RT6_TABLE_UNSPEC;
-	rtm->rtm_table = table;
+	rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT;
 	if (nla_put_u32(skb, RTA_TABLE, table))
 		goto nla_put_failure;
 	if (rt->rt6i_flags & RTF_REJECT) {
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/ipv6/sit.c linux-libre-3.18.137-gnu/net/ipv6/sit.c
--- linux-libre-3.18.136-gnu/net/ipv6/sit.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/ipv6/sit.c	2019-03-23 03:19:03.000000000 -0400
@@ -577,7 +577,7 @@ static int ipip6_err(struct sk_buff *skb
 		goto out;
 
 	err = 0;
-	if (!ipip6_err_gen_icmpv6_unreach(skb))
+	if (__in6_dev_get(skb->dev) && !ipip6_err_gen_icmpv6_unreach(skb))
 		goto out;
 
 	if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)
@@ -771,8 +771,9 @@ static bool check_6rd(struct ip_tunnel *
 		pbw0 = tunnel->ip6rd.prefixlen >> 5;
 		pbi0 = tunnel->ip6rd.prefixlen & 0x1f;
 
-		d = (ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >>
-		    tunnel->ip6rd.relay_prefixlen;
+		d = tunnel->ip6rd.relay_prefixlen < 32 ?
+			(ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >>
+		    tunnel->ip6rd.relay_prefixlen : 0;
 
 		pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen;
 		if (pbi1 > 0)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/l2tp/l2tp_ip6.c linux-libre-3.18.137-gnu/net/l2tp/l2tp_ip6.c
--- linux-libre-3.18.136-gnu/net/l2tp/l2tp_ip6.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/l2tp/l2tp_ip6.c	2019-03-23 03:19:03.000000000 -0400
@@ -666,9 +666,6 @@ static int l2tp_ip6_recvmsg(struct kiocb
 	if (flags & MSG_OOB)
 		goto out;
 
-	if (addr_len)
-		*addr_len = sizeof(*lsa);
-
 	if (flags & MSG_ERRQUEUE)
 		return ipv6_recv_error(sk, msg, len, addr_len);
 
@@ -698,6 +695,7 @@ static int l2tp_ip6_recvmsg(struct kiocb
 		lsa->l2tp_conn_id = 0;
 		if (ipv6_addr_type(&lsa->l2tp_addr) & IPV6_ADDR_LINKLOCAL)
 			lsa->l2tp_scope_id = inet6_iif(skb);
+		*addr_len = sizeof(*lsa);
 	}
 
 	if (np->rxopt.all)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/mac80211/cfg.c linux-libre-3.18.137-gnu/net/mac80211/cfg.c
--- linux-libre-3.18.136-gnu/net/mac80211/cfg.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/mac80211/cfg.c	2019-03-23 03:19:03.000000000 -0400
@@ -1194,6 +1194,10 @@ static int ieee80211_add_station(struct
 		sta->sta.tdls = true;
 	}
 
+	if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION &&
+	    !sdata->u.mgd.associated)
+		return -EINVAL;
+
 	err = sta_apply_parameters(local, sta, params);
 	if (err) {
 		sta_info_free(local, sta);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/mac80211/rx.c linux-libre-3.18.137-gnu/net/mac80211/rx.c
--- linux-libre-3.18.136-gnu/net/mac80211/rx.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/mac80211/rx.c	2019-03-23 03:19:03.000000000 -0400
@@ -2179,7 +2179,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
 	skb_set_queue_mapping(skb, q);
 
 	if (!--mesh_hdr->ttl) {
-		IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
+		if (!is_multicast_ether_addr(hdr->addr1))
+			IEEE80211_IFSTA_MESH_CTR_INC(ifmsh,
+						     dropped_frames_ttl);
 		goto out;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/netfilter/ipvs/ip_vs_ctl.c linux-libre-3.18.137-gnu/net/netfilter/ipvs/ip_vs_ctl.c
--- linux-libre-3.18.136-gnu/net/netfilter/ipvs/ip_vs_ctl.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/netfilter/ipvs/ip_vs_ctl.c	2019-03-23 03:19:03.000000000 -0400
@@ -2183,6 +2183,18 @@ static int ip_vs_set_timeout(struct net
 		  u->udp_timeout);
 
 #ifdef CONFIG_IP_VS_PROTO_TCP
+	if (u->tcp_timeout < 0 || u->tcp_timeout > (INT_MAX / HZ) ||
+	    u->tcp_fin_timeout < 0 || u->tcp_fin_timeout > (INT_MAX / HZ)) {
+		return -EINVAL;
+	}
+#endif
+
+#ifdef CONFIG_IP_VS_PROTO_UDP
+	if (u->udp_timeout < 0 || u->udp_timeout > (INT_MAX / HZ))
+		return -EINVAL;
+#endif
+
+#ifdef CONFIG_IP_VS_PROTO_TCP
 	if (u->tcp_timeout) {
 		pd = ip_vs_proto_data_get(net, IPPROTO_TCP);
 		pd->timeout_table[IP_VS_TCP_S_ESTABLISHED]
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/netlink/af_netlink.c linux-libre-3.18.137-gnu/net/netlink/af_netlink.c
--- linux-libre-3.18.136-gnu/net/netlink/af_netlink.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/netlink/af_netlink.c	2019-03-23 03:19:03.000000000 -0400
@@ -1977,6 +1977,7 @@ static int netlink_dump(struct sock *sk)
 	struct nlmsghdr *nlh;
 	struct module *module;
 	int err = -ENOBUFS;
+	int alloc_min_size;
 	int alloc_size;
 
 	mutex_lock(nlk->cb_mutex);
@@ -1985,9 +1986,6 @@ static int netlink_dump(struct sock *sk)
 		goto errout_skb;
 	}
 
-	cb = &nlk->cb;
-	alloc_size = max_t(int, cb->min_dump_alloc, NLMSG_GOODSIZE);
-
 	if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)
 		goto errout_skb;
 
@@ -1996,22 +1994,34 @@ static int netlink_dump(struct sock *sk)
 	 * to reduce number of system calls on dump operations, if user
 	 * ever provided a big enough buffer.
 	 */
-	if (alloc_size < nlk->max_recvmsg_len) {
-		skb = netlink_alloc_skb(sk,
-					nlk->max_recvmsg_len,
-					nlk->portid,
+	cb = &nlk->cb;
+	alloc_min_size = max_t(int, cb->min_dump_alloc, NLMSG_GOODSIZE);
+
+	if (alloc_min_size < nlk->max_recvmsg_len) {
+		alloc_size = nlk->max_recvmsg_len;
+		skb = netlink_alloc_skb(sk, alloc_size, nlk->portid,
 					(GFP_KERNEL & ~__GFP_WAIT) |
 					__GFP_NOWARN | __GFP_NORETRY);
-		/* available room should be exact amount to avoid MSG_TRUNC */
-		if (skb)
-			skb_reserve(skb, skb_tailroom(skb) -
-					 nlk->max_recvmsg_len);
 	}
-	if (!skb)
+	if (!skb) {
+		alloc_size = alloc_min_size;
 		skb = netlink_alloc_skb(sk, alloc_size, nlk->portid,
 					(GFP_KERNEL & ~__GFP_WAIT));
+	}
 	if (!skb)
 		goto errout_skb;
+
+	/* Trim skb to allocated size. User is expected to provide buffer as
+	 * large as max(min_dump_alloc, 16KiB (mac_recvmsg_len capped at
+	 * netlink_recvmsg())). dump will pack as many smaller messages as
+	 * could fit within the allocated skb. skb is typically allocated
+	 * with larger space than required (could be as much as near 2x the
+	 * requested size with align to next power of 2 approach). Allowing
+	 * dump to use the excess space makes it difficult for a user to have a
+	 * reasonable static buffer based on the expected largest dump of a
+	 * single netdev. The outcome is MSG_TRUNC error.
+	 */
+	skb_reserve(skb, skb_tailroom(skb) - alloc_size);
 	netlink_skb_set_owner_r(skb, sk);
 
 	if (nlk->dump_done_errno > 0)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/nfc/llcp_commands.c linux-libre-3.18.137-gnu/net/nfc/llcp_commands.c
--- linux-libre-3.18.136-gnu/net/nfc/llcp_commands.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/nfc/llcp_commands.c	2019-03-23 03:19:03.000000000 -0400
@@ -418,6 +418,10 @@ int nfc_llcp_send_connect(struct nfc_llc
 						      sock->service_name,
 						      sock->service_name_len,
 						      &service_name_tlv_length);
+		if (!service_name_tlv) {
+			err = -ENOMEM;
+			goto error_tlv;
+		}
 		size += service_name_tlv_length;
 	}
 
@@ -428,9 +432,17 @@ int nfc_llcp_send_connect(struct nfc_llc
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
 				      &miux_tlv_length);
+	if (!miux_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += miux_tlv_length;
 
 	rw_tlv = nfc_llcp_build_tlv(LLCP_TLV_RW, &rw, 0, &rw_tlv_length);
+	if (!rw_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += rw_tlv_length;
 
 	pr_debug("SKB size %d SN length %zu\n", size, sock->service_name_len);
@@ -484,9 +496,17 @@ int nfc_llcp_send_cc(struct nfc_llcp_soc
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&miux, 0,
 				      &miux_tlv_length);
+	if (!miux_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += miux_tlv_length;
 
 	rw_tlv = nfc_llcp_build_tlv(LLCP_TLV_RW, &rw, 0, &rw_tlv_length);
+	if (!rw_tlv) {
+		err = -ENOMEM;
+		goto error_tlv;
+	}
 	size += rw_tlv_length;
 
 	skb = llcp_allocate_pdu(sock, LLCP_PDU_CC, size);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/nfc/llcp_core.c linux-libre-3.18.137-gnu/net/nfc/llcp_core.c
--- linux-libre-3.18.136-gnu/net/nfc/llcp_core.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/nfc/llcp_core.c	2019-03-23 03:19:03.000000000 -0400
@@ -531,10 +531,10 @@ static u8 nfc_llcp_reserve_sdp_ssap(stru
 
 static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
 {
-	u8 *gb_cur, *version_tlv, version, version_length;
-	u8 *lto_tlv, lto_length;
-	u8 *wks_tlv, wks_length;
-	u8 *miux_tlv, miux_length;
+	u8 *gb_cur, version, version_length;
+	u8 lto_length, wks_length, miux_length;
+	u8 *version_tlv = NULL, *lto_tlv = NULL,
+	   *wks_tlv = NULL, *miux_tlv = NULL;
 	__be16 wks = cpu_to_be16(local->local_wks);
 	u8 gb_len = 0;
 	int ret = 0;
@@ -542,17 +542,33 @@ static int nfc_llcp_build_gb(struct nfc_
 	version = LLCP_VERSION_11;
 	version_tlv = nfc_llcp_build_tlv(LLCP_TLV_VERSION, &version,
 					 1, &version_length);
+	if (!version_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += version_length;
 
 	lto_tlv = nfc_llcp_build_tlv(LLCP_TLV_LTO, &local->lto, 1, &lto_length);
+	if (!lto_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += lto_length;
 
 	pr_debug("Local wks 0x%lx\n", local->local_wks);
 	wks_tlv = nfc_llcp_build_tlv(LLCP_TLV_WKS, (u8 *)&wks, 2, &wks_length);
+	if (!wks_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += wks_length;
 
 	miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&local->miux, 0,
 				      &miux_length);
+	if (!miux_tlv) {
+		ret = -ENOMEM;
+		goto out;
+	}
 	gb_len += miux_length;
 
 	gb_len += ARRAY_SIZE(llcp_magic);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/packet/af_packet.c linux-libre-3.18.137-gnu/net/packet/af_packet.c
--- linux-libre-3.18.136-gnu/net/packet/af_packet.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/packet/af_packet.c	2019-03-23 03:19:03.000000000 -0400
@@ -3894,7 +3894,7 @@ static int packet_set_ring(struct sock *
 		rb->frames_per_block = req->tp_block_size/req->tp_frame_size;
 		if (unlikely(rb->frames_per_block <= 0))
 			goto out;
-		if (unlikely(req->tp_block_size > UINT_MAX / req->tp_block_nr))
+		if (unlikely(rb->frames_per_block > UINT_MAX / req->tp_block_nr))
 			goto out;
 		if (unlikely((rb->frames_per_block * req->tp_block_nr) !=
 					req->tp_frame_nr))
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/unix/af_unix.c linux-libre-3.18.137-gnu/net/unix/af_unix.c
--- linux-libre-3.18.136-gnu/net/unix/af_unix.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/unix/af_unix.c	2019-03-23 03:19:03.000000000 -0400
@@ -876,7 +876,7 @@ retry:
 	addr->hash ^= sk->sk_type;
 
 	__unix_remove_socket(sk);
-	u->addr = addr;
+	smp_store_release(&u->addr, addr);
 	__unix_insert_socket(&unix_socket_table[addr->hash], sk);
 	spin_unlock(&unix_table_lock);
 	err = 0;
@@ -1045,7 +1045,7 @@ static int unix_bind(struct socket *sock
 
 	err = 0;
 	__unix_remove_socket(sk);
-	u->addr = addr;
+	smp_store_release(&u->addr, addr);
 	__unix_insert_socket(list, sk);
 
 out_unlock:
@@ -1312,15 +1312,29 @@ restart:
 	RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);
 	otheru = unix_sk(other);
 
-	/* copy address information from listening to new sock*/
-	if (otheru->addr) {
-		atomic_inc(&otheru->addr->refcnt);
-		newu->addr = otheru->addr;
-	}
+	/* copy address information from listening to new sock
+	 *
+	 * The contents of *(otheru->addr) and otheru->path
+	 * are seen fully set up here, since we have found
+	 * otheru in hash under unix_table_lock.  Insertion
+	 * into the hash chain we'd found it in had been done
+	 * in an earlier critical area protected by unix_table_lock,
+	 * the same one where we'd set *(otheru->addr) contents,
+	 * as well as otheru->path and otheru->addr itself.
+	 *
+	 * Using smp_store_release() here to set newu->addr
+	 * is enough to make those stores, as well as stores
+	 * to newu->path visible to anyone who gets newu->addr
+	 * by smp_load_acquire().  IOW, the same warranties
+	 * as for unix_sock instances bound in unix_bind() or
+	 * in unix_autobind().
+	 */
 	if (otheru->path.dentry) {
 		path_get(&otheru->path);
 		newu->path = otheru->path;
 	}
+	atomic_inc(&otheru->addr->refcnt);
+	smp_store_release(&newu->addr, otheru->addr);
 
 	/* Set credentials */
 	copy_peercred(sk, other);
@@ -1433,7 +1447,7 @@ out:
 static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer)
 {
 	struct sock *sk = sock->sk;
-	struct unix_sock *u;
+	struct unix_address *addr;
 	DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, uaddr);
 	int err = 0;
 
@@ -1448,19 +1462,15 @@ static int unix_getname(struct socket *s
 		sock_hold(sk);
 	}
 
-	u = unix_sk(sk);
-	unix_state_lock(sk);
-	if (!u->addr) {
+	addr = smp_load_acquire(&unix_sk(sk)->addr);
+	if (!addr) {
 		sunaddr->sun_family = AF_UNIX;
 		sunaddr->sun_path[0] = 0;
 		*uaddr_len = sizeof(short);
 	} else {
-		struct unix_address *addr = u->addr;
-
 		*uaddr_len = addr->len;
 		memcpy(sunaddr, addr->name, *uaddr_len);
 	}
-	unix_state_unlock(sk);
 	sock_put(sk);
 out:
 	return err;
@@ -1936,11 +1946,11 @@ static int unix_seqpacket_recvmsg(struct
 
 static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
 {
-	struct unix_sock *u = unix_sk(sk);
+	struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr);
 
-	if (u->addr) {
-		msg->msg_namelen = u->addr->len;
-		memcpy(msg->msg_name, u->addr->name, u->addr->len);
+	if (addr) {
+		msg->msg_namelen = addr->len;
+		memcpy(msg->msg_name, addr->name, addr->len);
 	}
 }
 
@@ -2551,7 +2561,7 @@ static int unix_seq_show(struct seq_file
 			(s->sk_state == TCP_ESTABLISHED ? SS_CONNECTING : SS_DISCONNECTING),
 			sock_i_ino(s));
 
-		if (u->addr) {
+		if (u->addr) {	// under unix_table_lock here
 			int i, len;
 			seq_putc(seq, ' ');
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/unix/diag.c linux-libre-3.18.137-gnu/net/unix/diag.c
--- linux-libre-3.18.136-gnu/net/unix/diag.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/unix/diag.c	2019-03-23 03:19:03.000000000 -0400
@@ -10,7 +10,8 @@
 
 static int sk_diag_dump_name(struct sock *sk, struct sk_buff *nlskb)
 {
-	struct unix_address *addr = unix_sk(sk)->addr;
+	/* might or might not have unix_table_lock */
+	struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr);
 
 	if (!addr)
 		return 0;
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/wireless/reg.c linux-libre-3.18.137-gnu/net/wireless/reg.c
--- linux-libre-3.18.136-gnu/net/wireless/reg.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/wireless/reg.c	2019-03-23 03:19:03.000000000 -0400
@@ -688,7 +688,7 @@ static bool reg_does_bw_fit(const struct
  * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"),
  * however it is safe for now to assume that a frequency rule should not be
  * part of a frequency's band if the start freq or end freq are off by more
- * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the
+ * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the
  * 60 GHz band.
  * This resolution can be lowered and should be considered as we add
  * regulatory rule support for other "bands".
@@ -703,7 +703,7 @@ static bool freq_in_rule_band(const stru
 	 * with the Channel starting frequency above 45 GHz.
 	 */
 	u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ?
-			10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
+			20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
 	if (abs(freq_khz - freq_range->start_freq_khz) <= limit)
 		return true;
 	if (abs(freq_khz - freq_range->end_freq_khz) <= limit)
diff -druNp --no-dereference linux-libre-3.18.136-gnu/net/x25/af_x25.c linux-libre-3.18.137-gnu/net/x25/af_x25.c
--- linux-libre-3.18.136-gnu/net/x25/af_x25.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/net/x25/af_x25.c	2019-03-23 03:19:03.000000000 -0400
@@ -678,8 +678,7 @@ static int x25_bind(struct socket *sock,
 	struct sockaddr_x25 *addr = (struct sockaddr_x25 *)uaddr;
 	int len, i, rc = 0;
 
-	if (!sock_flag(sk, SOCK_ZAPPED) ||
-	    addr_len != sizeof(struct sockaddr_x25) ||
+	if (addr_len != sizeof(struct sockaddr_x25) ||
 	    addr->sx25_family != AF_X25) {
 		rc = -EINVAL;
 		goto out;
@@ -694,9 +693,13 @@ static int x25_bind(struct socket *sock,
 	}
 
 	lock_sock(sk);
-	x25_sk(sk)->source_addr = addr->sx25_addr;
-	x25_insert_socket(sk);
-	sock_reset_flag(sk, SOCK_ZAPPED);
+	if (sock_flag(sk, SOCK_ZAPPED)) {
+		x25_sk(sk)->source_addr = addr->sx25_addr;
+		x25_insert_socket(sk);
+		sock_reset_flag(sk, SOCK_ZAPPED);
+	} else {
+		rc = -EINVAL;
+	}
 	release_sock(sk);
 	SOCK_DEBUG(sk, "x25_bind: socket is bound\n");
 out:
@@ -812,8 +815,13 @@ static int x25_connect(struct socket *so
 	sock->state = SS_CONNECTED;
 	rc = 0;
 out_put_neigh:
-	if (rc)
+	if (rc) {
+		read_lock_bh(&x25_list_lock);
 		x25_neigh_put(x25->neighbour);
+		x25->neighbour = NULL;
+		read_unlock_bh(&x25_list_lock);
+		x25->state = X25_STATE_0;
+	}
 out_put_route:
 	x25_route_put(rt);
 out:
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/keys/key.c linux-libre-3.18.137-gnu/security/keys/key.c
--- linux-libre-3.18.136-gnu/security/keys/key.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/keys/key.c	2019-03-23 03:19:03.000000000 -0400
@@ -260,8 +260,8 @@ struct key *key_alloc(struct key_type *t
 
 		spin_lock(&user->lock);
 		if (!(flags & KEY_ALLOC_QUOTA_OVERRUN)) {
-			if (user->qnkeys + 1 >= maxkeys ||
-			    user->qnbytes + quotalen >= maxbytes ||
+			if (user->qnkeys + 1 > maxkeys ||
+			    user->qnbytes + quotalen > maxbytes ||
 			    user->qnbytes + quotalen < user->qnbytes)
 				goto no_quota;
 		}
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/keys/keyring.c linux-libre-3.18.137-gnu/security/keys/keyring.c
--- linux-libre-3.18.136-gnu/security/keys/keyring.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/keys/keyring.c	2019-03-23 03:19:03.000000000 -0400
@@ -628,9 +628,6 @@ static bool search_nested_keyrings(struc
 	BUG_ON((ctx->flags & STATE_CHECKS) == 0 ||
 	       (ctx->flags & STATE_CHECKS) == STATE_CHECKS);
 
-	if (ctx->index_key.description)
-		ctx->index_key.desc_len = strlen(ctx->index_key.description);
-
 	/* Check to see if this top-level keyring is what we are looking for
 	 * and whether it is valid or not.
 	 */
@@ -888,6 +885,7 @@ key_ref_t keyring_search(key_ref_t keyri
 	struct keyring_search_context ctx = {
 		.index_key.type		= type,
 		.index_key.description	= description,
+		.index_key.desc_len	= strlen(description),
 		.cred			= current_cred(),
 		.match_data.cmp		= key_default_cmp,
 		.match_data.raw_data	= description,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/keys/proc.c linux-libre-3.18.137-gnu/security/keys/proc.c
--- linux-libre-3.18.136-gnu/security/keys/proc.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/keys/proc.c	2019-03-23 03:19:03.000000000 -0400
@@ -191,8 +191,7 @@ static int proc_keys_show(struct seq_fil
 	int rc;
 
 	struct keyring_search_context ctx = {
-		.index_key.type		= key->type,
-		.index_key.description	= key->description,
+		.index_key		= key->index_key,
 		.cred			= current_cred(),
 		.match_data.cmp		= lookup_user_key_possessed,
 		.match_data.raw_data	= key,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/keys/request_key_auth.c linux-libre-3.18.137-gnu/security/keys/request_key_auth.c
--- linux-libre-3.18.136-gnu/security/keys/request_key_auth.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/keys/request_key_auth.c	2019-03-23 03:19:03.000000000 -0400
@@ -254,7 +254,7 @@ struct key *key_get_instantiation_authke
 	struct key *authkey;
 	key_ref_t authkey_ref;
 
-	sprintf(description, "%x", target_id);
+	ctx.index_key.desc_len = sprintf(description, "%x", target_id);
 
 	authkey_ref = search_process_keyrings(&ctx);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/keys/request_key.c linux-libre-3.18.137-gnu/security/keys/request_key.c
--- linux-libre-3.18.136-gnu/security/keys/request_key.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/keys/request_key.c	2019-03-23 03:19:03.000000000 -0400
@@ -544,6 +544,7 @@ struct key *request_key_and_link(struct
 	struct keyring_search_context ctx = {
 		.index_key.type		= type,
 		.index_key.description	= description,
+		.index_key.desc_len	= strlen(description),
 		.cred			= current_cred(),
 		.match_data.cmp		= key_default_cmp,
 		.match_data.raw_data	= description,
diff -druNp --no-dereference linux-libre-3.18.136-gnu/security/lsm_audit.c linux-libre-3.18.137-gnu/security/lsm_audit.c
--- linux-libre-3.18.136-gnu/security/lsm_audit.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/security/lsm_audit.c	2019-03-23 03:19:03.000000000 -0400
@@ -290,6 +290,7 @@ static void dump_common_audit_data(struc
 		if (a->u.net->sk) {
 			struct sock *sk = a->u.net->sk;
 			struct unix_sock *u;
+			struct unix_address *addr;
 			int len = 0;
 			char *p = NULL;
 
@@ -320,14 +321,15 @@ static void dump_common_audit_data(struc
 #endif
 			case AF_UNIX:
 				u = unix_sk(sk);
+				addr = smp_load_acquire(&u->addr);
+				if (!addr)
+					break;
 				if (u->path.dentry) {
 					audit_log_d_path(ab, " path=", &u->path);
 					break;
 				}
-				if (!u->addr)
-					break;
-				len = u->addr->len-sizeof(short);
-				p = &u->addr->name->sun_path[0];
+				len = addr->len-sizeof(short);
+				p = &addr->name->sun_path[0];
 				audit_log_format(ab, " path=");
 				if (*p)
 					audit_log_untrustedstring(ab, p);
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/core/compress_offload.c linux-libre-3.18.137-gnu/sound/core/compress_offload.c
--- linux-libre-3.18.136-gnu/sound/core/compress_offload.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/core/compress_offload.c	2019-03-23 03:19:03.000000000 -0400
@@ -500,7 +500,8 @@ static int snd_compress_check_input(stru
 {
 	/* first let's check the buffer parameter's */
 	if (params->buffer.fragment_size == 0 ||
-	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size)
+	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
+	    params->buffer.fragments == 0)
 		return -EINVAL;
 
 	/* now codec parameters */
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/firewire/bebob/bebob.c linux-libre-3.18.137-gnu/sound/firewire/bebob/bebob.c
--- linux-libre-3.18.136-gnu/sound/firewire/bebob/bebob.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/firewire/bebob/bebob.c	2019-03-23 03:19:03.000000000 -0400
@@ -396,7 +396,19 @@ static const struct ieee1394_device_id b
 	/* Focusrite, SaffirePro 26 I/O */
 	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec),
 	/* Focusrite, SaffirePro 10 I/O */
-	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000006, &saffirepro_10_spec),
+	{
+		// The combination of vendor_id and model_id is the same as the
+		// same as the one of Liquid Saffire 56.
+		.match_flags	= IEEE1394_MATCH_VENDOR_ID |
+				  IEEE1394_MATCH_MODEL_ID |
+				  IEEE1394_MATCH_SPECIFIER_ID |
+				  IEEE1394_MATCH_VERSION,
+		.vendor_id	= VEN_FOCUSRITE,
+		.model_id	= 0x000006,
+		.specifier_id	= 0x00a02d,
+		.version	= 0x010001,
+		.driver_data	= (kernel_ulong_t)&saffirepro_10_spec,
+	},
 	/* Focusrite, Saffire(no label and LE) */
 	SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH,
 			    &saffire_spec),
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/soc/fsl/fsl_esai.c linux-libre-3.18.137-gnu/sound/soc/fsl/fsl_esai.c
--- linux-libre-3.18.136-gnu/sound/soc/fsl/fsl_esai.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/soc/fsl/fsl_esai.c	2019-03-23 03:19:03.000000000 -0400
@@ -394,7 +394,8 @@ static int fsl_esai_set_dai_fmt(struct s
 		break;
 	case SND_SOC_DAIFMT_RIGHT_J:
 		/* Data on rising edge of bclk, frame high, right aligned */
-		xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCR_xWA;
+		xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP;
+		xcr  |= ESAI_xCR_xWA;
 		break;
 	case SND_SOC_DAIFMT_DSP_A:
 		/* Data on rising edge of bclk, frame high, 1clk before data */
@@ -451,12 +452,12 @@ static int fsl_esai_set_dai_fmt(struct s
 		return -EINVAL;
 	}
 
-	mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR;
+	mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR | ESAI_xCR_xWA;
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, mask, xcr);
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, mask, xcr);
 
 	mask = ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCCR_xFSP |
-		ESAI_xCCR_xFSD | ESAI_xCCR_xCKD | ESAI_xCR_xWA;
+		ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, mask, xccr);
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR, mask, xccr);
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/soc/fsl/imx-audmux.c linux-libre-3.18.137-gnu/sound/soc/fsl/imx-audmux.c
--- linux-libre-3.18.136-gnu/sound/soc/fsl/imx-audmux.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/soc/fsl/imx-audmux.c	2019-03-23 03:19:03.000000000 -0400
@@ -86,49 +86,49 @@ static ssize_t audmux_read_file(struct f
 	if (!buf)
 		return -ENOMEM;
 
-	ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
+	ret = scnprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
 		       pdcr, ptcr);
 
 	if (ptcr & IMX_AUDMUX_V2_PTCR_TFSDIR)
-		ret += snprintf(buf + ret, PAGE_SIZE - ret,
+		ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 				"TxFS output from %s, ",
 				audmux_port_string((ptcr >> 27) & 0x7));
 	else
-		ret += snprintf(buf + ret, PAGE_SIZE - ret,
+		ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 				"TxFS input, ");
 
 	if (ptcr & IMX_AUDMUX_V2_PTCR_TCLKDIR)
-		ret += snprintf(buf + ret, PAGE_SIZE - ret,
+		ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 				"TxClk output from %s",
 				audmux_port_string((ptcr >> 22) & 0x7));
 	else
-		ret += snprintf(buf + ret, PAGE_SIZE - ret,
+		ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 				"TxClk input");
 
-	ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n");
+	ret += scnprintf(buf + ret, PAGE_SIZE - ret, "\n");
 
 	if (ptcr & IMX_AUDMUX_V2_PTCR_SYN) {
-		ret += snprintf(buf + ret, PAGE_SIZE - ret,
+		ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 				"Port is symmetric");
 	} else {
 		if (ptcr & IMX_AUDMUX_V2_PTCR_RFSDIR)
-			ret += snprintf(buf + ret, PAGE_SIZE - ret,
+			ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 					"RxFS output from %s, ",
 					audmux_port_string((ptcr >> 17) & 0x7));
 		else
-			ret += snprintf(buf + ret, PAGE_SIZE - ret,
+			ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 					"RxFS input, ");
 
 		if (ptcr & IMX_AUDMUX_V2_PTCR_RCLKDIR)
-			ret += snprintf(buf + ret, PAGE_SIZE - ret,
+			ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 					"RxClk output from %s",
 					audmux_port_string((ptcr >> 12) & 0x7));
 		else
-			ret += snprintf(buf + ret, PAGE_SIZE - ret,
+			ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 					"RxClk input");
 	}
 
-	ret += snprintf(buf + ret, PAGE_SIZE - ret,
+	ret += scnprintf(buf + ret, PAGE_SIZE - ret,
 			"\nData received from %s\n",
 			audmux_port_string((pdcr >> 13) & 0x7));
 
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/soc/intel/broadwell.c linux-libre-3.18.137-gnu/sound/soc/intel/broadwell.c
--- linux-libre-3.18.136-gnu/sound/soc/intel/broadwell.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/soc/intel/broadwell.c	2019-03-23 03:19:03.000000000 -0400
@@ -168,7 +168,7 @@ static struct snd_soc_dai_link broadwell
 		.stream_name = "Loopback",
 		.cpu_dai_name = "Loopback Pin",
 		.platform_name = "haswell-pcm-audio",
-		.dynamic = 0,
+		.dynamic = 1,
 		.codec_name = "snd-soc-dummy",
 		.codec_dai_name = "snd-soc-dummy-dai",
 		.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
diff -druNp --no-dereference linux-libre-3.18.136-gnu/sound/soc/intel/haswell.c linux-libre-3.18.137-gnu/sound/soc/intel/haswell.c
--- linux-libre-3.18.136-gnu/sound/soc/intel/haswell.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/sound/soc/intel/haswell.c	2019-03-23 03:19:03.000000000 -0400
@@ -146,7 +146,7 @@ static struct snd_soc_dai_link haswell_r
 		.stream_name = "Loopback",
 		.cpu_dai_name = "Loopback Pin",
 		.platform_name = "haswell-pcm-audio",
-		.dynamic = 0,
+		.dynamic = 1,
 		.codec_name = "snd-soc-dummy",
 		.codec_dai_name = "snd-soc-dummy-dai",
 		.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
diff -druNp --no-dereference linux-libre-3.18.136-gnu/tools/perf/util/cpumap.c linux-libre-3.18.137-gnu/tools/perf/util/cpumap.c
--- linux-libre-3.18.136-gnu/tools/perf/util/cpumap.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/tools/perf/util/cpumap.c	2019-03-23 03:19:03.000000000 -0400
@@ -121,7 +121,12 @@ struct cpu_map *cpu_map__new(const char
 	if (!cpu_list)
 		return cpu_map__read_all_cpu_map();
 
-	if (!isdigit(*cpu_list))
+	/*
+	 * must handle the case of empty cpumap to cover
+	 * TOPOLOGY header for NUMA nodes with no CPU
+	 * ( e.g., because of CPU hotplug)
+	 */
+	if (!isdigit(*cpu_list) && *cpu_list != '\0')
 		goto out;
 
 	while (isdigit(*cpu_list)) {
@@ -168,8 +173,10 @@ struct cpu_map *cpu_map__new(const char
 
 	if (nr_cpus > 0)
 		cpus = cpu_map__trim_new(nr_cpus, tmp_cpus);
-	else
+	else if (*cpu_list != '\0')
 		cpus = cpu_map__default_new();
+	else
+		cpus = cpu_map__dummy_new();
 invalid:
 	free(tmp_cpus);
 out:
diff -druNp --no-dereference linux-libre-3.18.136-gnu/tools/perf/util/symbol-elf.c linux-libre-3.18.137-gnu/tools/perf/util/symbol-elf.c
--- linux-libre-3.18.136-gnu/tools/perf/util/symbol-elf.c	2019-02-23 03:04:26.000000000 -0500
+++ linux-libre-3.18.137-gnu/tools/perf/util/symbol-elf.c	2019-03-23 03:19:03.000000000 -0400
@@ -48,6 +48,11 @@ static inline uint8_t elf_sym__type(cons
 	return GELF_ST_TYPE(sym->st_info);
 }
 
+static inline uint8_t elf_sym__visibility(const GElf_Sym *sym)
+{
+	return GELF_ST_VISIBILITY(sym->st_other);
+}
+
 #ifndef STT_GNU_IFUNC
 #define STT_GNU_IFUNC 10
 #endif
@@ -72,7 +77,9 @@ static inline int elf_sym__is_label(cons
 	return elf_sym__type(sym) == STT_NOTYPE &&
 		sym->st_name != 0 &&
 		sym->st_shndx != SHN_UNDEF &&
-		sym->st_shndx != SHN_ABS;
+		sym->st_shndx != SHN_ABS &&
+		elf_sym__visibility(sym) != STV_HIDDEN &&
+		elf_sym__visibility(sym) != STV_INTERNAL;
 }
 
 static bool elf_sym__is_a(GElf_Sym *sym, enum map_type type)
