diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/boot/dts/sama5d2-pinfunc.h linux-libre-4.4.179-gnu/arch/arm/boot/dts/sama5d2-pinfunc.h
--- linux-libre-4.4.178-gnu/arch/arm/boot/dts/sama5d2-pinfunc.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/boot/dts/sama5d2-pinfunc.h	2019-04-27 03:34:03.000000000 -0400
@@ -517,7 +517,7 @@
 #define PIN_PC9__GPIO			PINMUX_PIN(PIN_PC9, 0, 0)
 #define PIN_PC9__FIQ			PINMUX_PIN(PIN_PC9, 1, 3)
 #define PIN_PC9__GTSUCOMP		PINMUX_PIN(PIN_PC9, 2, 1)
-#define PIN_PC9__ISC_D0			PINMUX_PIN(PIN_PC9, 2, 1)
+#define PIN_PC9__ISC_D0			PINMUX_PIN(PIN_PC9, 3, 1)
 #define PIN_PC9__TIOA4			PINMUX_PIN(PIN_PC9, 4, 2)
 #define PIN_PC10			74
 #define PIN_PC10__GPIO			PINMUX_PIN(PIN_PC10, 0, 0)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/crypto/sha256-armv4.pl linux-libre-4.4.179-gnu/arch/arm/crypto/sha256-armv4.pl
--- linux-libre-4.4.178-gnu/arch/arm/crypto/sha256-armv4.pl	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/crypto/sha256-armv4.pl	2019-04-27 03:34:03.000000000 -0400
@@ -205,10 +205,11 @@ K256:
 .global	sha256_block_data_order
 .type	sha256_block_data_order,%function
 sha256_block_data_order:
+.Lsha256_block_data_order:
 #if __ARM_ARCH__<7
 	sub	r3,pc,#8		@ sha256_block_data_order
 #else
-	adr	r3,sha256_block_data_order
+	adr	r3,.Lsha256_block_data_order
 #endif
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 	ldr	r12,.LOPENSSL_armcap
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/crypto/sha256-core.S_shipped linux-libre-4.4.179-gnu/arch/arm/crypto/sha256-core.S_shipped
--- linux-libre-4.4.178-gnu/arch/arm/crypto/sha256-core.S_shipped	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/crypto/sha256-core.S_shipped	2019-04-27 03:34:03.000000000 -0400
@@ -86,10 +86,11 @@ K256:
 .global	sha256_block_data_order
 .type	sha256_block_data_order,%function
 sha256_block_data_order:
+.Lsha256_block_data_order:
 #if __ARM_ARCH__<7
 	sub	r3,pc,#8		@ sha256_block_data_order
 #else
-	adr	r3,sha256_block_data_order
+	adr	r3,.Lsha256_block_data_order
 #endif
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 	ldr	r12,.LOPENSSL_armcap
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/crypto/sha512-armv4.pl linux-libre-4.4.179-gnu/arch/arm/crypto/sha512-armv4.pl
--- linux-libre-4.4.178-gnu/arch/arm/crypto/sha512-armv4.pl	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/crypto/sha512-armv4.pl	2019-04-27 03:34:03.000000000 -0400
@@ -267,10 +267,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c
 .global	sha512_block_data_order
 .type	sha512_block_data_order,%function
 sha512_block_data_order:
+.Lsha512_block_data_order:
 #if __ARM_ARCH__<7
 	sub	r3,pc,#8		@ sha512_block_data_order
 #else
-	adr	r3,sha512_block_data_order
+	adr	r3,.Lsha512_block_data_order
 #endif
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 	ldr	r12,.LOPENSSL_armcap
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/crypto/sha512-core.S_shipped linux-libre-4.4.179-gnu/arch/arm/crypto/sha512-core.S_shipped
--- linux-libre-4.4.178-gnu/arch/arm/crypto/sha512-core.S_shipped	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/crypto/sha512-core.S_shipped	2019-04-27 03:34:03.000000000 -0400
@@ -134,10 +134,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c
 .global	sha512_block_data_order
 .type	sha512_block_data_order,%function
 sha512_block_data_order:
+.Lsha512_block_data_order:
 #if __ARM_ARCH__<7
 	sub	r3,pc,#8		@ sha512_block_data_order
 #else
-	adr	r3,sha512_block_data_order
+	adr	r3,.Lsha512_block_data_order
 #endif
 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
 	ldr	r12,.LOPENSSL_armcap
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/include/asm/barrier.h linux-libre-4.4.179-gnu/arch/arm/include/asm/barrier.h
--- linux-libre-4.4.178-gnu/arch/arm/include/asm/barrier.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/include/asm/barrier.h	2019-04-27 03:34:03.000000000 -0400
@@ -10,6 +10,8 @@
 #define sev()	__asm__ __volatile__ ("sev" : : : "memory")
 #define wfe()	__asm__ __volatile__ ("wfe" : : : "memory")
 #define wfi()	__asm__ __volatile__ ("wfi" : : : "memory")
+#else
+#define wfe()	do { } while (0)
 #endif
 
 #if __LINUX_ARM_ARCH__ >= 7
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/include/asm/processor.h linux-libre-4.4.179-gnu/arch/arm/include/asm/processor.h
--- linux-libre-4.4.178-gnu/arch/arm/include/asm/processor.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/include/asm/processor.h	2019-04-27 03:34:03.000000000 -0400
@@ -77,7 +77,11 @@ extern void release_thread(struct task_s
 unsigned long get_wchan(struct task_struct *p);
 
 #if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
-#define cpu_relax()			smp_mb()
+#define cpu_relax()						\
+	do {							\
+		smp_mb();					\
+		__asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;");	\
+	} while (0)
 #else
 #define cpu_relax()			barrier()
 #endif
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/kernel/machine_kexec.c linux-libre-4.4.179-gnu/arch/arm/kernel/machine_kexec.c
--- linux-libre-4.4.178-gnu/arch/arm/kernel/machine_kexec.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/kernel/machine_kexec.c	2019-04-27 03:34:03.000000000 -0400
@@ -87,8 +87,11 @@ void machine_crash_nonpanic_core(void *u
 
 	set_cpu_online(smp_processor_id(), false);
 	atomic_dec(&waiting_for_crash_ipi);
-	while (1)
+
+	while (1) {
 		cpu_relax();
+		wfe();
+	}
 }
 
 static void machine_kexec_mask_interrupts(void)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/kernel/patch.c linux-libre-4.4.179-gnu/arch/arm/kernel/patch.c
--- linux-libre-4.4.178-gnu/arch/arm/kernel/patch.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/kernel/patch.c	2019-04-27 03:34:03.000000000 -0400
@@ -15,7 +15,7 @@ struct patch {
 	unsigned int insn;
 };
 
-static DEFINE_SPINLOCK(patch_lock);
+static DEFINE_RAW_SPINLOCK(patch_lock);
 
 static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
 	__acquires(&patch_lock)
@@ -32,7 +32,7 @@ static void __kprobes *patch_map(void *a
 		return addr;
 
 	if (flags)
-		spin_lock_irqsave(&patch_lock, *flags);
+		raw_spin_lock_irqsave(&patch_lock, *flags);
 	else
 		__acquire(&patch_lock);
 
@@ -47,7 +47,7 @@ static void __kprobes patch_unmap(int fi
 	clear_fixmap(fixmap);
 
 	if (flags)
-		spin_unlock_irqrestore(&patch_lock, *flags);
+		raw_spin_unlock_irqrestore(&patch_lock, *flags);
 	else
 		__release(&patch_lock);
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/kernel/smp.c linux-libre-4.4.179-gnu/arch/arm/kernel/smp.c
--- linux-libre-4.4.178-gnu/arch/arm/kernel/smp.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/kernel/smp.c	2019-04-27 03:34:03.000000000 -0400
@@ -563,8 +563,10 @@ static void ipi_cpu_stop(unsigned int cp
 	local_fiq_disable();
 	local_irq_disable();
 
-	while (1)
+	while (1) {
 		cpu_relax();
+		wfe();
+	}
 }
 
 static DEFINE_PER_CPU(struct completion *, cpu_completion);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/kernel/unwind.c linux-libre-4.4.179-gnu/arch/arm/kernel/unwind.c
--- linux-libre-4.4.178-gnu/arch/arm/kernel/unwind.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/kernel/unwind.c	2019-04-27 03:34:03.000000000 -0400
@@ -93,7 +93,7 @@ extern const struct unwind_idx __start_u
 static const struct unwind_idx *__origin_unwind_idx;
 extern const struct unwind_idx __stop_unwind_idx[];
 
-static DEFINE_SPINLOCK(unwind_lock);
+static DEFINE_RAW_SPINLOCK(unwind_lock);
 static LIST_HEAD(unwind_tables);
 
 /* Convert a prel31 symbol to an absolute address */
@@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_f
 		/* module unwind tables */
 		struct unwind_table *table;
 
-		spin_lock_irqsave(&unwind_lock, flags);
+		raw_spin_lock_irqsave(&unwind_lock, flags);
 		list_for_each_entry(table, &unwind_tables, list) {
 			if (addr >= table->begin_addr &&
 			    addr < table->end_addr) {
@@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_f
 				break;
 			}
 		}
-		spin_unlock_irqrestore(&unwind_lock, flags);
+		raw_spin_unlock_irqrestore(&unwind_lock, flags);
 	}
 
 	pr_debug("%s: idx = %p\n", __func__, idx);
@@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(un
 	tab->begin_addr = text_addr;
 	tab->end_addr = text_addr + text_size;
 
-	spin_lock_irqsave(&unwind_lock, flags);
+	raw_spin_lock_irqsave(&unwind_lock, flags);
 	list_add_tail(&tab->list, &unwind_tables);
-	spin_unlock_irqrestore(&unwind_lock, flags);
+	raw_spin_unlock_irqrestore(&unwind_lock, flags);
 
 	return tab;
 }
@@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_tabl
 	if (!tab)
 		return;
 
-	spin_lock_irqsave(&unwind_lock, flags);
+	raw_spin_lock_irqsave(&unwind_lock, flags);
 	list_del(&tab->list);
-	spin_unlock_irqrestore(&unwind_lock, flags);
+	raw_spin_unlock_irqrestore(&unwind_lock, flags);
 
 	kfree(tab);
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/lib/Makefile linux-libre-4.4.179-gnu/arch/arm/lib/Makefile
--- linux-libre-4.4.178-gnu/arch/arm/lib/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/lib/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -35,7 +35,7 @@ $(obj)/csumpartialcopy.o:	$(obj)/csumpar
 $(obj)/csumpartialcopyuser.o:	$(obj)/csumpartialcopygeneric.S
 
 ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
-  NEON_FLAGS			:= -mfloat-abi=softfp -mfpu=neon
+  NEON_FLAGS			:= -march=armv7-a -mfloat-abi=softfp -mfpu=neon
   CFLAGS_xor-neon.o		+= $(NEON_FLAGS)
   obj-$(CONFIG_XOR_BLOCKS)	+= xor-neon.o
 endif
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/lib/xor-neon.c linux-libre-4.4.179-gnu/arch/arm/lib/xor-neon.c
--- linux-libre-4.4.178-gnu/arch/arm/lib/xor-neon.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/lib/xor-neon.c	2019-04-27 03:34:03.000000000 -0400
@@ -14,7 +14,7 @@
 MODULE_LICENSE("GPL");
 
 #ifndef __ARM_NEON__
-#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon'
+#error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
 #endif
 
 /*
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/mach-omap2/prm_common.c linux-libre-4.4.179-gnu/arch/arm/mach-omap2/prm_common.c
--- linux-libre-4.4.178-gnu/arch/arm/mach-omap2/prm_common.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/mach-omap2/prm_common.c	2019-04-27 03:34:03.000000000 -0400
@@ -533,8 +533,10 @@ void omap_prm_reset_system(void)
 
 	prm_ll_data->reset_system();
 
-	while (1)
+	while (1) {
 		cpu_relax();
+		wfe();
+	}
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm/plat-samsung/Kconfig linux-libre-4.4.179-gnu/arch/arm/plat-samsung/Kconfig
--- linux-libre-4.4.178-gnu/arch/arm/plat-samsung/Kconfig	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm/plat-samsung/Kconfig	2019-04-27 03:34:03.000000000 -0400
@@ -255,7 +255,7 @@ config S3C_PM_DEBUG_LED_SMDK
 
 config SAMSUNG_PM_CHECK
 	bool "S3C2410 PM Suspend Memory CRC"
-	depends on PM
+	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
 	select CRC32
 	help
 	  Enable the PM code's memory area checksum over sleep. This option
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm64/include/asm/futex.h linux-libre-4.4.179-gnu/arch/arm64/include/asm/futex.h
--- linux-libre-4.4.178-gnu/arch/arm64/include/asm/futex.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm64/include/asm/futex.h	2019-04-27 03:34:03.000000000 -0400
@@ -33,8 +33,8 @@
 "	prfm	pstl1strm, %2\n"					\
 "1:	ldxr	%w1, %2\n"						\
 	insn "\n"							\
-"2:	stlxr	%w3, %w0, %2\n"						\
-"	cbnz	%w3, 1b\n"						\
+"2:	stlxr	%w0, %w3, %2\n"						\
+"	cbnz	%w0, 1b\n"						\
 "	dmb	ish\n"							\
 "3:\n"									\
 "	.pushsection .fixup,\"ax\"\n"					\
@@ -61,23 +61,23 @@ arch_futex_atomic_op_inuser(int op, int
 
 	switch (op) {
 	case FUTEX_OP_SET:
-		__futex_atomic_op("mov	%w0, %w4",
+		__futex_atomic_op("mov	%w3, %w4",
 				  ret, oldval, uaddr, tmp, oparg);
 		break;
 	case FUTEX_OP_ADD:
-		__futex_atomic_op("add	%w0, %w1, %w4",
+		__futex_atomic_op("add	%w3, %w1, %w4",
 				  ret, oldval, uaddr, tmp, oparg);
 		break;
 	case FUTEX_OP_OR:
-		__futex_atomic_op("orr	%w0, %w1, %w4",
+		__futex_atomic_op("orr	%w3, %w1, %w4",
 				  ret, oldval, uaddr, tmp, oparg);
 		break;
 	case FUTEX_OP_ANDN:
-		__futex_atomic_op("and	%w0, %w1, %w4",
+		__futex_atomic_op("and	%w3, %w1, %w4",
 				  ret, oldval, uaddr, tmp, ~oparg);
 		break;
 	case FUTEX_OP_XOR:
-		__futex_atomic_op("eor	%w0, %w1, %w4",
+		__futex_atomic_op("eor	%w3, %w1, %w4",
 				  ret, oldval, uaddr, tmp, oparg);
 		break;
 	default:
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm64/kernel/kgdb.c linux-libre-4.4.179-gnu/arch/arm64/kernel/kgdb.c
--- linux-libre-4.4.178-gnu/arch/arm64/kernel/kgdb.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm64/kernel/kgdb.c	2019-04-27 03:34:03.000000000 -0400
@@ -215,22 +215,31 @@ int kgdb_arch_handle_exception(int excep
 
 static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr)
 {
+	if (user_mode(regs))
+		return DBG_HOOK_ERROR;
+
 	kgdb_handle_exception(1, SIGTRAP, 0, regs);
-	return 0;
+	return DBG_HOOK_HANDLED;
 }
 
 static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr)
 {
+	if (user_mode(regs))
+		return DBG_HOOK_ERROR;
+
 	compiled_break = 1;
 	kgdb_handle_exception(1, SIGTRAP, 0, regs);
 
-	return 0;
+	return DBG_HOOK_HANDLED;
 }
 
 static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
 {
+	if (user_mode(regs))
+		return DBG_HOOK_ERROR;
+
 	kgdb_handle_exception(1, SIGTRAP, 0, regs);
-	return 0;
+	return DBG_HOOK_HANDLED;
 }
 
 static struct break_hook kgdb_brkpt_hook = {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/arm64/mm/fault.c linux-libre-4.4.179-gnu/arch/arm64/mm/fault.c
--- linux-libre-4.4.178-gnu/arch/arm64/mm/fault.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/arm64/mm/fault.c	2019-04-27 03:34:03.000000000 -0400
@@ -589,11 +589,12 @@ void __init hook_debug_fault_code(int nr
 	debug_fault_info[nr].name	= name;
 }
 
-asmlinkage int __exception do_debug_exception(unsigned long addr,
+asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
 					      unsigned int esr,
 					      struct pt_regs *regs)
 {
 	const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
+	unsigned long pc = instruction_pointer(regs);
 	struct siginfo info;
 	int rv;
 
@@ -604,16 +605,16 @@ asmlinkage int __exception do_debug_exce
 	if (interrupts_enabled(regs))
 		trace_hardirqs_off();
 
-	if (!inf->fn(addr, esr, regs)) {
+	if (!inf->fn(addr_if_watchpoint, esr, regs)) {
 		rv = 1;
 	} else {
 		pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n",
-			 inf->name, esr, addr);
+			 inf->name, esr, pc);
 
 		info.si_signo = inf->sig;
 		info.si_errno = 0;
 		info.si_code  = inf->code;
-		info.si_addr  = (void __user *)addr;
+		info.si_addr  = (void __user *)pc;
 		arm64_notify_die("", regs, &info, 0);
 		rv = 0;
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/h8300/Makefile linux-libre-4.4.179-gnu/arch/h8300/Makefile
--- linux-libre-4.4.178-gnu/arch/h8300/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/h8300/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -23,7 +23,7 @@ KBUILD_AFLAGS += $(aflags-y)
 LDFLAGS += $(ldflags-y)
 
 ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := h8300-unknown-linux-
+CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
 endif
 
 core-y	+= arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/boot/Makefile linux-libre-4.4.179-gnu/arch/x86/boot/Makefile
--- linux-libre-4.4.178-gnu/arch/x86/boot/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/boot/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmli
 AFLAGS_header.o += -I$(obj)
 $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
 
-LDFLAGS_setup.elf	:= -T
+LDFLAGS_setup.elf	:= -m elf_i386 -T
 $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
 	$(call if_changed,ld)
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/crypto/poly1305-avx2-x86_64.S linux-libre-4.4.179-gnu/arch/x86/crypto/poly1305-avx2-x86_64.S
--- linux-libre-4.4.178-gnu/arch/x86/crypto/poly1305-avx2-x86_64.S	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/crypto/poly1305-avx2-x86_64.S	2019-04-27 03:34:03.000000000 -0400
@@ -321,6 +321,12 @@ ENTRY(poly1305_4block_avx2)
 	vpaddq		t2,t1,t1
 	vmovq		t1x,d4
 
+	# Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 ->
+	# h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small
+	# amount.  Careful: we must not assume the carry bits 'd0 >> 26',
+	# 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit
+	# integers.  It's true in a single-block implementation, but not here.
+
 	# d1 += d0 >> 26
 	mov		d0,%rax
 	shr		$26,%rax
@@ -359,16 +365,16 @@ ENTRY(poly1305_4block_avx2)
 	# h0 += (d4 >> 26) * 5
 	mov		d4,%rax
 	shr		$26,%rax
-	lea		(%eax,%eax,4),%eax
-	add		%eax,%ebx
+	lea		(%rax,%rax,4),%rax
+	add		%rax,%rbx
 	# h4 = d4 & 0x3ffffff
 	mov		d4,%rax
 	and		$0x3ffffff,%eax
 	mov		%eax,h4
 
 	# h1 += h0 >> 26
-	mov		%ebx,%eax
-	shr		$26,%eax
+	mov		%rbx,%rax
+	shr		$26,%rax
 	add		%eax,h1
 	# h0 = h0 & 0x3ffffff
 	andl		$0x3ffffff,%ebx
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/crypto/poly1305-sse2-x86_64.S linux-libre-4.4.179-gnu/arch/x86/crypto/poly1305-sse2-x86_64.S
--- linux-libre-4.4.178-gnu/arch/x86/crypto/poly1305-sse2-x86_64.S	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/crypto/poly1305-sse2-x86_64.S	2019-04-27 03:34:03.000000000 -0400
@@ -251,16 +251,16 @@ ENTRY(poly1305_block_sse2)
 	# h0 += (d4 >> 26) * 5
 	mov		d4,%rax
 	shr		$26,%rax
-	lea		(%eax,%eax,4),%eax
-	add		%eax,%ebx
+	lea		(%rax,%rax,4),%rax
+	add		%rax,%rbx
 	# h4 = d4 & 0x3ffffff
 	mov		d4,%rax
 	and		$0x3ffffff,%eax
 	mov		%eax,h4
 
 	# h1 += h0 >> 26
-	mov		%ebx,%eax
-	shr		$26,%eax
+	mov		%rbx,%rax
+	shr		$26,%rax
 	add		%eax,h1
 	# h0 = h0 & 0x3ffffff
 	andl		$0x3ffffff,%ebx
@@ -518,6 +518,12 @@ ENTRY(poly1305_2block_sse2)
 	paddq		t2,t1
 	movq		t1,d4
 
+	# Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 ->
+	# h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small
+	# amount.  Careful: we must not assume the carry bits 'd0 >> 26',
+	# 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit
+	# integers.  It's true in a single-block implementation, but not here.
+
 	# d1 += d0 >> 26
 	mov		d0,%rax
 	shr		$26,%rax
@@ -556,16 +562,16 @@ ENTRY(poly1305_2block_sse2)
 	# h0 += (d4 >> 26) * 5
 	mov		d4,%rax
 	shr		$26,%rax
-	lea		(%eax,%eax,4),%eax
-	add		%eax,%ebx
+	lea		(%rax,%rax,4),%rax
+	add		%rax,%rbx
 	# h4 = d4 & 0x3ffffff
 	mov		d4,%rax
 	and		$0x3ffffff,%eax
 	mov		%eax,h4
 
 	# h1 += h0 >> 26
-	mov		%ebx,%eax
-	shr		$26,%eax
+	mov		%rbx,%rax
+	shr		$26,%rax
 	add		%eax,h1
 	# h0 = h0 & 0x3ffffff
 	andl		$0x3ffffff,%ebx
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/entry/vdso/Makefile linux-libre-4.4.179-gnu/arch/x86/entry/vdso/Makefile
--- linux-libre-4.4.178-gnu/arch/x86/entry/vdso/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/entry/vdso/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -41,10 +41,8 @@ targets += $(vdso_img_sodbg)
 
 export CPPFLAGS_vdso.lds += -P -C
 
-VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
-			-Wl,--no-undefined \
-			-Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \
-			$(DISABLE_LTO)
+VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \
+			-z max-page-size=4096
 
 $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE
 	$(call if_changed,vdso)
@@ -90,10 +88,8 @@ CFLAGS_REMOVE_vvar.o = -pg
 #
 
 CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds)
-VDSO_LDFLAGS_vdsox32.lds = -Wl,-m,elf32_x86_64 \
-			   -Wl,-soname=linux-vdso.so.1 \
-			   -Wl,-z,max-page-size=4096 \
-			   -Wl,-z,common-page-size=4096
+VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \
+			   -z max-page-size=4096
 
 # 64-bit objects to re-brand as x32
 vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
@@ -121,7 +117,7 @@ $(obj)/vdsox32.so.dbg: $(src)/vdsox32.ld
 	$(call if_changed,vdso)
 
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
-VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1
+VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -soname linux-gate.so.1
 
 # This makes sure the $(obj) subdirectory exists even though vdso32/
 # is not a kbuild sub-make subdirectory.
@@ -157,13 +153,13 @@ $(obj)/vdso32.so.dbg: FORCE \
 # The DSO images are built using a special linker script.
 #
 quiet_cmd_vdso = VDSO    $@
-      cmd_vdso = $(CC) -nostdlib -o $@ \
+      cmd_vdso = $(LD) -nostdlib -o $@ \
 		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
+		       -T $(filter %.lds,$^) $(filter %.o,$^) && \
 		 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
 
-VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=both) \
-	$(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS)
+VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
+	$(call ld-option, --build-id) -Bsymbolic
 GCOV_PROFILE := n
 
 #
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/include/asm/xen/hypercall.h linux-libre-4.4.179-gnu/arch/x86/include/asm/xen/hypercall.h
--- linux-libre-4.4.178-gnu/arch/x86/include/asm/xen/hypercall.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/include/asm/xen/hypercall.h	2019-04-27 03:34:03.000000000 -0400
@@ -215,6 +215,9 @@ privcmd_call(unsigned call,
 	__HYPERCALL_DECLS;
 	__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
 
+	if (call >= PAGE_SIZE / sizeof(hypercall_page[0]))
+		return -EINVAL;
+
 	stac();
 	asm volatile(CALL_NOSPEC
 		     : __HYPERCALL_5PARAM
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kernel/cpu/cyrix.c linux-libre-4.4.179-gnu/arch/x86/kernel/cpu/cyrix.c
--- linux-libre-4.4.178-gnu/arch/x86/kernel/cpu/cyrix.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kernel/cpu/cyrix.c	2019-04-27 03:34:03.000000000 -0400
@@ -121,7 +121,7 @@ static void set_cx86_reorder(void)
 	setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
 
 	/* Load/Store Serialize to mem access disable (=reorder it) */
-	setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) & ~0x80);
+	setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
 	/* set load/store serialize from 1GB to 4GB */
 	ccr3 |= 0xe0;
 	setCx86(CX86_CCR3, ccr3);
@@ -132,11 +132,11 @@ static void set_cx86_memwb(void)
 	printk(KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n");
 
 	/* CCR2 bit 2: unlock NW bit */
-	setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) & ~0x04);
+	setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04);
 	/* set 'Not Write-through' */
 	write_cr0(read_cr0() | X86_CR0_NW);
 	/* CCR2 bit 2: lock NW bit and set WT1 */
-	setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x14);
+	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
 }
 
 /*
@@ -150,14 +150,14 @@ static void geode_configure(void)
 	local_irq_save(flags);
 
 	/* Suspend on halt power saving and enable #SUSP pin */
-	setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x88);
+	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
 
 	ccr3 = getCx86(CX86_CCR3);
 	setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);	/* enable MAPEN */
 
 
 	/* FPU fast, DTE cache, Mem bypass */
-	setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x38);
+	setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
 	setCx86(CX86_CCR3, ccr3);			/* disable MAPEN */
 
 	set_cx86_memwb();
@@ -292,7 +292,7 @@ static void init_cyrix(struct cpuinfo_x8
 		/* GXm supports extended cpuid levels 'ala' AMD */
 		if (c->cpuid_level == 2) {
 			/* Enable cxMMX extensions (GX1 Datasheet 54) */
-			setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7) | 1);
+			setCx86(CX86_CCR7, getCx86(CX86_CCR7) | 1);
 
 			/*
 			 * GXm : 0x30 ... 0x5f GXm  datasheet 51
@@ -315,7 +315,7 @@ static void init_cyrix(struct cpuinfo_x8
 		if (dir1 > 7) {
 			dir0_msn++;  /* M II */
 			/* Enable MMX extensions (App note 108) */
-			setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7)|1);
+			setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
 		} else {
 			/* A 6x86MX - it has the bug. */
 			set_cpu_bug(c, X86_BUG_COMA);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kernel/hpet.c linux-libre-4.4.179-gnu/arch/x86/kernel/hpet.c
--- linux-libre-4.4.178-gnu/arch/x86/kernel/hpet.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kernel/hpet.c	2019-04-27 03:34:03.000000000 -0400
@@ -825,6 +825,8 @@ int __init hpet_enable(void)
 		return 0;
 
 	hpet_set_mapping();
+	if (!hpet_virt_address)
+		return 0;
 
 	/*
 	 * Read the period and check for a sane value:
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kernel/hw_breakpoint.c linux-libre-4.4.179-gnu/arch/x86/kernel/hw_breakpoint.c
--- linux-libre-4.4.178-gnu/arch/x86/kernel/hw_breakpoint.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kernel/hw_breakpoint.c	2019-04-27 03:34:03.000000000 -0400
@@ -351,6 +351,7 @@ int arch_validate_hwbkpt_settings(struct
 #endif
 	default:
 		WARN_ON_ONCE(1);
+		return -EINVAL;
 	}
 
 	/*
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kernel/kprobes/core.c linux-libre-4.4.179-gnu/arch/x86/kernel/kprobes/core.c
--- linux-libre-4.4.178-gnu/arch/x86/kernel/kprobes/core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kernel/kprobes/core.c	2019-04-27 03:34:03.000000000 -0400
@@ -541,6 +541,7 @@ void arch_prepare_kretprobe(struct kretp
 	unsigned long *sara = stack_addr(regs);
 
 	ri->ret_addr = (kprobe_opcode_t *) *sara;
+	ri->fp = sara;
 
 	/* Replace the return addr with trampoline addr */
 	*sara = (unsigned long) &kretprobe_trampoline;
@@ -742,15 +743,21 @@ __visible __used void *trampoline_handle
 	unsigned long flags, orig_ret_address = 0;
 	unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
 	kprobe_opcode_t *correct_ret_addr = NULL;
+	void *frame_pointer;
+	bool skipped = false;
 
 	INIT_HLIST_HEAD(&empty_rp);
 	kretprobe_hash_lock(current, &head, &flags);
 	/* fixup registers */
 #ifdef CONFIG_X86_64
 	regs->cs = __KERNEL_CS;
+	/* On x86-64, we use pt_regs->sp for return address holder. */
+	frame_pointer = &regs->sp;
 #else
 	regs->cs = __KERNEL_CS | get_kernel_rpl();
 	regs->gs = 0;
+	/* On x86-32, we use pt_regs->flags for return address holder. */
+	frame_pointer = &regs->flags;
 #endif
 	regs->ip = trampoline_address;
 	regs->orig_ax = ~0UL;
@@ -772,8 +779,25 @@ __visible __used void *trampoline_handle
 		if (ri->task != current)
 			/* another task is sharing our hash bucket */
 			continue;
+		/*
+		 * Return probes must be pushed on this hash list correct
+		 * order (same as return order) so that it can be poped
+		 * correctly. However, if we find it is pushed it incorrect
+		 * order, this means we find a function which should not be
+		 * probed, because the wrong order entry is pushed on the
+		 * path of processing other kretprobe itself.
+		 */
+		if (ri->fp != frame_pointer) {
+			if (!skipped)
+				pr_warn("kretprobe is stacked incorrectly. Trying to fixup.\n");
+			skipped = true;
+			continue;
+		}
 
 		orig_ret_address = (unsigned long)ri->ret_addr;
+		if (skipped)
+			pr_warn("%ps must be blacklisted because of incorrect kretprobe order\n",
+				ri->rp->kp.addr);
 
 		if (orig_ret_address != trampoline_address)
 			/*
@@ -791,6 +815,8 @@ __visible __used void *trampoline_handle
 		if (ri->task != current)
 			/* another task is sharing our hash bucket */
 			continue;
+		if (ri->fp != frame_pointer)
+			continue;
 
 		orig_ret_address = (unsigned long)ri->ret_addr;
 		if (ri->rp && ri->rp->handler) {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kernel/vmlinux.lds.S linux-libre-4.4.179-gnu/arch/x86/kernel/vmlinux.lds.S
--- linux-libre-4.4.178-gnu/arch/x86/kernel/vmlinux.lds.S	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kernel/vmlinux.lds.S	2019-04-27 03:34:03.000000000 -0400
@@ -365,7 +365,7 @@ SECTIONS
  * Per-cpu symbols which need to be offset from __per_cpu_load
  * for the boot processor.
  */
-#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
+#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load
 INIT_PER_CPU(gdt_page);
 INIT_PER_CPU(irq_stack_union);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/kvm/emulate.c linux-libre-4.4.179-gnu/arch/x86/kvm/emulate.c
--- linux-libre-4.4.178-gnu/arch/x86/kvm/emulate.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/kvm/emulate.c	2019-04-27 03:34:03.000000000 -0400
@@ -2567,15 +2567,13 @@ static int em_rsm(struct x86_emulate_ctx
 	 * CR0/CR3/CR4/EFER.  It's all a bit more complicated if the vCPU
 	 * supports long mode.
 	 */
-	cr4 = ctxt->ops->get_cr(ctxt, 4);
 	if (emulator_has_longmode(ctxt)) {
 		struct desc_struct cs_desc;
 
 		/* Zero CR4.PCIDE before CR0.PG.  */
-		if (cr4 & X86_CR4_PCIDE) {
+		cr4 = ctxt->ops->get_cr(ctxt, 4);
+		if (cr4 & X86_CR4_PCIDE)
 			ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PCIDE);
-			cr4 &= ~X86_CR4_PCIDE;
-		}
 
 		/* A 32-bit code segment is required to clear EFER.LMA.  */
 		memset(&cs_desc, 0, sizeof(cs_desc));
@@ -2589,13 +2587,16 @@ static int em_rsm(struct x86_emulate_ctx
 	if (cr0 & X86_CR0_PE)
 		ctxt->ops->set_cr(ctxt, 0, cr0 & ~(X86_CR0_PG | X86_CR0_PE));
 
-	/* Now clear CR4.PAE (which must be done before clearing EFER.LME).  */
-	if (cr4 & X86_CR4_PAE)
-		ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PAE);
+	if (emulator_has_longmode(ctxt)) {
+		/* Clear CR4.PAE before clearing EFER.LME. */
+		cr4 = ctxt->ops->get_cr(ctxt, 4);
+		if (cr4 & X86_CR4_PAE)
+			ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PAE);
 
-	/* And finally go back to 32-bit mode.  */
-	efer = 0;
-	ctxt->ops->set_msr(ctxt, MSR_EFER, efer);
+		/* And finally go back to 32-bit mode.  */
+		efer = 0;
+		ctxt->ops->set_msr(ctxt, MSR_EFER, efer);
+	}
 
 	smbase = ctxt->ops->get_smbase(ctxt);
 	if (emulator_has_longmode(ctxt))
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/x86/realmode/rm/Makefile linux-libre-4.4.179-gnu/arch/x86/realmode/rm/Makefile
--- linux-libre-4.4.178-gnu/arch/x86/realmode/rm/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/x86/realmode/rm/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -43,7 +43,7 @@ $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
 targets += realmode.lds
 $(obj)/realmode.lds: $(obj)/pasyms.h
 
-LDFLAGS_realmode.elf := --emit-relocs -T
+LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T
 CPPFLAGS_realmode.lds += -P -C -I$(obj)
 
 targets += realmode.elf
diff -druNp --no-dereference linux-libre-4.4.178-gnu/arch/xtensa/kernel/stacktrace.c linux-libre-4.4.179-gnu/arch/xtensa/kernel/stacktrace.c
--- linux-libre-4.4.178-gnu/arch/xtensa/kernel/stacktrace.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/arch/xtensa/kernel/stacktrace.c	2019-04-27 03:34:03.000000000 -0400
@@ -272,10 +272,14 @@ static int return_address_cb(struct stac
 	return 1;
 }
 
+/*
+ * level == 0 is for the return address from the caller of this function,
+ * not from this function itself.
+ */
 unsigned long return_address(unsigned level)
 {
 	struct return_addr_data r = {
-		.skip = level + 1,
+		.skip = level,
 	};
 	walk_stackframe(stack_pointer(NULL), return_address_cb, &r);
 	return r.addr;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/block/bio.c linux-libre-4.4.179-gnu/block/bio.c
--- linux-libre-4.4.178-gnu/block/bio.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/block/bio.c	2019-04-27 03:34:03.000000000 -0400
@@ -1216,8 +1216,11 @@ struct bio *bio_copy_user_iov(struct req
 			}
 		}
 
-		if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes)
+		if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) {
+			if (!map_data)
+				__free_page(page);
 			break;
+		}
 
 		len -= bytes;
 		offset = 0;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/crypto/testmgr.h linux-libre-4.4.179-gnu/crypto/testmgr.h
--- linux-libre-4.4.178-gnu/crypto/testmgr.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/crypto/testmgr.h	2019-04-27 03:34:03.000000000 -0400
@@ -3494,7 +3494,49 @@ static struct hash_testvec poly1305_tv_t
 		.psize		= 80,
 		.digest		= "\x13\x00\x00\x00\x00\x00\x00\x00"
 				  "\x00\x00\x00\x00\x00\x00\x00\x00",
-	},
+	}, { /* Regression test for overflow in AVX2 implementation */
+		.plaintext	= "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff\xff\xff\xff\xff"
+				  "\xff\xff\xff\xff",
+		.psize		= 300,
+		.digest		= "\xfb\x5e\x96\xd8\x61\xd5\xc7\xc8"
+				  "\x78\xe5\x87\xcc\x2d\x5a\x22\xe1",
+	}
 };
 
 /*
diff -druNp --no-dereference linux-libre-4.4.178-gnu/Documentation/arm/kernel_mode_neon.txt linux-libre-4.4.179-gnu/Documentation/arm/kernel_mode_neon.txt
--- linux-libre-4.4.178-gnu/Documentation/arm/kernel_mode_neon.txt	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/Documentation/arm/kernel_mode_neon.txt	2019-04-27 03:34:03.000000000 -0400
@@ -6,7 +6,7 @@ TL;DR summary
 * Use only NEON instructions, or VFP instructions that don't rely on support
   code
 * Isolate your NEON code in a separate compilation unit, and compile it with
-  '-mfpu=neon -mfloat-abi=softfp'
+  '-march=armv7-a -mfpu=neon -mfloat-abi=softfp'
 * Put kernel_neon_begin() and kernel_neon_end() calls around the calls into your
   NEON code
 * Don't sleep in your NEON code, and be aware that it will be executed with
@@ -87,7 +87,7 @@ instructions appearing in unexpected pla
 Therefore, the recommended and only supported way of using NEON/VFP in the
 kernel is by adhering to the following rules:
 * isolate the NEON code in a separate compilation unit and compile it with
-  '-mfpu=neon -mfloat-abi=softfp';
+  '-march=armv7-a -mfpu=neon -mfloat-abi=softfp';
 * issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls
   into the unit containing the NEON code from a compilation unit which is *not*
   built with the GCC flag '-mfpu=neon' set.
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/acpi/sbs.c linux-libre-4.4.179-gnu/drivers/acpi/sbs.c
--- linux-libre-4.4.178-gnu/drivers/acpi/sbs.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/acpi/sbs.c	2019-04-27 03:34:03.000000000 -0400
@@ -443,9 +443,13 @@ static int acpi_ac_get_present(struct ac
 
 	/*
 	 * The spec requires that bit 4 always be 1. If it's not set, assume
-	 * that the implementation doesn't support an SBS charger
+	 * that the implementation doesn't support an SBS charger.
+	 *
+	 * And on some MacBooks a status of 0xffff is always returned, no
+	 * matter whether the charger is plugged in or not, which is also
+	 * wrong, so ignore the SBS charger for those too.
 	 */
-	if (!((status >> 4) & 0x1))
+	if (!((status >> 4) & 0x1) || status == 0xffff)
 		return -ENODEV;
 
 	sbs->charger_present = (status >> 15) & 0x1;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/cdrom/cdrom.c linux-libre-4.4.179-gnu/drivers/cdrom/cdrom.c
--- linux-libre-4.4.178-gnu/drivers/cdrom/cdrom.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/cdrom/cdrom.c	2019-04-27 03:34:03.000000000 -0400
@@ -265,6 +265,7 @@
 /* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */
 /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */
 
+#include <linux/atomic.h>
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/major.h>
@@ -3677,9 +3678,9 @@ static struct ctl_table_header *cdrom_sy
 
 static void cdrom_sysctl_register(void)
 {
-	static int initialized;
+	static atomic_t initialized = ATOMIC_INIT(0);
 
-	if (initialized == 1)
+	if (!atomic_add_unless(&initialized, 1, 1))
 		return;
 
 	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
@@ -3690,8 +3691,6 @@ static void cdrom_sysctl_register(void)
 	cdrom_sysctl_settings.debug = debug;
 	cdrom_sysctl_settings.lock = lockdoor;
 	cdrom_sysctl_settings.check = check_media_type;
-
-	initialized = 1;
 }
 
 static void cdrom_sysctl_unregister(void)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/char/hpet.c linux-libre-4.4.179-gnu/drivers/char/hpet.c
--- linux-libre-4.4.178-gnu/drivers/char/hpet.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/char/hpet.c	2019-04-27 03:34:03.000000000 -0400
@@ -376,7 +376,7 @@ static __init int hpet_mmap_enable(char
 	pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled");
 	return 1;
 }
-__setup("hpet_mmap", hpet_mmap_enable);
+__setup("hpet_mmap=", hpet_mmap_enable);
 
 static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
 {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/char/hw_random/virtio-rng.c linux-libre-4.4.179-gnu/drivers/char/hw_random/virtio-rng.c
--- linux-libre-4.4.178-gnu/drivers/char/hw_random/virtio-rng.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/char/hw_random/virtio-rng.c	2019-04-27 03:34:03.000000000 -0400
@@ -73,7 +73,7 @@ static int virtio_read(struct hwrng *rng
 
 	if (!vi->busy) {
 		vi->busy = true;
-		init_completion(&vi->have_data);
+		reinit_completion(&vi->have_data);
 		register_buffer(vi, buf, size);
 	}
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/char/Kconfig linux-libre-4.4.179-gnu/drivers/char/Kconfig
--- linux-libre-4.4.178-gnu/drivers/char/Kconfig	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/char/Kconfig	2019-04-27 03:34:03.000000000 -0400
@@ -389,7 +389,7 @@ config XILINX_HWICAP
 
 config R3964
 	tristate "Siemens R3964 line discipline"
-	depends on TTY
+	depends on TTY && BROKEN
 	---help---
 	  This driver allows synchronous communication with devices using the
 	  Siemens R3964 packet protocol. Unless you are dealing with special
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/char/tpm/tpm_crb.c linux-libre-4.4.179-gnu/drivers/char/tpm/tpm_crb.c
--- linux-libre-4.4.178-gnu/drivers/char/tpm/tpm_crb.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/char/tpm/tpm_crb.c	2019-04-27 03:34:03.000000000 -0400
@@ -109,19 +109,29 @@ static int crb_recv(struct tpm_chip *chi
 	struct crb_priv *priv = chip->vendor.priv;
 	unsigned int expected;
 
-	/* sanity check */
-	if (count < 6)
+	/* A sanity check that the upper layer wants to get at least the header
+	 * as that is the minimum size for any TPM response.
+	 */
+	if (count < TPM_HEADER_SIZE)
 		return -EIO;
 
+	/* If this bit is set, according to the spec, the TPM is in
+	 * unrecoverable condition.
+	 */
 	if (le32_to_cpu(ioread32(&priv->cca->sts)) & CRB_CA_STS_ERROR)
 		return -EIO;
 
-	memcpy_fromio(buf, priv->rsp, 6);
-	expected = be32_to_cpup((__be32 *) &buf[2]);
-	if (expected > count || expected < 6)
+	/* Read the first 8 bytes in order to get the length of the response.
+	 * We read exactly a quad word in order to make sure that the remaining
+	 * reads will be aligned.
+	 */
+	memcpy_fromio(buf, priv->rsp, 8);
+
+	expected = be32_to_cpup((__be32 *)&buf[2]);
+	if (expected > count || expected < TPM_HEADER_SIZE)
 		return -EIO;
 
-	memcpy_fromio(&buf[6], &priv->rsp[6], expected - 6);
+	memcpy_fromio(&buf[8], &priv->rsp[8], expected - 8);
 
 	return expected;
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/char/tpm/tpm_i2c_atmel.c linux-libre-4.4.179-gnu/drivers/char/tpm/tpm_i2c_atmel.c
--- linux-libre-4.4.178-gnu/drivers/char/tpm/tpm_i2c_atmel.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/char/tpm/tpm_i2c_atmel.c	2019-04-27 03:34:03.000000000 -0400
@@ -65,7 +65,15 @@ static int i2c_atmel_send(struct tpm_chi
 	dev_dbg(&chip->dev,
 		"%s(buf=%*ph len=%0zx) -> sts=%d\n", __func__,
 		(int)min_t(size_t, 64, len), buf, len, status);
-	return status;
+
+	if (status < 0)
+		return status;
+
+	/* The upper layer does not support incomplete sends. */
+	if (status != len)
+		return -E2BIG;
+
+	return 0;
 }
 
 static int i2c_atmel_recv(struct tpm_chip *chip, u8 *buf, size_t count)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/crypto/amcc/crypto4xx_alg.c linux-libre-4.4.179-gnu/drivers/crypto/amcc/crypto4xx_alg.c
--- linux-libre-4.4.178-gnu/drivers/crypto/amcc/crypto4xx_alg.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/crypto/amcc/crypto4xx_alg.c	2019-04-27 03:34:03.000000000 -0400
@@ -138,7 +138,8 @@ static int crypto4xx_setkey_aes(struct c
 	sa = (struct dynamic_sa_ctl *) ctx->sa_in;
 	ctx->hash_final = 0;
 
-	set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
+	set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
+				 SA_SAVE_IV : SA_NOT_SAVE_IV),
 				 SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
 				 SA_NO_HEADER_PROC, SA_HASH_ALG_NULL,
 				 SA_CIPHER_ALG_AES, SA_PAD_TYPE_ZERO,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/crypto/amcc/crypto4xx_core.c linux-libre-4.4.179-gnu/drivers/crypto/amcc/crypto4xx_core.c
--- linux-libre-4.4.178-gnu/drivers/crypto/amcc/crypto4xx_core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/crypto/amcc/crypto4xx_core.c	2019-04-27 03:34:03.000000000 -0400
@@ -645,6 +645,15 @@ static u32 crypto4xx_ablkcipher_done(str
 		addr = dma_map_page(dev->core_dev->device, sg_page(dst),
 				    dst->offset, dst->length, DMA_FROM_DEVICE);
 	}
+
+	if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) {
+		struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req);
+
+		crypto4xx_memcpy_from_le32((u32 *)req->iv,
+			pd_uinfo->sr_va->save_iv,
+			crypto_skcipher_ivsize(skcipher));
+	}
+
 	crypto4xx_ret_sg_desc(dev, pd_uinfo);
 	if (ablk_req->base.complete != NULL)
 		ablk_req->base.complete(&ablk_req->base, 0);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/dma/imx-dma.c linux-libre-4.4.179-gnu/drivers/dma/imx-dma.c
--- linux-libre-4.4.178-gnu/drivers/dma/imx-dma.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/dma/imx-dma.c	2019-04-27 03:34:03.000000000 -0400
@@ -286,7 +286,7 @@ static inline int imxdma_sg_next(struct
 	struct scatterlist *sg = d->sg;
 	unsigned long now;
 
-	now = min(d->len, sg_dma_len(sg));
+	now = min_t(size_t, d->len, sg_dma_len(sg));
 	if (d->len != IMX_DMA_LENGTH_LOOP)
 		d->len -= now;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/dma/tegra20-apb-dma.c linux-libre-4.4.179-gnu/drivers/dma/tegra20-apb-dma.c
--- linux-libre-4.4.178-gnu/drivers/dma/tegra20-apb-dma.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/dma/tegra20-apb-dma.c	2019-04-27 03:34:03.000000000 -0400
@@ -632,7 +632,10 @@ static void handle_cont_sngl_cycle_dma_d
 
 	sgreq = list_first_entry(&tdc->pending_sg_req, typeof(*sgreq), node);
 	dma_desc = sgreq->dma_desc;
-	dma_desc->bytes_transferred += sgreq->req_len;
+	/* if we dma for long enough the transfer count will wrap */
+	dma_desc->bytes_transferred =
+		(dma_desc->bytes_transferred + sgreq->req_len) %
+		dma_desc->bytes_requested;
 
 	/* Callback need to be call */
 	if (!dma_desc->cb_count)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/gpio/gpio-omap.c linux-libre-4.4.179-gnu/drivers/gpio/gpio-omap.c
--- linux-libre-4.4.178-gnu/drivers/gpio/gpio-omap.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/gpio/gpio-omap.c	2019-04-27 03:34:03.000000000 -0400
@@ -872,14 +872,16 @@ static void omap_gpio_unmask_irq(struct
 	if (trigger)
 		omap_set_gpio_triggering(bank, offset, trigger);
 
-	/* For level-triggered GPIOs, the clearing must be done after
-	 * the HW source is cleared, thus after the handler has run */
-	if (bank->level_mask & BIT(offset)) {
-		omap_set_gpio_irqenable(bank, offset, 0);
+	omap_set_gpio_irqenable(bank, offset, 1);
+
+	/*
+	 * For level-triggered GPIOs, clearing must be done after the source
+	 * is cleared, thus after the handler has run. OMAP4 needs this done
+	 * after enabing the interrupt to clear the wakeup status.
+	 */
+	if (bank->level_mask & BIT(offset))
 		omap_clear_gpio_irqstatus(bank, offset);
-	}
 
-	omap_set_gpio_irqenable(bank, offset, 1);
 	raw_spin_unlock_irqrestore(&bank->lock, flags);
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/gpu/drm/drm_dp_mst_topology.c linux-libre-4.4.179-gnu/drivers/gpu/drm/drm_dp_mst_topology.c
--- linux-libre-4.4.178-gnu/drivers/gpu/drm/drm_dp_mst_topology.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/gpu/drm/drm_dp_mst_topology.c	2019-04-27 03:34:03.000000000 -0400
@@ -3019,6 +3019,7 @@ static int drm_dp_mst_i2c_xfer(struct i2
 		msg.u.i2c_read.transactions[i].i2c_dev_id = msgs[i].addr;
 		msg.u.i2c_read.transactions[i].num_bytes = msgs[i].len;
 		msg.u.i2c_read.transactions[i].bytes = msgs[i].buf;
+		msg.u.i2c_read.transactions[i].no_stop_bit = !(msgs[i].flags & I2C_M_STOP);
 	}
 	msg.u.i2c_read.read_i2c_device_id = msgs[num - 1].addr;
 	msg.u.i2c_read.num_bytes_read = msgs[num - 1].len;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/hwtracing/coresight/coresight-etm4x.c linux-libre-4.4.179-gnu/drivers/hwtracing/coresight/coresight-etm4x.c
--- linux-libre-4.4.178-gnu/drivers/hwtracing/coresight/coresight-etm4x.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/hwtracing/coresight/coresight-etm4x.c	2019-04-27 03:34:03.000000000 -0400
@@ -54,7 +54,8 @@ static void etm4_os_unlock(void *info)
 
 static bool etm4_arch_supported(u8 arch)
 {
-	switch (arch) {
+	/* Mask out the minor version number */
+	switch (arch & 0xf0) {
 	case ETM_ARCH_V4:
 		break;
 	default:
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/i2c/i2c-core.c linux-libre-4.4.179-gnu/drivers/i2c/i2c-core.c
--- linux-libre-4.4.178-gnu/drivers/i2c/i2c-core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/i2c/i2c-core.c	2019-04-27 03:34:03.000000000 -0400
@@ -2936,16 +2936,16 @@ static s32 i2c_smbus_xfer_emulated(struc
 				   the underlying bus driver */
 		break;
 	case I2C_SMBUS_I2C_BLOCK_DATA:
+		if (data->block[0] > I2C_SMBUS_BLOCK_MAX) {
+			dev_err(&adapter->dev, "Invalid block %s size %d\n",
+				read_write == I2C_SMBUS_READ ? "read" : "write",
+				data->block[0]);
+			return -EINVAL;
+		}
 		if (read_write == I2C_SMBUS_READ) {
 			msg[1].len = data->block[0];
 		} else {
 			msg[0].len = data->block[0] + 1;
-			if (msg[0].len > I2C_SMBUS_BLOCK_MAX + 1) {
-				dev_err(&adapter->dev,
-					"Invalid block write size %d\n",
-					data->block[0]);
-				return -EINVAL;
-			}
 			for (i = 1; i <= data->block[0]; i++)
 				msgbuf0[i] = data->block[i];
 		}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iio/accel/kxcjk-1013.c linux-libre-4.4.179-gnu/drivers/iio/accel/kxcjk-1013.c
--- linux-libre-4.4.178-gnu/drivers/iio/accel/kxcjk-1013.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iio/accel/kxcjk-1013.c	2019-04-27 03:34:03.000000000 -0400
@@ -1343,6 +1343,8 @@ static int kxcjk1013_resume(struct devic
 
 	mutex_lock(&data->mutex);
 	ret = kxcjk1013_set_mode(data, OPERATION);
+	if (ret == 0)
+		ret = kxcjk1013_set_range(data, data->range);
 	mutex_unlock(&data->mutex);
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iio/adc/ad_sigma_delta.c linux-libre-4.4.179-gnu/drivers/iio/adc/ad_sigma_delta.c
--- linux-libre-4.4.178-gnu/drivers/iio/adc/ad_sigma_delta.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iio/adc/ad_sigma_delta.c	2019-04-27 03:34:03.000000000 -0400
@@ -121,6 +121,7 @@ static int ad_sd_read_reg_raw(struct ad_
 	if (sigma_delta->info->has_registers) {
 		data[0] = reg << sigma_delta->info->addr_shift;
 		data[0] |= sigma_delta->info->read_mask;
+		data[0] |= sigma_delta->comm;
 		spi_message_add_tail(&t[0], &m);
 	}
 	spi_message_add_tail(&t[1], &m);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iio/adc/at91_adc.c linux-libre-4.4.179-gnu/drivers/iio/adc/at91_adc.c
--- linux-libre-4.4.178-gnu/drivers/iio/adc/at91_adc.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iio/adc/at91_adc.c	2019-04-27 03:34:03.000000000 -0400
@@ -702,23 +702,29 @@ static int at91_adc_read_raw(struct iio_
 		ret = wait_event_interruptible_timeout(st->wq_data_avail,
 						       st->done,
 						       msecs_to_jiffies(1000));
-		if (ret == 0)
-			ret = -ETIMEDOUT;
-		if (ret < 0) {
-			mutex_unlock(&st->lock);
-			return ret;
-		}
-
-		*val = st->last_value;
 
+		/* Disable interrupts, regardless if adc conversion was
+		 * successful or not
+		 */
 		at91_adc_writel(st, AT91_ADC_CHDR,
 				AT91_ADC_CH(chan->channel));
 		at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel));
 
-		st->last_value = 0;
-		st->done = false;
+		if (ret > 0) {
+			/* a valid conversion took place */
+			*val = st->last_value;
+			st->last_value = 0;
+			st->done = false;
+			ret = IIO_VAL_INT;
+		} else if (ret == 0) {
+			/* conversion timeout */
+			dev_err(&idev->dev, "ADC Channel %d timeout.\n",
+				chan->channel);
+			ret = -ETIMEDOUT;
+		}
+
 		mutex_unlock(&st->lock);
-		return IIO_VAL_INT;
+		return ret;
 
 	case IIO_CHAN_INFO_SCALE:
 		*val = st->vref_mv;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iio/gyro/bmg160_core.c linux-libre-4.4.179-gnu/drivers/iio/gyro/bmg160_core.c
--- linux-libre-4.4.178-gnu/drivers/iio/gyro/bmg160_core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iio/gyro/bmg160_core.c	2019-04-27 03:34:03.000000000 -0400
@@ -519,11 +519,10 @@ static int bmg160_read_raw(struct iio_de
 		} else
 			return -EINVAL;
 	case IIO_CHAN_INFO_SCALE:
-		*val = 0;
 		switch (chan->type) {
 		case IIO_TEMP:
-			*val2 = 500000;
-			return IIO_VAL_INT_PLUS_MICRO;
+			*val = 500;
+			return IIO_VAL_INT;
 		case IIO_ANGL_VEL:
 		{
 			int i;
@@ -531,6 +530,7 @@ static int bmg160_read_raw(struct iio_de
 			for (i = 0; i < ARRAY_SIZE(bmg160_scale_table); ++i) {
 				if (bmg160_scale_table[i].dps_range ==
 							data->dps_range) {
+					*val = 0;
 					*val2 = bmg160_scale_table[i].scale;
 					return IIO_VAL_INT_PLUS_MICRO;
 				}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/infiniband/hw/mlx4/alias_GUID.c linux-libre-4.4.179-gnu/drivers/infiniband/hw/mlx4/alias_GUID.c
--- linux-libre-4.4.178-gnu/drivers/infiniband/hw/mlx4/alias_GUID.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/infiniband/hw/mlx4/alias_GUID.c	2019-04-27 03:34:03.000000000 -0400
@@ -805,8 +805,8 @@ void mlx4_ib_destroy_alias_guid_service(
 	unsigned long flags;
 
 	for (i = 0 ; i < dev->num_ports; i++) {
-		cancel_delayed_work(&dev->sriov.alias_guid.ports_guid[i].alias_guid_work);
 		det = &sriov->alias_guid.ports_guid[i];
+		cancel_delayed_work_sync(&det->alias_guid_work);
 		spin_lock_irqsave(&sriov->alias_guid.ag_work_lock, flags);
 		while (!list_empty(&det->cb_list)) {
 			cb_ctx = list_entry(det->cb_list.next,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/infiniband/hw/mlx4/cm.c linux-libre-4.4.179-gnu/drivers/infiniband/hw/mlx4/cm.c
--- linux-libre-4.4.178-gnu/drivers/infiniband/hw/mlx4/cm.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/infiniband/hw/mlx4/cm.c	2019-04-27 03:34:03.000000000 -0400
@@ -39,7 +39,7 @@
 
 #include "mlx4_ib.h"
 
-#define CM_CLEANUP_CACHE_TIMEOUT  (5 * HZ)
+#define CM_CLEANUP_CACHE_TIMEOUT  (30 * HZ)
 
 struct id_map_entry {
 	struct rb_node node;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iommu/dmar.c linux-libre-4.4.179-gnu/drivers/iommu/dmar.c
--- linux-libre-4.4.178-gnu/drivers/iommu/dmar.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iommu/dmar.c	2019-04-27 03:34:03.000000000 -0400
@@ -143,7 +143,7 @@ dmar_alloc_pci_notify_info(struct pci_de
 		for (tmp = dev; tmp; tmp = tmp->bus->self)
 			level++;
 
-	size = sizeof(*info) + level * sizeof(struct acpi_dmar_pci_path);
+	size = sizeof(*info) + level * sizeof(info->path[0]);
 	if (size <= sizeof(dmar_pci_notify_info_buf)) {
 		info = (struct dmar_pci_notify_info *)dmar_pci_notify_info_buf;
 	} else {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/iommu/intel-iommu.c linux-libre-4.4.179-gnu/drivers/iommu/intel-iommu.c
--- linux-libre-4.4.178-gnu/drivers/iommu/intel-iommu.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/iommu/intel-iommu.c	2019-04-27 03:34:03.000000000 -0400
@@ -1598,6 +1598,9 @@ static void iommu_disable_protect_mem_re
 	u32 pmen;
 	unsigned long flags;
 
+	if (!cap_plmr(iommu->cap) && !cap_phmr(iommu->cap))
+		return;
+
 	raw_spin_lock_irqsave(&iommu->register_lock, flags);
 	pmen = readl(iommu->reg + DMAR_PMEN_REG);
 	pmen &= ~DMA_PMEN_EPM;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/leds/leds-lp55xx-common.c linux-libre-4.4.179-gnu/drivers/leds/leds-lp55xx-common.c
--- linux-libre-4.4.178-gnu/drivers/leds/leds-lp55xx-common.c	2019-04-03 20:36:28.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/leds/leds-lp55xx-common.c	2019-04-28 03:21:26.000000000 -0400
@@ -200,7 +200,7 @@ static void lp55xx_firmware_loaded(const
 
 	if (!fw) {
 		dev_err(dev, "firmware request failed\n");
-		goto out;
+		return;
 	}
 
 	/* handling firmware data is chip dependent */
@@ -213,9 +213,9 @@ static void lp55xx_firmware_loaded(const
 
 	mutex_unlock(&chip->lock);
 
-out:
 	/* firmware should be released for other channel use */
 	release_firmware(chip->fw);
+	chip->fw = NULL;
 }
 
 static int lp55xx_request_firmware(struct lp55xx_chip *chip)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/md/bcache/sysfs.c linux-libre-4.4.179-gnu/drivers/md/bcache/sysfs.c
--- linux-libre-4.4.178-gnu/drivers/md/bcache/sysfs.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/md/bcache/sysfs.c	2019-04-27 03:34:03.000000000 -0400
@@ -215,7 +215,9 @@ STORE(__cached_dev)
 	d_strtoul(writeback_rate_d_term);
 	d_strtoul_nonzero(writeback_rate_p_term_inverse);
 
-	d_strtoi_h(sequential_cutoff);
+	sysfs_strtoul_clamp(sequential_cutoff,
+			    dc->sequential_cutoff,
+			    0, UINT_MAX);
 	d_strtoi_h(readahead);
 
 	if (attr == &sysfs_clear_stats)
@@ -645,8 +647,17 @@ STORE(__bch_cache_set)
 		c->error_limit = strtoul_or_return(buf) << IO_ERROR_SHIFT;
 
 	/* See count_io_errors() for why 88 */
-	if (attr == &sysfs_io_error_halflife)
-		c->error_decay = strtoul_or_return(buf) / 88;
+	if (attr == &sysfs_io_error_halflife) {
+		unsigned long v = 0;
+		ssize_t ret;
+
+		ret = strtoul_safe_clamp(buf, v, 0, UINT_MAX);
+		if (!ret) {
+			c->error_decay = v / 88;
+			return size;
+		}
+		return ret;
+	}
 
 	sysfs_strtoul(journal_delay_ms,		c->journal_delay_ms);
 	sysfs_strtoul(verify,			c->verify);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/md/bcache/sysfs.h linux-libre-4.4.179-gnu/drivers/md/bcache/sysfs.h
--- linux-libre-4.4.178-gnu/drivers/md/bcache/sysfs.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/md/bcache/sysfs.h	2019-04-27 03:34:03.000000000 -0400
@@ -80,9 +80,16 @@ do {									\
 
 #define sysfs_strtoul_clamp(file, var, min, max)			\
 do {									\
-	if (attr == &sysfs_ ## file)					\
-		return strtoul_safe_clamp(buf, var, min, max)		\
-			?: (ssize_t) size;				\
+	if (attr == &sysfs_ ## file) {					\
+		unsigned long v = 0;					\
+		ssize_t ret;						\
+		ret = strtoul_safe_clamp(buf, v, min, max);		\
+		if (!ret) {						\
+			var = v;					\
+			return size;					\
+		}							\
+		return ret;						\
+	}								\
 } while (0)
 
 #define strtoul_or_return(cp)						\
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/md/dm-thin.c linux-libre-4.4.179-gnu/drivers/md/dm-thin.c
--- linux-libre-4.4.178-gnu/drivers/md/dm-thin.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/md/dm-thin.c	2019-04-27 03:34:03.000000000 -0400
@@ -3210,6 +3210,13 @@ static int pool_ctr(struct dm_target *ti
 	as.argc = argc;
 	as.argv = argv;
 
+	/* make sure metadata and data are different devices */
+	if (!strcmp(argv[0], argv[1])) {
+		ti->error = "Error setting metadata or data device";
+		r = -EINVAL;
+		goto out_unlock;
+	}
+
 	/*
 	 * Set default pool features.
 	 */
@@ -4092,6 +4099,12 @@ static int thin_ctr(struct dm_target *ti
 	tc->sort_bio_list = RB_ROOT;
 
 	if (argc == 3) {
+		if (!strcmp(argv[0], argv[2])) {
+			ti->error = "Error setting origin device";
+			r = -EINVAL;
+			goto bad_origin_dev;
+		}
+
 		r = dm_get_device(ti, argv[2], FMODE_READ, &origin_dev);
 		if (r) {
 			ti->error = "Error opening origin device";
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/media/i2c/soc_camera/mt9m111.c linux-libre-4.4.179-gnu/drivers/media/i2c/soc_camera/mt9m111.c
--- linux-libre-4.4.178-gnu/drivers/media/i2c/soc_camera/mt9m111.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/media/i2c/soc_camera/mt9m111.c	2019-04-27 03:34:03.000000000 -0400
@@ -988,6 +988,8 @@ static int mt9m111_probe(struct i2c_clie
 	mt9m111->rect.top	= MT9M111_MIN_DARK_ROWS;
 	mt9m111->rect.width	= MT9M111_MAX_WIDTH;
 	mt9m111->rect.height	= MT9M111_MAX_HEIGHT;
+	mt9m111->width		= mt9m111->rect.width;
+	mt9m111->height		= mt9m111->rect.height;
 	mt9m111->fmt		= &mt9m111_colour_fmts[0];
 	mt9m111->lastpage	= -1;
 	mutex_init(&mt9m111->power_lock);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/media/platform/mx2_emmaprp.c linux-libre-4.4.179-gnu/drivers/media/platform/mx2_emmaprp.c
--- linux-libre-4.4.178-gnu/drivers/media/platform/mx2_emmaprp.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/media/platform/mx2_emmaprp.c	2019-04-27 03:34:03.000000000 -0400
@@ -289,7 +289,7 @@ static void emmaprp_device_run(void *pri
 {
 	struct emmaprp_ctx *ctx = priv;
 	struct emmaprp_q_data *s_q_data, *d_q_data;
-	struct vb2_buffer *src_buf, *dst_buf;
+	struct vb2_v4l2_buffer *src_buf, *dst_buf;
 	struct emmaprp_dev *pcdev = ctx->dev;
 	unsigned int s_width, s_height;
 	unsigned int d_width, d_height;
@@ -309,8 +309,8 @@ static void emmaprp_device_run(void *pri
 	d_height = d_q_data->height;
 	d_size = d_width * d_height;
 
-	p_in = vb2_dma_contig_plane_dma_addr(src_buf, 0);
-	p_out = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
+	p_in = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
+	p_out = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
 	if (!p_in || !p_out) {
 		v4l2_err(&pcdev->v4l2_dev,
 			 "Acquiring kernel pointers to buffers failed\n");
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/media/platform/s5p-g2d/g2d.c linux-libre-4.4.179-gnu/drivers/media/platform/s5p-g2d/g2d.c
--- linux-libre-4.4.178-gnu/drivers/media/platform/s5p-g2d/g2d.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/media/platform/s5p-g2d/g2d.c	2019-04-27 03:34:03.000000000 -0400
@@ -497,7 +497,7 @@ static void device_run(void *prv)
 {
 	struct g2d_ctx *ctx = prv;
 	struct g2d_dev *dev = ctx->dev;
-	struct vb2_buffer *src, *dst;
+	struct vb2_v4l2_buffer *src, *dst;
 	unsigned long flags;
 	u32 cmd = 0;
 
@@ -512,10 +512,10 @@ static void device_run(void *prv)
 	spin_lock_irqsave(&dev->ctrl_lock, flags);
 
 	g2d_set_src_size(dev, &ctx->in);
-	g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(src, 0));
+	g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0));
 
 	g2d_set_dst_size(dev, &ctx->out);
-	g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(dst, 0));
+	g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0));
 
 	g2d_set_rop4(dev, ctx->rop);
 	g2d_set_flip(dev, ctx->flip);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c linux-libre-4.4.179-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c
--- linux-libre-4.4.178-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2019-04-27 03:34:03.000000000 -0400
@@ -788,14 +788,14 @@ static void skip(struct s5p_jpeg_buffer
 static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
+	struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 	struct s5p_jpeg_buffer jpeg_buffer;
 	unsigned int word;
 	int c, x, components;
 
 	jpeg_buffer.size = 2; /* Ls */
 	jpeg_buffer.data =
-		(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sos + 2;
+		(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sos + 2;
 	jpeg_buffer.curr = 0;
 
 	word = 0;
@@ -825,14 +825,14 @@ static void exynos4_jpeg_parse_decode_h_
 static void exynos4_jpeg_parse_huff_tbl(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
+	struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 	struct s5p_jpeg_buffer jpeg_buffer;
 	unsigned int word;
 	int c, i, n, j;
 
 	for (j = 0; j < ctx->out_q.dht.n; ++j) {
 		jpeg_buffer.size = ctx->out_q.dht.len[j];
-		jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
+		jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
 				   ctx->out_q.dht.marker[j];
 		jpeg_buffer.curr = 0;
 
@@ -884,13 +884,13 @@ static void exynos4_jpeg_parse_huff_tbl(
 static void exynos4_jpeg_parse_decode_q_tbl(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
+	struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 	struct s5p_jpeg_buffer jpeg_buffer;
 	int c, x, components;
 
 	jpeg_buffer.size = ctx->out_q.sof_len;
 	jpeg_buffer.data =
-		(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sof;
+		(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sof;
 	jpeg_buffer.curr = 0;
 
 	skip(&jpeg_buffer, 5); /* P, Y, X */
@@ -915,14 +915,14 @@ static void exynos4_jpeg_parse_decode_q_
 static void exynos4_jpeg_parse_q_tbl(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
+	struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 	struct s5p_jpeg_buffer jpeg_buffer;
 	unsigned int word;
 	int c, i, j;
 
 	for (j = 0; j < ctx->out_q.dqt.n; ++j) {
 		jpeg_buffer.size = ctx->out_q.dqt.len[j];
-		jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
+		jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
 				   ctx->out_q.dqt.marker[j];
 		jpeg_buffer.curr = 0;
 
@@ -1262,13 +1262,16 @@ static int s5p_jpeg_querycap(struct file
 	return 0;
 }
 
-static int enum_fmt(struct s5p_jpeg_fmt *sjpeg_formats, int n,
+static int enum_fmt(struct s5p_jpeg_ctx *ctx,
+		    struct s5p_jpeg_fmt *sjpeg_formats, int n,
 		    struct v4l2_fmtdesc *f, u32 type)
 {
 	int i, num = 0;
+	unsigned int fmt_ver_flag = ctx->jpeg->variant->fmt_ver_flag;
 
 	for (i = 0; i < n; ++i) {
-		if (sjpeg_formats[i].flags & type) {
+		if (sjpeg_formats[i].flags & type &&
+		    sjpeg_formats[i].flags & fmt_ver_flag) {
 			/* index-th format of type type found ? */
 			if (num == f->index)
 				break;
@@ -1294,11 +1297,11 @@ static int s5p_jpeg_enum_fmt_vid_cap(str
 	struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
 
 	if (ctx->mode == S5P_JPEG_ENCODE)
-		return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
+		return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
 				SJPEG_FMT_FLAG_ENC_CAPTURE);
 
-	return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
-					SJPEG_FMT_FLAG_DEC_CAPTURE);
+	return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
+			SJPEG_FMT_FLAG_DEC_CAPTURE);
 }
 
 static int s5p_jpeg_enum_fmt_vid_out(struct file *file, void *priv,
@@ -1307,11 +1310,11 @@ static int s5p_jpeg_enum_fmt_vid_out(str
 	struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
 
 	if (ctx->mode == S5P_JPEG_ENCODE)
-		return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
+		return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
 				SJPEG_FMT_FLAG_ENC_OUTPUT);
 
-	return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
-					SJPEG_FMT_FLAG_DEC_OUTPUT);
+	return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
+			SJPEG_FMT_FLAG_DEC_OUTPUT);
 }
 
 static struct s5p_jpeg_q_data *get_q_data(struct s5p_jpeg_ctx *ctx,
@@ -2016,15 +2019,15 @@ static void s5p_jpeg_device_run(void *pr
 {
 	struct s5p_jpeg_ctx *ctx = priv;
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *src_buf, *dst_buf;
+	struct vb2_v4l2_buffer *src_buf, *dst_buf;
 	unsigned long src_addr, dst_addr, flags;
 
 	spin_lock_irqsave(&ctx->jpeg->slock, flags);
 
 	src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 	dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
-	src_addr = vb2_dma_contig_plane_dma_addr(src_buf, 0);
-	dst_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
+	src_addr = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
+	dst_addr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
 
 	s5p_jpeg_reset(jpeg->regs);
 	s5p_jpeg_poweron(jpeg->regs);
@@ -2097,7 +2100,7 @@ static void exynos4_jpeg_set_img_addr(st
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
 	struct s5p_jpeg_fmt *fmt;
-	struct vb2_buffer *vb;
+	struct vb2_v4l2_buffer *vb;
 	struct s5p_jpeg_addr jpeg_addr = {};
 	u32 pix_size, padding_bytes = 0;
 
@@ -2116,7 +2119,7 @@ static void exynos4_jpeg_set_img_addr(st
 		vb = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
 	}
 
-	jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
+	jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
 
 	if (fmt->colplanes == 2) {
 		jpeg_addr.cb = jpeg_addr.y + pix_size - padding_bytes;
@@ -2134,7 +2137,7 @@ static void exynos4_jpeg_set_img_addr(st
 static void exynos4_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb;
+	struct vb2_v4l2_buffer *vb;
 	unsigned int jpeg_addr = 0;
 
 	if (ctx->mode == S5P_JPEG_ENCODE)
@@ -2142,7 +2145,7 @@ static void exynos4_jpeg_set_jpeg_addr(s
 	else
 		vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 
-	jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
+	jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
 	if (jpeg->variant->version == SJPEG_EXYNOS5433 &&
 	    ctx->mode == S5P_JPEG_DECODE)
 		jpeg_addr += ctx->out_q.sos;
@@ -2257,7 +2260,7 @@ static void exynos3250_jpeg_set_img_addr
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
 	struct s5p_jpeg_fmt *fmt;
-	struct vb2_buffer *vb;
+	struct vb2_v4l2_buffer *vb;
 	struct s5p_jpeg_addr jpeg_addr = {};
 	u32 pix_size;
 
@@ -2271,7 +2274,7 @@ static void exynos3250_jpeg_set_img_addr
 		fmt = ctx->cap_q.fmt;
 	}
 
-	jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
+	jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
 
 	if (fmt->colplanes == 2) {
 		jpeg_addr.cb = jpeg_addr.y + pix_size;
@@ -2289,7 +2292,7 @@ static void exynos3250_jpeg_set_img_addr
 static void exynos3250_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
 {
 	struct s5p_jpeg *jpeg = ctx->jpeg;
-	struct vb2_buffer *vb;
+	struct vb2_v4l2_buffer *vb;
 	unsigned int jpeg_addr = 0;
 
 	if (ctx->mode == S5P_JPEG_ENCODE)
@@ -2297,7 +2300,7 @@ static void exynos3250_jpeg_set_jpeg_add
 	else
 		vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
 
-	jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
+	jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
 	exynos3250_jpeg_jpgadr(jpeg->regs, jpeg_addr);
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/media/platform/sh_veu.c linux-libre-4.4.179-gnu/drivers/media/platform/sh_veu.c
--- linux-libre-4.4.178-gnu/drivers/media/platform/sh_veu.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/media/platform/sh_veu.c	2019-04-27 03:34:03.000000000 -0400
@@ -277,13 +277,13 @@ static void sh_veu_process(struct sh_veu
 static void sh_veu_device_run(void *priv)
 {
 	struct sh_veu_dev *veu = priv;
-	struct vb2_buffer *src_buf, *dst_buf;
+	struct vb2_v4l2_buffer *src_buf, *dst_buf;
 
 	src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx);
 	dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx);
 
 	if (src_buf && dst_buf)
-		sh_veu_process(veu, src_buf, dst_buf);
+		sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf);
 }
 
 		/* ========== video ioctls ========== */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/mmc/host/davinci_mmc.c linux-libre-4.4.179-gnu/drivers/mmc/host/davinci_mmc.c
--- linux-libre-4.4.178-gnu/drivers/mmc/host/davinci_mmc.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/mmc/host/davinci_mmc.c	2019-04-27 03:34:03.000000000 -0400
@@ -1147,7 +1147,7 @@ static inline void mmc_davinci_cpufreq_d
 {
 }
 #endif
-static void __init init_mmcsd_host(struct mmc_davinci_host *host)
+static void init_mmcsd_host(struct mmc_davinci_host *host)
 {
 
 	mmc_davinci_reset_ctrl(host, 1);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/mmc/host/omap.c linux-libre-4.4.179-gnu/drivers/mmc/host/omap.c
--- linux-libre-4.4.178-gnu/drivers/mmc/host/omap.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/mmc/host/omap.c	2019-04-27 03:34:03.000000000 -0400
@@ -921,7 +921,7 @@ static inline void set_cmd_timeout(struc
 	reg &= ~(1 << 5);
 	OMAP_MMC_WRITE(host, SDIO, reg);
 	/* Set maximum timeout */
-	OMAP_MMC_WRITE(host, CTO, 0xff);
+	OMAP_MMC_WRITE(host, CTO, 0xfd);
 }
 
 static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/bonding/bond_main.c linux-libre-4.4.179-gnu/drivers/net/bonding/bond_main.c
--- linux-libre-4.4.178-gnu/drivers/net/bonding/bond_main.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/bonding/bond_main.c	2019-04-27 03:34:03.000000000 -0400
@@ -3067,8 +3067,12 @@ static int bond_netdev_event(struct noti
 		return NOTIFY_DONE;
 
 	if (event_dev->flags & IFF_MASTER) {
+		int ret;
+
 		netdev_dbg(event_dev, "IFF_MASTER\n");
-		return bond_master_netdev_event(event, event_dev);
+		ret = bond_master_netdev_event(event, event_dev);
+		if (ret != NOTIFY_DONE)
+			return ret;
 	}
 
 	if (event_dev->flags & IFF_SLAVE) {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/ethernet/cisco/enic/enic_main.c linux-libre-4.4.179-gnu/drivers/net/ethernet/cisco/enic/enic_main.c
--- linux-libre-4.4.178-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2019-04-27 03:34:03.000000000 -0400
@@ -120,7 +120,7 @@ static void enic_init_affinity_hint(stru
 
 	for (i = 0; i < enic->intr_count; i++) {
 		if (enic_is_err_intr(enic, i) || enic_is_notify_intr(enic, i) ||
-		    (enic->msix[i].affinity_mask &&
+		    (cpumask_available(enic->msix[i].affinity_mask) &&
 		     !cpumask_empty(enic->msix[i].affinity_mask)))
 			continue;
 		if (zalloc_cpumask_var(&enic->msix[i].affinity_mask,
@@ -149,7 +149,7 @@ static void enic_set_affinity_hint(struc
 	for (i = 0; i < enic->intr_count; i++) {
 		if (enic_is_err_intr(enic, i)		||
 		    enic_is_notify_intr(enic, i)	||
-		    !enic->msix[i].affinity_mask	||
+		    !cpumask_available(enic->msix[i].affinity_mask) ||
 		    cpumask_empty(enic->msix[i].affinity_mask))
 			continue;
 		err = irq_set_affinity_hint(enic->msix_entry[i].vector,
@@ -162,7 +162,7 @@ static void enic_set_affinity_hint(struc
 	for (i = 0; i < enic->wq_count; i++) {
 		int wq_intr = enic_msix_wq_intr(enic, i);
 
-		if (enic->msix[wq_intr].affinity_mask &&
+		if (cpumask_available(enic->msix[wq_intr].affinity_mask) &&
 		    !cpumask_empty(enic->msix[wq_intr].affinity_mask))
 			netif_set_xps_queue(enic->netdev,
 					    enic->msix[wq_intr].affinity_mask,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/ethernet/intel/e1000e/netdev.c linux-libre-4.4.179-gnu/drivers/net/ethernet/intel/e1000e/netdev.c
--- linux-libre-4.4.178-gnu/drivers/net/ethernet/intel/e1000e/netdev.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/ethernet/intel/e1000e/netdev.c	2019-04-27 03:34:03.000000000 -0400
@@ -2131,7 +2131,7 @@ static int e1000_request_msix(struct e10
 	if (strlen(netdev->name) < (IFNAMSIZ - 5))
 		snprintf(adapter->rx_ring->name,
 			 sizeof(adapter->rx_ring->name) - 1,
-			 "%s-rx-0", netdev->name);
+			 "%.14s-rx-0", netdev->name);
 	else
 		memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ);
 	err = request_irq(adapter->msix_entries[vector].vector,
@@ -2147,7 +2147,7 @@ static int e1000_request_msix(struct e10
 	if (strlen(netdev->name) < (IFNAMSIZ - 5))
 		snprintf(adapter->tx_ring->name,
 			 sizeof(adapter->tx_ring->name) - 1,
-			 "%s-tx-0", netdev->name);
+			 "%.14s-tx-0", netdev->name);
 	else
 		memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ);
 	err = request_irq(adapter->msix_entries[vector].vector,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/usb/qmi_wwan.c linux-libre-4.4.179-gnu/drivers/net/usb/qmi_wwan.c
--- linux-libre-4.4.178-gnu/drivers/net/usb/qmi_wwan.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/usb/qmi_wwan.c	2019-04-27 03:34:03.000000000 -0400
@@ -717,6 +717,7 @@ static const struct usb_device_id produc
 	{QMI_FIXED_INTF(0x19d2, 0x2002, 4)},	/* ZTE (Vodafone) K3765-Z */
 	{QMI_FIXED_INTF(0x2001, 0x7e19, 4)},	/* D-Link DWM-221 B1 */
 	{QMI_FIXED_INTF(0x2001, 0x7e35, 4)},	/* D-Link DWM-222 */
+	{QMI_FIXED_INTF(0x2020, 0x2031, 4)},	/* Olicard 600 */
 	{QMI_FIXED_INTF(0x2020, 0x2033, 4)},	/* BroadMobi BM806U */
 	{QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)},    /* Sierra Wireless MC7700 */
 	{QMI_FIXED_INTF(0x114f, 0x68a2, 8)},    /* Sierra Wireless MC7750 */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/wireless/mediatek/mt7601u/eeprom.h linux-libre-4.4.179-gnu/drivers/net/wireless/mediatek/mt7601u/eeprom.h
--- linux-libre-4.4.178-gnu/drivers/net/wireless/mediatek/mt7601u/eeprom.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/wireless/mediatek/mt7601u/eeprom.h	2019-04-27 03:34:03.000000000 -0400
@@ -17,7 +17,7 @@
 
 struct mt7601u_dev;
 
-#define MT7601U_EE_MAX_VER			0x0c
+#define MT7601U_EE_MAX_VER			0x0d
 #define MT7601U_EEPROM_SIZE			256
 
 #define MT7601U_DEFAULT_TX_POWER		6
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/wireless/rsi/rsi_common.h linux-libre-4.4.179-gnu/drivers/net/wireless/rsi/rsi_common.h
--- linux-libre-4.4.178-gnu/drivers/net/wireless/rsi/rsi_common.h	2019-04-03 20:33:22.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/wireless/rsi/rsi_common.h	2019-04-28 03:18:00.000000000 -0400
@@ -75,7 +75,6 @@ static inline int rsi_kill_thread(struct
 	atomic_inc(&handle->thread_done);
 	rsi_set_event(&handle->event);
 
-	wait_for_completion(&handle->completion);
 	return kthread_stop(handle->task);
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/net/wireless/ti/wlcore/main.c linux-libre-4.4.179-gnu/drivers/net/wireless/ti/wlcore/main.c
--- linux-libre-4.4.178-gnu/drivers/net/wireless/ti/wlcore/main.c	2019-04-03 20:34:55.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/net/wireless/ti/wlcore/main.c	2019-04-28 03:19:43.000000000 -0400
@@ -1123,8 +1123,11 @@ static int wl12xx_chip_wakeup(struct wl1
 		goto out;
 
 	ret = wl12xx_fetch_firmware(wl, plt);
-	if (ret < 0)
-		goto out;
+	if (ret < 0) {
+		kfree(wl->fw_status);
+		kfree(wl->raw_fw_status);
+		kfree(wl->tx_res_if);
+	}
 
 out:
 	return ret;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/pci/quirks.c linux-libre-4.4.179-gnu/drivers/pci/quirks.c
--- linux-libre-4.4.178-gnu/drivers/pci/quirks.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/pci/quirks.c	2019-04-27 03:34:03.000000000 -0400
@@ -3623,6 +3623,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_M
 /* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9130,
 			 quirk_dma_func1_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9170,
+			 quirk_dma_func1_alias);
 /* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c47 + c57 */
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9172,
 			 quirk_dma_func1_alias);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/regulator/act8865-regulator.c linux-libre-4.4.179-gnu/drivers/regulator/act8865-regulator.c
--- linux-libre-4.4.178-gnu/drivers/regulator/act8865-regulator.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/regulator/act8865-regulator.c	2019-04-27 03:34:03.000000000 -0400
@@ -131,7 +131,7 @@
  * ACT8865 voltage number
  */
 #define	ACT8865_VOLTAGE_NUM	64
-#define ACT8600_SUDCDC_VOLTAGE_NUM	255
+#define ACT8600_SUDCDC_VOLTAGE_NUM	256
 
 struct act8865 {
 	struct regmap *regmap;
@@ -154,7 +154,8 @@ static const struct regulator_linear_ran
 	REGULATOR_LINEAR_RANGE(3000000, 0, 63, 0),
 	REGULATOR_LINEAR_RANGE(3000000, 64, 159, 100000),
 	REGULATOR_LINEAR_RANGE(12600000, 160, 191, 200000),
-	REGULATOR_LINEAR_RANGE(19000000, 191, 255, 400000),
+	REGULATOR_LINEAR_RANGE(19000000, 192, 247, 400000),
+	REGULATOR_LINEAR_RANGE(41400000, 248, 255, 0),
 };
 
 static struct regulator_ops act8865_ops = {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/scsi/megaraid/megaraid_sas_base.c linux-libre-4.4.179-gnu/drivers/scsi/megaraid/megaraid_sas_base.c
--- linux-libre-4.4.178-gnu/drivers/scsi/megaraid/megaraid_sas_base.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/scsi/megaraid/megaraid_sas_base.c	2019-04-27 03:34:03.000000000 -0400
@@ -3847,6 +3847,7 @@ int megasas_alloc_cmds(struct megasas_in
 	if (megasas_create_frame_pool(instance)) {
 		dev_printk(KERN_DEBUG, &instance->pdev->dev, "Error creating frame DMA pool\n");
 		megasas_free_cmds(instance);
+		return -ENOMEM;
 	}
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/scsi/scsi_scan.c linux-libre-4.4.179-gnu/drivers/scsi/scsi_scan.c
--- linux-libre-4.4.178-gnu/drivers/scsi/scsi_scan.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/scsi/scsi_scan.c	2019-04-27 03:34:03.000000000 -0400
@@ -217,7 +217,7 @@ static struct scsi_device *scsi_alloc_sd
 	extern void scsi_requeue_run_queue(struct work_struct *work);
 
 	sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size,
-		       GFP_ATOMIC);
+		       GFP_KERNEL);
 	if (!sdev)
 		goto out;
 
@@ -791,7 +791,7 @@ static int scsi_add_lun(struct scsi_devi
 	 */
 	sdev->inquiry = kmemdup(inq_result,
 				max_t(size_t, sdev->inquiry_len, 36),
-				GFP_ATOMIC);
+				GFP_KERNEL);
 	if (sdev->inquiry == NULL)
 		return SCSI_SCAN_NO_RESPONSE;
 
@@ -1085,7 +1085,7 @@ static int scsi_probe_and_add_lun(struct
 	if (!sdev)
 		goto out;
 
-	result = kmalloc(result_len, GFP_ATOMIC |
+	result = kmalloc(result_len, GFP_KERNEL |
 			((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
 	if (!result)
 		goto out_free_sdev;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/soc/qcom/qcom_gsbi.c linux-libre-4.4.179-gnu/drivers/soc/qcom/qcom_gsbi.c
--- linux-libre-4.4.178-gnu/drivers/soc/qcom/qcom_gsbi.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/soc/qcom/qcom_gsbi.c	2019-04-27 03:34:03.000000000 -0400
@@ -138,7 +138,7 @@ static int gsbi_probe(struct platform_de
 	struct resource *res;
 	void __iomem *base;
 	struct gsbi_info *gsbi;
-	int i;
+	int i, ret;
 	u32 mask, gsbi_num;
 	const struct crci_config *config = NULL;
 
@@ -221,7 +221,10 @@ static int gsbi_probe(struct platform_de
 
 	platform_set_drvdata(pdev, gsbi);
 
-	return of_platform_populate(node, NULL, NULL, &pdev->dev);
+	ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
+	if (ret)
+		clk_disable_unprepare(gsbi->hclk);
+	return ret;
 }
 
 static int gsbi_remove(struct platform_device *pdev)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/soc/tegra/fuse/fuse-tegra.c linux-libre-4.4.179-gnu/drivers/soc/tegra/fuse/fuse-tegra.c
--- linux-libre-4.4.178-gnu/drivers/soc/tegra/fuse/fuse-tegra.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/soc/tegra/fuse/fuse-tegra.c	2019-04-27 03:34:03.000000000 -0400
@@ -131,13 +131,17 @@ static int tegra_fuse_probe(struct platf
 	/* take over the memory region from the early initialization */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	fuse->base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(fuse->base))
-		return PTR_ERR(fuse->base);
+	if (IS_ERR(fuse->base)) {
+		err = PTR_ERR(fuse->base);
+		fuse->base = base;
+		return err;
+	}
 
 	fuse->clk = devm_clk_get(&pdev->dev, "fuse");
 	if (IS_ERR(fuse->clk)) {
 		dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
 			PTR_ERR(fuse->clk));
+		fuse->base = base;
 		return PTR_ERR(fuse->clk);
 	}
 
@@ -146,8 +150,10 @@ static int tegra_fuse_probe(struct platf
 
 	if (fuse->soc->probe) {
 		err = fuse->soc->probe(fuse);
-		if (err < 0)
+		if (err < 0) {
+			fuse->base = base;
 			return err;
+		}
 	}
 
 	if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/staging/comedi/drivers/ni_usb6501.c linux-libre-4.4.179-gnu/drivers/staging/comedi/drivers/ni_usb6501.c
--- linux-libre-4.4.178-gnu/drivers/staging/comedi/drivers/ni_usb6501.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/staging/comedi/drivers/ni_usb6501.c	2019-04-27 03:34:03.000000000 -0400
@@ -472,10 +472,8 @@ static int ni6501_alloc_usb_buffers(stru
 
 	size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
 	devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
-	if (!devpriv->usb_tx_buf) {
-		kfree(devpriv->usb_rx_buf);
+	if (!devpriv->usb_tx_buf)
 		return -ENOMEM;
-	}
 
 	return 0;
 }
@@ -527,6 +525,9 @@ static int ni6501_auto_attach(struct com
 	if (!devpriv)
 		return -ENOMEM;
 
+	mutex_init(&devpriv->mut);
+	usb_set_intfdata(intf, devpriv);
+
 	ret = ni6501_find_endpoints(dev);
 	if (ret)
 		return ret;
@@ -535,9 +536,6 @@ static int ni6501_auto_attach(struct com
 	if (ret)
 		return ret;
 
-	mutex_init(&devpriv->mut);
-	usb_set_intfdata(intf, devpriv);
-
 	ret = comedi_alloc_subdevices(dev, 2);
 	if (ret)
 		return ret;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/staging/comedi/drivers/vmk80xx.c linux-libre-4.4.179-gnu/drivers/staging/comedi/drivers/vmk80xx.c
--- linux-libre-4.4.178-gnu/drivers/staging/comedi/drivers/vmk80xx.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/staging/comedi/drivers/vmk80xx.c	2019-04-27 03:34:03.000000000 -0400
@@ -691,10 +691,8 @@ static int vmk80xx_alloc_usb_buffers(str
 
 	size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
 	devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
-	if (!devpriv->usb_tx_buf) {
-		kfree(devpriv->usb_rx_buf);
+	if (!devpriv->usb_tx_buf)
 		return -ENOMEM;
-	}
 
 	return 0;
 }
@@ -809,6 +807,8 @@ static int vmk80xx_auto_attach(struct co
 
 	devpriv->model = board->model;
 
+	sema_init(&devpriv->limit_sem, 8);
+
 	ret = vmk80xx_find_usb_endpoints(dev);
 	if (ret)
 		return ret;
@@ -817,8 +817,6 @@ static int vmk80xx_auto_attach(struct co
 	if (ret)
 		return ret;
 
-	sema_init(&devpriv->limit_sem, 8);
-
 	usb_set_intfdata(intf, devpriv);
 
 	if (devpriv->model == VMK8055_MODEL)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/thermal/int340x_thermal/int3400_thermal.c linux-libre-4.4.179-gnu/drivers/thermal/int340x_thermal/int3400_thermal.c
--- linux-libre-4.4.178-gnu/drivers/thermal/int340x_thermal/int3400_thermal.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/thermal/int340x_thermal/int3400_thermal.c	2019-04-27 03:34:03.000000000 -0400
@@ -20,6 +20,13 @@ enum int3400_thermal_uuid {
 	INT3400_THERMAL_PASSIVE_1,
 	INT3400_THERMAL_ACTIVE,
 	INT3400_THERMAL_CRITICAL,
+	INT3400_THERMAL_ADAPTIVE_PERFORMANCE,
+	INT3400_THERMAL_EMERGENCY_CALL_MODE,
+	INT3400_THERMAL_PASSIVE_2,
+	INT3400_THERMAL_POWER_BOSS,
+	INT3400_THERMAL_VIRTUAL_SENSOR,
+	INT3400_THERMAL_COOLING_MODE,
+	INT3400_THERMAL_HARDWARE_DUTY_CYCLING,
 	INT3400_THERMAL_MAXIMUM_UUID,
 };
 
@@ -27,6 +34,13 @@ static u8 *int3400_thermal_uuids[INT3400
 	"42A441D6-AE6A-462b-A84B-4A8CE79027D3",
 	"3A95C389-E4B8-4629-A526-C52C88626BAE",
 	"97C68AE7-15FA-499c-B8C9-5DA81D606E0A",
+	"63BE270F-1C11-48FD-A6F7-3AF253FF3E2D",
+	"5349962F-71E6-431D-9AE8-0A635B710AEE",
+	"9E04115A-AE87-4D1C-9500-0F3E340BFE75",
+	"F5A35014-C209-46A4-993A-EB56DE7530A1",
+	"6ED722A7-9240-48A5-B479-31EEF723D7CF",
+	"16CAF1B7-DD38-40ED-B1C1-1B8A1913D531",
+	"BE84BABF-C4D4-403D-B495-3128FD44dAC1",
 };
 
 struct int3400_thermal_priv {
@@ -271,10 +285,9 @@ static int int3400_thermal_probe(struct
 
 	platform_set_drvdata(pdev, priv);
 
-	if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
-		int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
-		int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
-	}
+	int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
+	int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
+
 	priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
 						priv, &int3400_thermal_ops,
 						&int3400_thermal_params, 0, 0);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/Kconfig linux-libre-4.4.179-gnu/drivers/tty/Kconfig
--- linux-libre-4.4.178-gnu/drivers/tty/Kconfig	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/Kconfig	2019-04-27 03:34:03.000000000 -0400
@@ -466,4 +466,27 @@ config MIPS_EJTAG_FDC_KGDB_CHAN
 	help
 	  FDC channel number to use for KGDB.
 
+config LDISC_AUTOLOAD
+	bool "Automatically load TTY Line Disciplines"
+	default y
+	help
+	  Historically the kernel has always automatically loaded any
+	  line discipline that is in a kernel module when a user asks
+	  for it to be loaded with the TIOCSETD ioctl, or through other
+	  means.  This is not always the best thing to do on systems
+	  where you know you will not be using some of the more
+	  "ancient" line disciplines, so prevent the kernel from doing
+	  this unless the request is coming from a process with the
+	  CAP_SYS_MODULE permissions.
+
+	  Say 'Y' here if you trust your userspace users to do the right
+	  thing, or if you have only provided the line disciplines that
+	  you know you will be using, or if you wish to continue to use
+	  the traditional method of on-demand loading of these modules
+	  by any user.
+
+	  This functionality can be changed at runtime with the
+	  dev.tty.ldisc_autoload sysctl, this configuration option will
+	  only set the default value of this functionality.
+
 endif # TTY
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/serial/atmel_serial.c linux-libre-4.4.179-gnu/drivers/tty/serial/atmel_serial.c
--- linux-libre-4.4.178-gnu/drivers/tty/serial/atmel_serial.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/serial/atmel_serial.c	2019-04-27 03:34:03.000000000 -0400
@@ -169,6 +169,8 @@ struct atmel_uart_port {
 	unsigned int		pending_status;
 	spinlock_t		lock_suspended;
 
+	bool			hd_start_rx;	/* can start RX during half-duplex operation */
+
 	int (*prepare_rx)(struct uart_port *port);
 	int (*prepare_tx)(struct uart_port *port);
 	void (*schedule_rx)(struct uart_port *port);
@@ -237,6 +239,12 @@ static inline void atmel_uart_write_char
 
 #endif
 
+static inline int atmel_uart_is_half_duplex(struct uart_port *port)
+{
+	return (port->rs485.flags & SER_RS485_ENABLED) &&
+		!(port->rs485.flags & SER_RS485_RX_DURING_TX);
+}
+
 #ifdef CONFIG_SERIAL_ATMEL_PDC
 static bool atmel_use_pdc_rx(struct uart_port *port)
 {
@@ -481,9 +489,9 @@ static void atmel_stop_tx(struct uart_po
 	/* Disable interrupts */
 	atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
 
-	if ((port->rs485.flags & SER_RS485_ENABLED) &&
-	    !(port->rs485.flags & SER_RS485_RX_DURING_TX))
+	if (atmel_uart_is_half_duplex(port))
 		atmel_start_rx(port);
+
 }
 
 /*
@@ -500,8 +508,7 @@ static void atmel_start_tx(struct uart_p
 		return;
 
 	if (atmel_use_pdc_tx(port) || atmel_use_dma_tx(port))
-		if ((port->rs485.flags & SER_RS485_ENABLED) &&
-		    !(port->rs485.flags & SER_RS485_RX_DURING_TX))
+		if (atmel_uart_is_half_duplex(port))
 			atmel_stop_rx(port);
 
 	if (atmel_use_pdc_tx(port))
@@ -810,10 +817,14 @@ static void atmel_complete_tx_dma(void *
 	 */
 	if (!uart_circ_empty(xmit))
 		tasklet_schedule(&atmel_port->tasklet);
-	else if ((port->rs485.flags & SER_RS485_ENABLED) &&
-		 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
-		/* DMA done, stop TX, start RX for RS485 */
-		atmel_start_rx(port);
+	else if (atmel_uart_is_half_duplex(port)) {
+		/*
+		 * DMA done, re-enable TXEMPTY and signal that we can stop
+		 * TX and start RX for RS485
+		 */
+		atmel_port->hd_start_rx = true;
+		atmel_uart_writel(port, ATMEL_US_IER,
+				  atmel_port->tx_done_mask);
 	}
 
 	spin_unlock_irqrestore(&port->lock, flags);
@@ -1253,9 +1264,20 @@ atmel_handle_transmit(struct uart_port *
 	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 
 	if (pending & atmel_port->tx_done_mask) {
-		/* Either PDC or interrupt transmission */
 		atmel_uart_writel(port, ATMEL_US_IDR,
 				  atmel_port->tx_done_mask);
+
+		/* Start RX if flag was set and FIFO is empty */
+		if (atmel_port->hd_start_rx) {
+			if (!(atmel_uart_readl(port, ATMEL_US_CSR)
+					& ATMEL_US_TXEMPTY))
+				dev_warn(port->dev, "Should start RX, but TX fifo is not empty\n");
+
+			atmel_port->hd_start_rx = false;
+			atmel_start_rx(port);
+			return;
+		}
+
 		tasklet_schedule(&atmel_port->tasklet);
 	}
 }
@@ -1388,8 +1410,7 @@ static void atmel_tx_pdc(struct uart_por
 		atmel_uart_writel(port, ATMEL_US_IER,
 				  atmel_port->tx_done_mask);
 	} else {
-		if ((port->rs485.flags & SER_RS485_ENABLED) &&
-		    !(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
+		if (atmel_uart_is_half_duplex(port)) {
 			/* DMA done, stop TX, start RX for RS485 */
 			atmel_start_rx(port);
 		}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/serial/xilinx_uartps.c linux-libre-4.4.179-gnu/drivers/tty/serial/xilinx_uartps.c
--- linux-libre-4.4.178-gnu/drivers/tty/serial/xilinx_uartps.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/serial/xilinx_uartps.c	2019-04-27 03:34:03.000000000 -0400
@@ -1145,7 +1145,7 @@ static void cdns_uart_console_write(stru
  *
  * Return: 0 on success, negative errno otherwise.
  */
-static int __init cdns_uart_console_setup(struct console *co, char *options)
+static int cdns_uart_console_setup(struct console *co, char *options)
 {
 	struct uart_port *port = &cdns_uart_port[co->index];
 	int baud = 9600;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/tty_buffer.c linux-libre-4.4.179-gnu/drivers/tty/tty_buffer.c
--- linux-libre-4.4.178-gnu/drivers/tty/tty_buffer.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/tty_buffer.c	2019-04-27 03:34:03.000000000 -0400
@@ -25,7 +25,7 @@
  * Byte threshold to limit memory consumption for flip buffers.
  * The actual memory limit is > 2x this amount.
  */
-#define TTYB_DEFAULT_MEM_LIMIT	65536
+#define TTYB_DEFAULT_MEM_LIMIT	(640 * 1024UL)
 
 /*
  * We default to dicing tty buffer allocations to this many characters
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/tty_io.c linux-libre-4.4.179-gnu/drivers/tty/tty_io.c
--- linux-libre-4.4.178-gnu/drivers/tty/tty_io.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/tty_io.c	2019-04-27 03:34:03.000000000 -0400
@@ -513,6 +513,8 @@ void proc_clear_tty(struct task_struct *
 	tty_kref_put(tty);
 }
 
+extern void tty_sysctl_init(void);
+
 /**
  * proc_set_tty -  set the controlling terminal
  *
@@ -3689,6 +3691,7 @@ void console_sysfs_notify(void)
  */
 int __init tty_init(void)
 {
+	tty_sysctl_init();
 	cdev_init(&tty_cdev, &tty_fops);
 	if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
 	    register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/tty/tty_ldisc.c linux-libre-4.4.179-gnu/drivers/tty/tty_ldisc.c
--- linux-libre-4.4.178-gnu/drivers/tty/tty_ldisc.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/tty/tty_ldisc.c	2019-04-27 03:34:03.000000000 -0400
@@ -148,6 +148,13 @@ static void put_ldops(struct tty_ldisc_o
  *		takes tty_ldiscs_lock to guard against ldisc races
  */
 
+#if defined(CONFIG_LDISC_AUTOLOAD)
+	#define INITIAL_AUTOLOAD_STATE	1
+#else
+	#define INITIAL_AUTOLOAD_STATE	0
+#endif
+static int tty_ldisc_autoload = INITIAL_AUTOLOAD_STATE;
+
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -162,6 +169,8 @@ static struct tty_ldisc *tty_ldisc_get(s
 	 */
 	ldops = get_ldops(disc);
 	if (IS_ERR(ldops)) {
+		if (!capable(CAP_SYS_MODULE) && !tty_ldisc_autoload)
+			return ERR_PTR(-EPERM);
 		request_module("tty-ldisc-%d", disc);
 		ldops = get_ldops(disc);
 		if (IS_ERR(ldops))
@@ -830,3 +839,41 @@ void tty_ldisc_begin(void)
 	/* Setup the default TTY line discipline. */
 	(void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY);
 }
+
+static int zero;
+static int one = 1;
+static struct ctl_table tty_table[] = {
+	{
+		.procname	= "ldisc_autoload",
+		.data		= &tty_ldisc_autoload,
+		.maxlen		= sizeof(tty_ldisc_autoload),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec,
+		.extra1		= &zero,
+		.extra2		= &one,
+	},
+	{ }
+};
+
+static struct ctl_table tty_dir_table[] = {
+	{
+		.procname	= "tty",
+		.mode		= 0555,
+		.child		= tty_table,
+	},
+	{ }
+};
+
+static struct ctl_table tty_root_table[] = {
+	{
+		.procname	= "dev",
+		.mode		= 0555,
+		.child		= tty_dir_table,
+	},
+	{ }
+};
+
+void tty_sysctl_init(void)
+{
+	register_sysctl_table(tty_root_table);
+}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/usb/chipidea/core.c linux-libre-4.4.179-gnu/drivers/usb/chipidea/core.c
--- linux-libre-4.4.178-gnu/drivers/usb/chipidea/core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/usb/chipidea/core.c	2019-04-27 03:34:03.000000000 -0400
@@ -913,8 +913,15 @@ static int ci_hdrc_probe(struct platform
 	} else if (ci->platdata->usb_phy) {
 		ci->usb_phy = ci->platdata->usb_phy;
 	} else {
+		ci->usb_phy = devm_usb_get_phy_by_phandle(dev->parent, "phys",
+							  0);
 		ci->phy = devm_phy_get(dev->parent, "usb-phy");
-		ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
+
+		/* Fallback to grabbing any registered USB2 PHY */
+		if (IS_ERR(ci->usb_phy) &&
+		    PTR_ERR(ci->usb_phy) != -EPROBE_DEFER)
+			ci->usb_phy = devm_usb_get_phy(dev->parent,
+						       USB_PHY_TYPE_USB2);
 
 		/* if both generic PHY and USB PHY layers aren't enabled */
 		if (PTR_ERR(ci->phy) == -ENOSYS &&
diff -druNp --no-dereference linux-libre-4.4.178-gnu/drivers/video/fbdev/core/fbmem.c linux-libre-4.4.179-gnu/drivers/video/fbdev/core/fbmem.c
--- linux-libre-4.4.178-gnu/drivers/video/fbdev/core/fbmem.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/drivers/video/fbdev/core/fbmem.c	2019-04-27 03:34:03.000000000 -0400
@@ -425,6 +425,9 @@ static void fb_do_show_logo(struct fb_in
 {
 	unsigned int x;
 
+	if (image->width > info->var.xres || image->height > info->var.yres)
+		return;
+
 	if (rotate == FB_ROTATE_UR) {
 		for (x = 0;
 		     x < num && image->dx + image->width <= info->var.xres;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/9p/v9fs.c linux-libre-4.4.179-gnu/fs/9p/v9fs.c
--- linux-libre-4.4.178-gnu/fs/9p/v9fs.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/9p/v9fs.c	2019-04-27 03:34:03.000000000 -0400
@@ -59,6 +59,8 @@ enum {
 	Opt_cache_loose, Opt_fscache, Opt_mmap,
 	/* Access options */
 	Opt_access, Opt_posixacl,
+	/* Lock timeout option */
+	Opt_locktimeout,
 	/* Error token */
 	Opt_err
 };
@@ -78,6 +80,7 @@ static const match_table_t tokens = {
 	{Opt_cachetag, "cachetag=%s"},
 	{Opt_access, "access=%s"},
 	{Opt_posixacl, "posixacl"},
+	{Opt_locktimeout, "locktimeout=%u"},
 	{Opt_err, NULL}
 };
 
@@ -126,6 +129,7 @@ static int v9fs_parse_options(struct v9f
 #ifdef CONFIG_9P_FSCACHE
 	v9ses->cachetag = NULL;
 #endif
+	v9ses->session_lock_timeout = P9_LOCK_TIMEOUT;
 
 	if (!opts)
 		return 0;
@@ -298,6 +302,23 @@ static int v9fs_parse_options(struct v9f
 #endif
 			break;
 
+		case Opt_locktimeout:
+			r = match_int(&args[0], &option);
+			if (r < 0) {
+				p9_debug(P9_DEBUG_ERROR,
+					 "integer field, but no integer?\n");
+				ret = r;
+				continue;
+			}
+			if (option < 1) {
+				p9_debug(P9_DEBUG_ERROR,
+					 "locktimeout must be a greater than zero integer.\n");
+				ret = -EINVAL;
+				continue;
+			}
+			v9ses->session_lock_timeout = (long)option * HZ;
+			break;
+
 		default:
 			continue;
 		}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/9p/v9fs.h linux-libre-4.4.179-gnu/fs/9p/v9fs.h
--- linux-libre-4.4.178-gnu/fs/9p/v9fs.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/9p/v9fs.h	2019-04-27 03:34:03.000000000 -0400
@@ -116,6 +116,7 @@ struct v9fs_session_info {
 	struct list_head slist; /* list of sessions registered with v9fs */
 	struct backing_dev_info bdi;
 	struct rw_semaphore rename_sem;
+	long session_lock_timeout; /* retry interval for blocking locks */
 };
 
 /* cache_validity flags */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/9p/vfs_dir.c linux-libre-4.4.179-gnu/fs/9p/vfs_dir.c
--- linux-libre-4.4.178-gnu/fs/9p/vfs_dir.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/9p/vfs_dir.c	2019-04-27 03:34:03.000000000 -0400
@@ -105,7 +105,6 @@ static int v9fs_dir_readdir(struct file
 	int err = 0;
 	struct p9_fid *fid;
 	int buflen;
-	int reclen = 0;
 	struct p9_rdir *rdir;
 	struct kvec kvec;
 
@@ -138,11 +137,10 @@ static int v9fs_dir_readdir(struct file
 		while (rdir->head < rdir->tail) {
 			err = p9stat_read(fid->clnt, rdir->buf + rdir->head,
 					  rdir->tail - rdir->head, &st);
-			if (err) {
+			if (err <= 0) {
 				p9_debug(P9_DEBUG_VFS, "returned %d\n", err);
 				return -EIO;
 			}
-			reclen = st.size+2;
 
 			over = !dir_emit(ctx, st.name, strlen(st.name),
 					 v9fs_qid2ino(&st.qid), dt_type(&st));
@@ -150,8 +148,8 @@ static int v9fs_dir_readdir(struct file
 			if (over)
 				return 0;
 
-			rdir->head += reclen;
-			ctx->pos += reclen;
+			rdir->head += err;
+			ctx->pos += err;
 		}
 	}
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/9p/vfs_file.c linux-libre-4.4.179-gnu/fs/9p/vfs_file.c
--- linux-libre-4.4.178-gnu/fs/9p/vfs_file.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/9p/vfs_file.c	2019-04-27 03:34:03.000000000 -0400
@@ -154,6 +154,7 @@ static int v9fs_file_do_lock(struct file
 	uint8_t status = P9_LOCK_ERROR;
 	int res = 0;
 	unsigned char fl_type;
+	struct v9fs_session_info *v9ses;
 
 	fid = filp->private_data;
 	BUG_ON(fid == NULL);
@@ -189,6 +190,8 @@ static int v9fs_file_do_lock(struct file
 	if (IS_SETLKW(cmd))
 		flock.flags = P9_LOCK_FLAGS_BLOCK;
 
+	v9ses = v9fs_inode2v9ses(file_inode(filp));
+
 	/*
 	 * if its a blocked request and we get P9_LOCK_BLOCKED as the status
 	 * for lock request, keep on trying
@@ -202,7 +205,8 @@ static int v9fs_file_do_lock(struct file
 			break;
 		if (status == P9_LOCK_BLOCKED && !IS_SETLKW(cmd))
 			break;
-		if (schedule_timeout_interruptible(P9_LOCK_TIMEOUT) != 0)
+		if (schedule_timeout_interruptible(v9ses->session_lock_timeout)
+				!= 0)
 			break;
 		/*
 		 * p9_client_lock_dotl overwrites flock.client_id with the
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/binfmt_elf.c linux-libre-4.4.179-gnu/fs/binfmt_elf.c
--- linux-libre-4.4.178-gnu/fs/binfmt_elf.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/binfmt_elf.c	2019-04-27 03:34:03.000000000 -0400
@@ -850,6 +850,7 @@ static int load_elf_binary(struct linux_
 		current->flags |= PF_RANDOMIZE;
 
 	setup_new_exec(bprm);
+	install_exec_creds(bprm);
 
 	/* Do this so that we can load the interpreter, if need be.  We will
 	   change some of these later */
@@ -1084,7 +1085,6 @@ static int load_elf_binary(struct linux_
 		goto out;
 #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
 
-	install_exec_creds(bprm);
 	retval = create_elf_tables(bprm, &loc->elf_ex,
 			  load_addr, interp_load_addr);
 	if (retval < 0)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/buffer.c linux-libre-4.4.179-gnu/fs/buffer.c
--- linux-libre-4.4.178-gnu/fs/buffer.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/buffer.c	2019-04-27 03:34:03.000000000 -0400
@@ -2985,6 +2985,13 @@ void guard_bio_eod(int rw, struct bio *b
 	/* Uhhuh. We've got a bio that straddles the device size! */
 	truncated_bytes = bio->bi_iter.bi_size - (maxsector << 9);
 
+	/*
+	 * The bio contains more than one segment which spans EOD, just return
+	 * and let IO layer turn it into an EIO
+	 */
+	if (truncated_bytes > bvec->bv_len)
+		return;
+
 	/* Truncate the bio.. */
 	bio->bi_iter.bi_size -= truncated_bytes;
 	bvec->bv_len -= truncated_bytes;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/cifs_dfs_ref.c linux-libre-4.4.179-gnu/fs/cifs/cifs_dfs_ref.c
--- linux-libre-4.4.178-gnu/fs/cifs/cifs_dfs_ref.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/cifs_dfs_ref.c	2019-04-27 03:34:03.000000000 -0400
@@ -266,9 +266,9 @@ static void dump_referral(const struct d
 {
 	cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name);
 	cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name);
-	cifs_dbg(FYI, "DFS: fl: %hd, srv_type: %hd\n",
+	cifs_dbg(FYI, "DFS: fl: %d, srv_type: %d\n",
 		 ref->flags, ref->server_type);
-	cifs_dbg(FYI, "DFS: ref_flags: %hd, path_consumed: %hd\n",
+	cifs_dbg(FYI, "DFS: ref_flags: %d, path_consumed: %d\n",
 		 ref->ref_flag, ref->path_consumed);
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/connect.c linux-libre-4.4.179-gnu/fs/cifs/connect.c
--- linux-libre-4.4.178-gnu/fs/cifs/connect.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/connect.c	2019-04-27 03:34:03.000000000 -0400
@@ -1255,6 +1255,11 @@ cifs_parse_devname(const char *devname,
 	const char *delims = "/\\";
 	size_t len;
 
+	if (unlikely(!devname || !*devname)) {
+		cifs_dbg(VFS, "Device name not specified.\n");
+		return -EINVAL;
+	}
+
 	/* make sure we have a valid UNC double delimiter prefix */
 	len = strspn(devname, delims);
 	if (len != 2)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/file.c linux-libre-4.4.179-gnu/fs/cifs/file.c
--- linux-libre-4.4.178-gnu/fs/cifs/file.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/file.c	2019-04-27 03:34:03.000000000 -0400
@@ -1574,8 +1574,20 @@ cifs_setlk(struct file *file, struct fil
 		rc = server->ops->mand_unlock_range(cfile, flock, xid);
 
 out:
-	if (flock->fl_flags & FL_POSIX && !rc)
+	if (flock->fl_flags & FL_POSIX) {
+		/*
+		 * If this is a request to remove all locks because we
+		 * are closing the file, it doesn't matter if the
+		 * unlocking failed as both cifs.ko and the SMB server
+		 * remove the lock on file close
+		 */
+		if (rc) {
+			cifs_dbg(VFS, "%s failed rc=%d\n", __func__, rc);
+			if (!(flock->fl_flags & FL_CLOSE))
+				return rc;
+		}
 		rc = locks_lock_file_wait(file, flock);
+	}
 	return rc;
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/inode.c linux-libre-4.4.179-gnu/fs/cifs/inode.c
--- linux-libre-4.4.178-gnu/fs/cifs/inode.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/inode.c	2019-04-27 03:34:03.000000000 -0400
@@ -759,43 +759,50 @@ cifs_get_inode_info(struct inode **inode
 	} else if ((rc == -EACCES) && backup_cred(cifs_sb) &&
 		   (strcmp(server->vals->version_string, SMB1_VERSION_STRING)
 		      == 0)) {
-			/*
-			 * For SMB2 and later the backup intent flag is already
-			 * sent if needed on open and there is no path based
-			 * FindFirst operation to use to retry with
-			 */
+		/*
+		 * For SMB2 and later the backup intent flag is already
+		 * sent if needed on open and there is no path based
+		 * FindFirst operation to use to retry with
+		 */
 
-			srchinf = kzalloc(sizeof(struct cifs_search_info),
-						GFP_KERNEL);
-			if (srchinf == NULL) {
-				rc = -ENOMEM;
-				goto cgii_exit;
-			}
+		srchinf = kzalloc(sizeof(struct cifs_search_info),
+					GFP_KERNEL);
+		if (srchinf == NULL) {
+			rc = -ENOMEM;
+			goto cgii_exit;
+		}
 
-			srchinf->endOfSearch = false;
+		srchinf->endOfSearch = false;
+		if (tcon->unix_ext)
+			srchinf->info_level = SMB_FIND_FILE_UNIX;
+		else if ((tcon->ses->capabilities &
+			 tcon->ses->server->vals->cap_nt_find) == 0)
+			srchinf->info_level = SMB_FIND_FILE_INFO_STANDARD;
+		else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)
 			srchinf->info_level = SMB_FIND_FILE_ID_FULL_DIR_INFO;
+		else /* no srvino useful for fallback to some netapp */
+			srchinf->info_level = SMB_FIND_FILE_DIRECTORY_INFO;
 
-			srchflgs = CIFS_SEARCH_CLOSE_ALWAYS |
-					CIFS_SEARCH_CLOSE_AT_END |
-					CIFS_SEARCH_BACKUP_SEARCH;
+		srchflgs = CIFS_SEARCH_CLOSE_ALWAYS |
+				CIFS_SEARCH_CLOSE_AT_END |
+				CIFS_SEARCH_BACKUP_SEARCH;
 
-			rc = CIFSFindFirst(xid, tcon, full_path,
-				cifs_sb, NULL, srchflgs, srchinf, false);
-			if (!rc) {
-				data =
-				(FILE_ALL_INFO *)srchinf->srch_entries_start;
+		rc = CIFSFindFirst(xid, tcon, full_path,
+			cifs_sb, NULL, srchflgs, srchinf, false);
+		if (!rc) {
+			data = (FILE_ALL_INFO *)srchinf->srch_entries_start;
 
-				cifs_dir_info_to_fattr(&fattr,
-				(FILE_DIRECTORY_INFO *)data, cifs_sb);
-				fattr.cf_uniqueid = le64_to_cpu(
-				((SEARCH_ID_FULL_DIR_INFO *)data)->UniqueId);
-				validinum = true;
+			cifs_dir_info_to_fattr(&fattr,
+			(FILE_DIRECTORY_INFO *)data, cifs_sb);
+			fattr.cf_uniqueid = le64_to_cpu(
+			((SEARCH_ID_FULL_DIR_INFO *)data)->UniqueId);
+			validinum = true;
 
-				cifs_buf_release(srchinf->ntwrk_buf_start);
-			}
-			kfree(srchinf);
-			if (rc)
-				goto cgii_exit;
+			cifs_buf_release(srchinf->ntwrk_buf_start);
+		}
+		kfree(srchinf);
+		if (rc)
+			goto cgii_exit;
 	} else
 		goto cgii_exit;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/smb1ops.c linux-libre-4.4.179-gnu/fs/cifs/smb1ops.c
--- linux-libre-4.4.178-gnu/fs/cifs/smb1ops.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/smb1ops.c	2019-04-27 03:34:03.000000000 -0400
@@ -305,7 +305,7 @@ coalesce_t2(char *second_buf, struct smb
 	remaining = tgt_total_cnt - total_in_tgt;
 
 	if (remaining < 0) {
-		cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%hu\n",
+		cifs_dbg(FYI, "Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%u\n",
 			 tgt_total_cnt, total_in_tgt);
 		return -EPROTO;
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/cifs/smb2maperror.c linux-libre-4.4.179-gnu/fs/cifs/smb2maperror.c
--- linux-libre-4.4.178-gnu/fs/cifs/smb2maperror.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/cifs/smb2maperror.c	2019-04-27 03:34:03.000000000 -0400
@@ -1034,7 +1034,8 @@ static const struct status_to_posix_erro
 	{STATUS_UNFINISHED_CONTEXT_DELETED, -EIO,
 	"STATUS_UNFINISHED_CONTEXT_DELETED"},
 	{STATUS_NO_TGT_REPLY, -EIO, "STATUS_NO_TGT_REPLY"},
-	{STATUS_OBJECTID_NOT_FOUND, -EIO, "STATUS_OBJECTID_NOT_FOUND"},
+	/* Note that ENOATTTR and ENODATA are the same errno */
+	{STATUS_OBJECTID_NOT_FOUND, -ENODATA, "STATUS_OBJECTID_NOT_FOUND"},
 	{STATUS_NO_IP_ADDRESSES, -EIO, "STATUS_NO_IP_ADDRESSES"},
 	{STATUS_WRONG_CREDENTIAL_HANDLE, -EIO,
 	"STATUS_WRONG_CREDENTIAL_HANDLE"},
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/ext4/indirect.c linux-libre-4.4.179-gnu/fs/ext4/indirect.c
--- linux-libre-4.4.178-gnu/fs/ext4/indirect.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/ext4/indirect.c	2019-04-27 03:34:03.000000000 -0400
@@ -1323,6 +1323,7 @@ int ext4_ind_remove_space(handle_t *hand
 	ext4_lblk_t offsets[4], offsets2[4];
 	Indirect chain[4], chain2[4];
 	Indirect *partial, *partial2;
+	Indirect *p = NULL, *p2 = NULL;
 	ext4_lblk_t max_block;
 	__le32 nr = 0, nr2 = 0;
 	int n = 0, n2 = 0;
@@ -1364,7 +1365,7 @@ int ext4_ind_remove_space(handle_t *hand
 		}
 
 
-		partial = ext4_find_shared(inode, n, offsets, chain, &nr);
+		partial = p = ext4_find_shared(inode, n, offsets, chain, &nr);
 		if (nr) {
 			if (partial == chain) {
 				/* Shared branch grows from the inode */
@@ -1389,13 +1390,11 @@ int ext4_ind_remove_space(handle_t *hand
 				partial->p + 1,
 				(__le32 *)partial->bh->b_data+addr_per_block,
 				(chain+n-1) - partial);
-			BUFFER_TRACE(partial->bh, "call brelse");
-			brelse(partial->bh);
 			partial--;
 		}
 
 end_range:
-		partial2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
+		partial2 = p2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
 		if (nr2) {
 			if (partial2 == chain2) {
 				/*
@@ -1425,16 +1424,14 @@ end_range:
 					   (__le32 *)partial2->bh->b_data,
 					   partial2->p,
 					   (chain2+n2-1) - partial2);
-			BUFFER_TRACE(partial2->bh, "call brelse");
-			brelse(partial2->bh);
 			partial2--;
 		}
 		goto do_indirects;
 	}
 
 	/* Punch happened within the same level (n == n2) */
-	partial = ext4_find_shared(inode, n, offsets, chain, &nr);
-	partial2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
+	partial = p = ext4_find_shared(inode, n, offsets, chain, &nr);
+	partial2 = p2 = ext4_find_shared(inode, n2, offsets2, chain2, &nr2);
 
 	/* Free top, but only if partial2 isn't its subtree. */
 	if (nr) {
@@ -1491,15 +1488,7 @@ end_range:
 					   partial->p + 1,
 					   partial2->p,
 					   (chain+n-1) - partial);
-			while (partial > chain) {
-				BUFFER_TRACE(partial->bh, "call brelse");
-				brelse(partial->bh);
-			}
-			while (partial2 > chain2) {
-				BUFFER_TRACE(partial2->bh, "call brelse");
-				brelse(partial2->bh);
-			}
-			return 0;
+			goto cleanup;
 		}
 
 		/*
@@ -1514,8 +1503,6 @@ end_range:
 					   partial->p + 1,
 					   (__le32 *)partial->bh->b_data+addr_per_block,
 					   (chain+n-1) - partial);
-			BUFFER_TRACE(partial->bh, "call brelse");
-			brelse(partial->bh);
 			partial--;
 		}
 		if (partial2 > chain2 && depth2 <= depth) {
@@ -1523,11 +1510,21 @@ end_range:
 					   (__le32 *)partial2->bh->b_data,
 					   partial2->p,
 					   (chain2+n2-1) - partial2);
-			BUFFER_TRACE(partial2->bh, "call brelse");
-			brelse(partial2->bh);
 			partial2--;
 		}
 	}
+
+cleanup:
+	while (p && p > chain) {
+		BUFFER_TRACE(p->bh, "call brelse");
+		brelse(p->bh);
+		p--;
+	}
+	while (p2 && p2 > chain2) {
+		BUFFER_TRACE(p2->bh, "call brelse");
+		brelse(p2->bh);
+		p2--;
+	}
 	return 0;
 
 do_indirects:
@@ -1535,7 +1532,7 @@ do_indirects:
 	switch (offsets[0]) {
 	default:
 		if (++n >= n2)
-			return 0;
+			break;
 		nr = i_data[EXT4_IND_BLOCK];
 		if (nr) {
 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
@@ -1543,7 +1540,7 @@ do_indirects:
 		}
 	case EXT4_IND_BLOCK:
 		if (++n >= n2)
-			return 0;
+			break;
 		nr = i_data[EXT4_DIND_BLOCK];
 		if (nr) {
 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
@@ -1551,7 +1548,7 @@ do_indirects:
 		}
 	case EXT4_DIND_BLOCK:
 		if (++n >= n2)
-			return 0;
+			break;
 		nr = i_data[EXT4_TIND_BLOCK];
 		if (nr) {
 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
@@ -1560,5 +1557,5 @@ do_indirects:
 	case EXT4_TIND_BLOCK:
 		;
 	}
-	return 0;
+	goto cleanup;
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/ext4/ioctl.c linux-libre-4.4.179-gnu/fs/ext4/ioctl.c
--- linux-libre-4.4.178-gnu/fs/ext4/ioctl.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/ext4/ioctl.c	2019-04-27 03:34:03.000000000 -0400
@@ -599,6 +599,13 @@ resizefs_out:
 		if (!blk_queue_discard(q))
 			return -EOPNOTSUPP;
 
+		/*
+		 * We haven't replayed the journal, so we cannot use our
+		 * block-bitmap-guided storage zapping commands.
+		 */
+		if (test_opt(sb, NOLOAD) && ext4_has_feature_journal(sb))
+			return -EROFS;
+
 		if (copy_from_user(&range, (struct fstrim_range __user *)arg,
 		    sizeof(range)))
 			return -EFAULT;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/ext4/resize.c linux-libre-4.4.179-gnu/fs/ext4/resize.c
--- linux-libre-4.4.178-gnu/fs/ext4/resize.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/ext4/resize.c	2019-04-27 03:34:03.000000000 -0400
@@ -907,11 +907,18 @@ static int add_new_gdb_meta_bg(struct su
 	memcpy(n_group_desc, o_group_desc,
 	       EXT4_SB(sb)->s_gdb_count * sizeof(struct buffer_head *));
 	n_group_desc[gdb_num] = gdb_bh;
+
+	BUFFER_TRACE(gdb_bh, "get_write_access");
+	err = ext4_journal_get_write_access(handle, gdb_bh);
+	if (err) {
+		kvfree(n_group_desc);
+		brelse(gdb_bh);
+		return err;
+	}
+
 	EXT4_SB(sb)->s_group_desc = n_group_desc;
 	EXT4_SB(sb)->s_gdb_count++;
 	kvfree(o_group_desc);
-	BUFFER_TRACE(gdb_bh, "get_write_access");
-	err = ext4_journal_get_write_access(handle, gdb_bh);
 	return err;
 }
 
@@ -2040,6 +2047,10 @@ out:
 		free_flex_gd(flex_gd);
 	if (resize_inode != NULL)
 		iput(resize_inode);
-	ext4_msg(sb, KERN_INFO, "resized filesystem to %llu", n_blocks_count);
+	if (err)
+		ext4_warning(sb, "error (%d) occurred during "
+			     "file system resize", err);
+	ext4_msg(sb, KERN_INFO, "resized filesystem to %llu",
+		 ext4_blocks_count(es));
 	return err;
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/f2fs/super.c linux-libre-4.4.179-gnu/fs/f2fs/super.c
--- linux-libre-4.4.178-gnu/fs/f2fs/super.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/f2fs/super.c	2019-04-27 03:34:03.000000000 -0400
@@ -1143,7 +1143,7 @@ int sanity_check_ckpt(struct f2fs_sb_inf
 	unsigned int segment_count_main;
 	unsigned int cp_pack_start_sum, cp_payload;
 	block_t user_block_count;
-	int i;
+	int i, j;
 
 	total = le32_to_cpu(raw_super->segment_count);
 	fsmeta = le32_to_cpu(raw_super->segment_count_ckpt);
@@ -1184,11 +1184,43 @@ int sanity_check_ckpt(struct f2fs_sb_inf
 		if (le32_to_cpu(ckpt->cur_node_segno[i]) >= main_segs ||
 			le16_to_cpu(ckpt->cur_node_blkoff[i]) >= blocks_per_seg)
 			return 1;
+		for (j = i + 1; j < NR_CURSEG_NODE_TYPE; j++) {
+			if (le32_to_cpu(ckpt->cur_node_segno[i]) ==
+				le32_to_cpu(ckpt->cur_node_segno[j])) {
+				f2fs_msg(sbi->sb, KERN_ERR,
+					"Node segment (%u, %u) has the same "
+					"segno: %u", i, j,
+					le32_to_cpu(ckpt->cur_node_segno[i]));
+				return 1;
+			}
+		}
 	}
 	for (i = 0; i < NR_CURSEG_DATA_TYPE; i++) {
 		if (le32_to_cpu(ckpt->cur_data_segno[i]) >= main_segs ||
 			le16_to_cpu(ckpt->cur_data_blkoff[i]) >= blocks_per_seg)
 			return 1;
+		for (j = i + 1; j < NR_CURSEG_DATA_TYPE; j++) {
+			if (le32_to_cpu(ckpt->cur_data_segno[i]) ==
+				le32_to_cpu(ckpt->cur_data_segno[j])) {
+				f2fs_msg(sbi->sb, KERN_ERR,
+					"Data segment (%u, %u) has the same "
+					"segno: %u", i, j,
+					le32_to_cpu(ckpt->cur_data_segno[i]));
+				return 1;
+			}
+		}
+	}
+	for (i = 0; i < NR_CURSEG_NODE_TYPE; i++) {
+		for (j = i; j < NR_CURSEG_DATA_TYPE; j++) {
+			if (le32_to_cpu(ckpt->cur_node_segno[i]) ==
+				le32_to_cpu(ckpt->cur_data_segno[j])) {
+				f2fs_msg(sbi->sb, KERN_ERR,
+					"Data segment (%u) and Data segment (%u)"
+					" has the same segno: %u", i, j,
+					le32_to_cpu(ckpt->cur_node_segno[i]));
+				return 1;
+			}
+		}
 	}
 
 	sit_bitmap_size = le32_to_cpu(ckpt->sit_ver_bitmap_bytesize);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/f2fs/trace.c linux-libre-4.4.179-gnu/fs/f2fs/trace.c
--- linux-libre-4.4.178-gnu/fs/f2fs/trace.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/f2fs/trace.c	2019-04-27 03:34:03.000000000 -0400
@@ -60,6 +60,7 @@ void f2fs_trace_pid(struct page *page)
 
 	page->private = pid;
 
+retry:
 	if (radix_tree_preload(GFP_NOFS))
 		return;
 
@@ -70,7 +71,12 @@ void f2fs_trace_pid(struct page *page)
 	if (p)
 		radix_tree_delete(&pids, pid);
 
-	f2fs_radix_tree_insert(&pids, pid, current);
+	if (radix_tree_insert(&pids, pid, current)) {
+		spin_unlock(&pids_lock);
+		radix_tree_preload_end();
+		cond_resched();
+		goto retry;
+	}
 
 	trace_printk("%3x:%3x %4x %-16s\n",
 			MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev),
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/file.c linux-libre-4.4.179-gnu/fs/file.c
--- linux-libre-4.4.178-gnu/fs/file.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/file.c	2019-04-27 03:34:03.000000000 -0400
@@ -474,6 +474,7 @@ struct files_struct init_files = {
 		.full_fds_bits	= init_files.full_fds_bits_init,
 	},
 	.file_lock	= __SPIN_LOCK_UNLOCKED(init_files.file_lock),
+	.resize_wait	= __WAIT_QUEUE_HEAD_INITIALIZER(init_files.resize_wait),
 };
 
 static unsigned long find_next_fd(struct fdtable *fdt, unsigned long start)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/ocfs2/cluster/nodemanager.c linux-libre-4.4.179-gnu/fs/ocfs2/cluster/nodemanager.c
--- linux-libre-4.4.178-gnu/fs/ocfs2/cluster/nodemanager.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/ocfs2/cluster/nodemanager.c	2019-04-27 03:34:03.000000000 -0400
@@ -621,13 +621,15 @@ static void o2nm_node_group_drop_item(st
 	struct o2nm_node *node = to_o2nm_node(item);
 	struct o2nm_cluster *cluster = to_o2nm_cluster(group->cg_item.ci_parent);
 
-	o2net_disconnect_node(node);
+	if (cluster->cl_nodes[node->nd_num] == node) {
+		o2net_disconnect_node(node);
 
-	if (cluster->cl_has_local &&
-	    (cluster->cl_local_node == node->nd_num)) {
-		cluster->cl_has_local = 0;
-		cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
-		o2net_stop_listening(node);
+		if (cluster->cl_has_local &&
+		    (cluster->cl_local_node == node->nd_num)) {
+			cluster->cl_has_local = 0;
+			cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
+			o2net_stop_listening(node);
+		}
 	}
 
 	/* XXX call into net to stop this node from trading messages */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/fs/overlayfs/dir.c linux-libre-4.4.179-gnu/fs/overlayfs/dir.c
--- linux-libre-4.4.178-gnu/fs/overlayfs/dir.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/fs/overlayfs/dir.c	2019-04-27 03:34:03.000000000 -0400
@@ -408,12 +408,21 @@ static int ovl_create_or_link(struct den
 		err = ovl_create_upper(dentry, inode, &stat, link, hardlink);
 	} else {
 		const struct cred *old_cred;
+		struct cred *override_cred;
 
 		old_cred = ovl_override_creds(dentry->d_sb);
 
-		err = ovl_create_over_whiteout(dentry, inode, &stat, link,
-					       hardlink);
+		err = -ENOMEM;
+		override_cred = prepare_creds();
+		if (override_cred) {
+			override_cred->fsuid = old_cred->fsuid;
+			override_cred->fsgid = old_cred->fsgid;
+			put_cred(override_creds(override_cred));
+			put_cred(override_cred);
 
+			err = ovl_create_over_whiteout(dentry, inode, &stat,
+						       link, hardlink);
+		}
 		revert_creds(old_cred);
 	}
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/atalk.h linux-libre-4.4.179-gnu/include/linux/atalk.h
--- linux-libre-4.4.178-gnu/include/linux/atalk.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/atalk.h	2019-04-27 03:34:03.000000000 -0400
@@ -150,19 +150,29 @@ extern int sysctl_aarp_retransmit_limit;
 extern int sysctl_aarp_resolve_time;
 
 #ifdef CONFIG_SYSCTL
-extern void atalk_register_sysctl(void);
+extern int atalk_register_sysctl(void);
 extern void atalk_unregister_sysctl(void);
 #else
-#define atalk_register_sysctl()		do { } while(0)
-#define atalk_unregister_sysctl()	do { } while(0)
+static inline int atalk_register_sysctl(void)
+{
+	return 0;
+}
+static inline void atalk_unregister_sysctl(void)
+{
+}
 #endif
 
 #ifdef CONFIG_PROC_FS
 extern int atalk_proc_init(void);
 extern void atalk_proc_exit(void);
 #else
-#define atalk_proc_init()	({ 0; })
-#define atalk_proc_exit()	do { } while(0)
+static inline int atalk_proc_init(void)
+{
+	return 0;
+}
+static inline void atalk_proc_exit(void)
+{
+}
 #endif /* CONFIG_PROC_FS */
 
 #endif /* __LINUX_ATALK_H__ */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/bitrev.h linux-libre-4.4.179-gnu/include/linux/bitrev.h
--- linux-libre-4.4.178-gnu/include/linux/bitrev.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/bitrev.h	2019-04-27 03:34:03.000000000 -0400
@@ -31,32 +31,32 @@ static inline u32 __bitrev32(u32 x)
 
 #define __constant_bitrev32(x)	\
 ({					\
-	u32 __x = x;			\
-	__x = (__x >> 16) | (__x << 16);	\
-	__x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8);	\
-	__x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4);	\
-	__x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2);	\
-	__x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1);	\
-	__x;								\
+	u32 ___x = x;			\
+	___x = (___x >> 16) | (___x << 16);	\
+	___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8);	\
+	___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4);	\
+	___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2);	\
+	___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1);	\
+	___x;								\
 })
 
 #define __constant_bitrev16(x)	\
 ({					\
-	u16 __x = x;			\
-	__x = (__x >> 8) | (__x << 8);	\
-	__x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4);	\
-	__x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2);	\
-	__x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1);	\
-	__x;								\
+	u16 ___x = x;			\
+	___x = (___x >> 8) | (___x << 8);	\
+	___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4);	\
+	___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2);	\
+	___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1);	\
+	___x;								\
 })
 
 #define __constant_bitrev8(x)	\
 ({					\
-	u8 __x = x;			\
-	__x = (__x >> 4) | (__x << 4);	\
-	__x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2);	\
-	__x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1);	\
-	__x;								\
+	u8 ___x = x;			\
+	___x = (___x >> 4) | (___x << 4);	\
+	___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2);	\
+	___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1);	\
+	___x;								\
 })
 
 #define bitrev32(x) \
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/kprobes.h linux-libre-4.4.179-gnu/include/linux/kprobes.h
--- linux-libre-4.4.178-gnu/include/linux/kprobes.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/kprobes.h	2019-04-27 03:34:03.000000000 -0400
@@ -197,6 +197,7 @@ struct kretprobe_instance {
 	struct kretprobe *rp;
 	kprobe_opcode_t *ret_addr;
 	struct task_struct *task;
+	void *fp;
 	char data[0];
 };
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/ring_buffer.h linux-libre-4.4.179-gnu/include/linux/ring_buffer.h
--- linux-libre-4.4.178-gnu/include/linux/ring_buffer.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/ring_buffer.h	2019-04-27 03:34:03.000000000 -0400
@@ -125,7 +125,7 @@ ring_buffer_consume(struct ring_buffer *
 		    unsigned long *lost_events);
 
 struct ring_buffer_iter *
-ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu);
+ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu, gfp_t flags);
 void ring_buffer_read_prepare_sync(void);
 void ring_buffer_read_start(struct ring_buffer_iter *iter);
 void ring_buffer_read_finish(struct ring_buffer_iter *iter);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/string.h linux-libre-4.4.179-gnu/include/linux/string.h
--- linux-libre-4.4.178-gnu/include/linux/string.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/string.h	2019-04-27 03:34:03.000000000 -0400
@@ -110,6 +110,9 @@ extern void * memscan(void *,int,__kerne
 #ifndef __HAVE_ARCH_MEMCMP
 extern int memcmp(const void *,const void *,__kernel_size_t);
 #endif
+#ifndef __HAVE_ARCH_BCMP
+extern int bcmp(const void *,const void *,__kernel_size_t);
+#endif
 #ifndef __HAVE_ARCH_MEMCHR
 extern void * memchr(const void *,int,__kernel_size_t);
 #endif
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/linux/swap.h linux-libre-4.4.179-gnu/include/linux/swap.h
--- linux-libre-4.4.178-gnu/include/linux/swap.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/linux/swap.h	2019-04-27 03:34:03.000000000 -0400
@@ -135,9 +135,9 @@ struct swap_extent {
 /*
  * Max bad pages in the new format..
  */
-#define __swapoffset(x) ((unsigned long)&((union swap_header *)0)->x)
 #define MAX_SWAP_BADPAGES \
-	((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int))
+	((offsetof(union swap_header, magic.magic) - \
+	  offsetof(union swap_header, info.badpages)) / sizeof(int))
 
 enum {
 	SWP_USED	= (1 << 0),	/* is slot in swap_info[] used? */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/net/netfilter/br_netfilter.h linux-libre-4.4.179-gnu/include/net/netfilter/br_netfilter.h
--- linux-libre-4.4.178-gnu/include/net/netfilter/br_netfilter.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/net/netfilter/br_netfilter.h	2019-04-27 03:34:03.000000000 -0400
@@ -42,7 +42,6 @@ static inline struct rtable *bridge_pare
 }
 
 struct net_device *setup_pre_routing(struct sk_buff *skb);
-void br_netfilter_enable(void);
 
 #if IS_ENABLED(CONFIG_IPV6)
 int br_validate_ipv6(struct net *net, struct sk_buff *skb);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/net/net_namespace.h linux-libre-4.4.179-gnu/include/net/net_namespace.h
--- linux-libre-4.4.178-gnu/include/net/net_namespace.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/net/net_namespace.h	2019-04-27 03:34:03.000000000 -0400
@@ -53,6 +53,7 @@ struct net {
 						 */
 	spinlock_t		rules_mod_lock;
 
+	u32			hash_mix;
 	atomic64_t		cookie_gen;
 
 	struct list_head	list;		/* list of network namespaces */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/include/net/netns/hash.h linux-libre-4.4.179-gnu/include/net/netns/hash.h
--- linux-libre-4.4.178-gnu/include/net/netns/hash.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/include/net/netns/hash.h	2019-04-27 03:34:03.000000000 -0400
@@ -1,21 +1,10 @@
 #ifndef __NET_NS_HASH_H__
 #define __NET_NS_HASH_H__
 
-#include <asm/cache.h>
-
-struct net;
+#include <net/net_namespace.h>
 
 static inline u32 net_hash_mix(const struct net *net)
 {
-#ifdef CONFIG_NET_NS
-	/*
-	 * shift this right to eliminate bits, that are
-	 * always zeroed
-	 */
-
-	return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
-#else
-	return 0;
-#endif
+	return net->hash_mix;
 }
 #endif
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/events/core.c linux-libre-4.4.179-gnu/kernel/events/core.c
--- linux-libre-4.4.178-gnu/kernel/events/core.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/events/core.c	2019-04-27 03:34:03.000000000 -0400
@@ -5998,6 +5998,7 @@ static void perf_event_mmap_output(struc
 	struct perf_output_handle handle;
 	struct perf_sample_data sample;
 	int size = mmap_event->event_id.header.size;
+	u32 type = mmap_event->event_id.header.type;
 	int ret;
 
 	if (!perf_event_mmap_match(event, data))
@@ -6041,6 +6042,7 @@ static void perf_event_mmap_output(struc
 	perf_output_end(&handle);
 out:
 	mmap_event->event_id.header.size = size;
+	mmap_event->event_id.header.type = type;
 }
 
 static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/irq/chip.c linux-libre-4.4.179-gnu/kernel/irq/chip.c
--- linux-libre-4.4.178-gnu/kernel/irq/chip.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/irq/chip.c	2019-04-27 03:34:03.000000000 -0400
@@ -1056,6 +1056,10 @@ int irq_chip_set_vcpu_affinity_parent(st
 int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on)
 {
 	data = data->parent_data;
+
+	if (data->chip->flags & IRQCHIP_SKIP_SET_WAKE)
+		return 0;
+
 	if (data->chip->irq_set_wake)
 		return data->chip->irq_set_wake(data, on);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/kprobes.c linux-libre-4.4.179-gnu/kernel/kprobes.c
--- linux-libre-4.4.178-gnu/kernel/kprobes.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/kprobes.c	2019-04-27 03:34:03.000000000 -0400
@@ -668,7 +668,6 @@ static void unoptimize_kprobe(struct kpr
 static int reuse_unused_kprobe(struct kprobe *ap)
 {
 	struct optimized_kprobe *op;
-	int ret;
 
 	BUG_ON(!kprobe_unused(ap));
 	/*
@@ -682,9 +681,8 @@ static int reuse_unused_kprobe(struct kp
 	/* Enable the probe again */
 	ap->flags &= ~KPROBE_FLAG_DISABLED;
 	/* Optimize it again (remove from op->list) */
-	ret = kprobe_optready(ap);
-	if (ret)
-		return ret;
+	if (!kprobe_optready(ap))
+		return -EINVAL;
 
 	optimize_kprobe(ap);
 	return 0;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/locking/lockdep.c linux-libre-4.4.179-gnu/kernel/locking/lockdep.c
--- linux-libre-4.4.178-gnu/kernel/locking/lockdep.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/locking/lockdep.c	2019-04-27 03:34:03.000000000 -0400
@@ -3314,9 +3314,6 @@ __lock_set_class(struct lockdep_map *loc
 	unsigned int depth;
 	int i;
 
-	if (unlikely(!debug_locks))
-		return 0;
-
 	depth = curr->lockdep_depth;
 	/*
 	 * This function is about (re)setting the class of a held lock,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/sched/fair.c linux-libre-4.4.179-gnu/kernel/sched/fair.c
--- linux-libre-4.4.178-gnu/kernel/sched/fair.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/sched/fair.c	2019-04-27 03:34:03.000000000 -0400
@@ -4016,12 +4016,15 @@ static enum hrtimer_restart sched_cfs_sl
 	return HRTIMER_NORESTART;
 }
 
+extern const u64 max_cfs_quota_period;
+
 static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
 {
 	struct cfs_bandwidth *cfs_b =
 		container_of(timer, struct cfs_bandwidth, period_timer);
 	int overrun;
 	int idle = 0;
+	int count = 0;
 
 	raw_spin_lock(&cfs_b->lock);
 	for (;;) {
@@ -4029,6 +4032,28 @@ static enum hrtimer_restart sched_cfs_pe
 		if (!overrun)
 			break;
 
+		if (++count > 3) {
+			u64 new, old = ktime_to_ns(cfs_b->period);
+
+			new = (old * 147) / 128; /* ~115% */
+			new = min(new, max_cfs_quota_period);
+
+			cfs_b->period = ns_to_ktime(new);
+
+			/* since max is 1s, this is limited to 1e9^2, which fits in u64 */
+			cfs_b->quota *= new;
+			cfs_b->quota = div64_u64(cfs_b->quota, old);
+
+			pr_warn_ratelimited(
+        "cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us %lld, cfs_quota_us = %lld)\n",
+	                        smp_processor_id(),
+	                        div_u64(new, NSEC_PER_USEC),
+                                div_u64(cfs_b->quota, NSEC_PER_USEC));
+
+			/* reset count so we don't come right back in here */
+			count = 0;
+		}
+
 		idle = do_sched_cfs_period_timer(cfs_b, overrun);
 	}
 	if (idle)
@@ -6022,10 +6047,10 @@ static void update_cfs_rq_h_load(struct
 	if (cfs_rq->last_h_load_update == now)
 		return;
 
-	cfs_rq->h_load_next = NULL;
+	WRITE_ONCE(cfs_rq->h_load_next, NULL);
 	for_each_sched_entity(se) {
 		cfs_rq = cfs_rq_of(se);
-		cfs_rq->h_load_next = se;
+		WRITE_ONCE(cfs_rq->h_load_next, se);
 		if (cfs_rq->last_h_load_update == now)
 			break;
 	}
@@ -6035,7 +6060,7 @@ static void update_cfs_rq_h_load(struct
 		cfs_rq->last_h_load_update = now;
 	}
 
-	while ((se = cfs_rq->h_load_next) != NULL) {
+	while ((se = READ_ONCE(cfs_rq->h_load_next)) != NULL) {
 		load = cfs_rq->h_load;
 		load = div64_ul(load * se->avg.load_avg,
 			cfs_rq_load_avg(cfs_rq) + 1);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/sysctl.c linux-libre-4.4.179-gnu/kernel/sysctl.c
--- linux-libre-4.4.178-gnu/kernel/sysctl.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/sysctl.c	2019-04-27 03:34:03.000000000 -0400
@@ -125,7 +125,9 @@ static int zero;
 static int __maybe_unused one = 1;
 static int __maybe_unused two = 2;
 static int __maybe_unused four = 4;
+static unsigned long zero_ul;
 static unsigned long one_ul = 1;
+static unsigned long long_max = LONG_MAX;
 static int one_hundred = 100;
 #ifdef CONFIG_PRINTK
 static int ten_thousand = 10000;
@@ -1603,6 +1605,8 @@ static struct ctl_table fs_table[] = {
 		.maxlen		= sizeof(files_stat.max_files),
 		.mode		= 0644,
 		.proc_handler	= proc_doulongvec_minmax,
+		.extra1		= &zero_ul,
+		.extra2		= &long_max,
 	},
 	{
 		.procname	= "nr_open",
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/trace/ftrace.c linux-libre-4.4.179-gnu/kernel/trace/ftrace.c
--- linux-libre-4.4.178-gnu/kernel/trace/ftrace.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/trace/ftrace.c	2019-04-27 03:34:03.000000000 -0400
@@ -32,6 +32,7 @@
 #include <linux/list.h>
 #include <linux/hash.h>
 #include <linux/rcupdate.h>
+#include <linux/kprobes.h>
 
 #include <trace/events/sched.h>
 
@@ -5165,7 +5166,7 @@ static struct ftrace_ops control_ops = {
 	INIT_OPS_HASH(control_ops)
 };
 
-static inline void
+static nokprobe_inline void
 __ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
 		       struct ftrace_ops *ignored, struct pt_regs *regs)
 {
@@ -5214,11 +5215,13 @@ static void ftrace_ops_list_func(unsigne
 {
 	__ftrace_ops_list_func(ip, parent_ip, NULL, regs);
 }
+NOKPROBE_SYMBOL(ftrace_ops_list_func);
 #else
 static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip)
 {
 	__ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
 }
+NOKPROBE_SYMBOL(ftrace_ops_no_ops);
 #endif
 
 /*
@@ -5239,6 +5242,7 @@ static void ftrace_ops_recurs_func(unsig
 
 	trace_clear_recursion(bit);
 }
+NOKPROBE_SYMBOL(ftrace_ops_recurs_func);
 
 /**
  * ftrace_ops_get_func - get the function a trampoline should call
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/trace/ring_buffer.c linux-libre-4.4.179-gnu/kernel/trace/ring_buffer.c
--- linux-libre-4.4.178-gnu/kernel/trace/ring_buffer.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/trace/ring_buffer.c	2019-04-27 03:34:03.000000000 -0400
@@ -4042,6 +4042,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_consume);
  * ring_buffer_read_prepare - Prepare for a non consuming read of the buffer
  * @buffer: The ring buffer to read from
  * @cpu: The cpu buffer to iterate over
+ * @flags: gfp flags to use for memory allocation
  *
  * This performs the initial preparations necessary to iterate
  * through the buffer.  Memory is allocated, buffer recording
@@ -4059,7 +4060,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_consume);
  * This overall must be paired with ring_buffer_read_finish.
  */
 struct ring_buffer_iter *
-ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu)
+ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu, gfp_t flags)
 {
 	struct ring_buffer_per_cpu *cpu_buffer;
 	struct ring_buffer_iter *iter;
@@ -4067,7 +4068,7 @@ ring_buffer_read_prepare(struct ring_buf
 	if (!cpumask_test_cpu(cpu, buffer->cpumask))
 		return NULL;
 
-	iter = kmalloc(sizeof(*iter), GFP_KERNEL);
+	iter = kmalloc(sizeof(*iter), flags);
 	if (!iter)
 		return NULL;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/trace/trace.c linux-libre-4.4.179-gnu/kernel/trace/trace.c
--- linux-libre-4.4.178-gnu/kernel/trace/trace.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/trace/trace.c	2019-04-27 03:34:03.000000000 -0400
@@ -3122,7 +3122,8 @@ __tracing_open(struct inode *inode, stru
 	if (iter->cpu_file == RING_BUFFER_ALL_CPUS) {
 		for_each_tracing_cpu(cpu) {
 			iter->buffer_iter[cpu] =
-				ring_buffer_read_prepare(iter->trace_buffer->buffer, cpu);
+				ring_buffer_read_prepare(iter->trace_buffer->buffer,
+							 cpu, GFP_KERNEL);
 		}
 		ring_buffer_read_prepare_sync();
 		for_each_tracing_cpu(cpu) {
@@ -3132,7 +3133,8 @@ __tracing_open(struct inode *inode, stru
 	} else {
 		cpu = iter->cpu_file;
 		iter->buffer_iter[cpu] =
-			ring_buffer_read_prepare(iter->trace_buffer->buffer, cpu);
+			ring_buffer_read_prepare(iter->trace_buffer->buffer,
+						 cpu, GFP_KERNEL);
 		ring_buffer_read_prepare_sync();
 		ring_buffer_read_start(iter->buffer_iter[cpu]);
 		tracing_iter_reset(iter, cpu);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/kernel/trace/trace_kdb.c linux-libre-4.4.179-gnu/kernel/trace/trace_kdb.c
--- linux-libre-4.4.178-gnu/kernel/trace/trace_kdb.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/kernel/trace/trace_kdb.c	2019-04-27 03:34:03.000000000 -0400
@@ -50,14 +50,16 @@ static void ftrace_dump_buf(int skip_lin
 	if (cpu_file == RING_BUFFER_ALL_CPUS) {
 		for_each_tracing_cpu(cpu) {
 			iter.buffer_iter[cpu] =
-			ring_buffer_read_prepare(iter.trace_buffer->buffer, cpu);
+			ring_buffer_read_prepare(iter.trace_buffer->buffer,
+						 cpu, GFP_ATOMIC);
 			ring_buffer_read_start(iter.buffer_iter[cpu]);
 			tracing_iter_reset(&iter, cpu);
 		}
 	} else {
 		iter.cpu_file = cpu_file;
 		iter.buffer_iter[cpu_file] =
-			ring_buffer_read_prepare(iter.trace_buffer->buffer, cpu_file);
+			ring_buffer_read_prepare(iter.trace_buffer->buffer,
+						 cpu_file, GFP_ATOMIC);
 		ring_buffer_read_start(iter.buffer_iter[cpu_file]);
 		tracing_iter_reset(&iter, cpu_file);
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/lib/bsearch.c linux-libre-4.4.179-gnu/lib/bsearch.c
--- linux-libre-4.4.178-gnu/lib/bsearch.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/lib/bsearch.c	2019-04-27 03:34:03.000000000 -0400
@@ -11,6 +11,7 @@
 
 #include <linux/export.h>
 #include <linux/bsearch.h>
+#include <linux/kprobes.h>
 
 /*
  * bsearch - binary search an array of elements
@@ -51,3 +52,4 @@ void *bsearch(const void *key, const voi
 	return NULL;
 }
 EXPORT_SYMBOL(bsearch);
+NOKPROBE_SYMBOL(bsearch);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/lib/div64.c linux-libre-4.4.179-gnu/lib/div64.c
--- linux-libre-4.4.178-gnu/lib/div64.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/lib/div64.c	2019-04-27 03:34:03.000000000 -0400
@@ -100,7 +100,7 @@ u64 div64_u64_rem(u64 dividend, u64 divi
 		quot = div_u64_rem(dividend, divisor, &rem32);
 		*remainder = rem32;
 	} else {
-		int n = 1 + fls(high);
+		int n = fls(high);
 		quot = div_u64(dividend >> n, divisor >> n);
 
 		if (quot != 0)
@@ -138,7 +138,7 @@ u64 div64_u64(u64 dividend, u64 divisor)
 	if (high == 0) {
 		quot = div_u64(dividend, divisor);
 	} else {
-		int n = 1 + fls(high);
+		int n = fls(high);
 		quot = div_u64(dividend >> n, divisor >> n);
 
 		if (quot != 0)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/lib/int_sqrt.c linux-libre-4.4.179-gnu/lib/int_sqrt.c
--- linux-libre-4.4.178-gnu/lib/int_sqrt.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/lib/int_sqrt.c	2019-04-27 03:34:03.000000000 -0400
@@ -7,6 +7,7 @@
 
 #include <linux/kernel.h>
 #include <linux/export.h>
+#include <linux/bitops.h>
 
 /**
  * int_sqrt - rough approximation to sqrt
@@ -21,10 +22,7 @@ unsigned long int_sqrt(unsigned long x)
 	if (x <= 1)
 		return x;
 
-	m = 1UL << (BITS_PER_LONG - 2);
-	while (m > x)
-		m >>= 2;
-
+	m = 1UL << (__fls(x) & ~1UL);
 	while (m != 0) {
 		b = y + m;
 		y >>= 1;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/lib/raid6/Makefile linux-libre-4.4.179-gnu/lib/raid6/Makefile
--- linux-libre-4.4.178-gnu/lib/raid6/Makefile	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/lib/raid6/Makefile	2019-04-27 03:34:03.000000000 -0400
@@ -23,7 +23,7 @@ endif
 ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
 NEON_FLAGS := -ffreestanding
 ifeq ($(ARCH),arm)
-NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon
+NEON_FLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon
 endif
 ifeq ($(ARCH),arm64)
 CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only
diff -druNp --no-dereference linux-libre-4.4.178-gnu/lib/string.c linux-libre-4.4.179-gnu/lib/string.c
--- linux-libre-4.4.178-gnu/lib/string.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/lib/string.c	2019-04-27 03:34:03.000000000 -0400
@@ -746,6 +746,26 @@ __visible int memcmp(const void *cs, con
 EXPORT_SYMBOL(memcmp);
 #endif
 
+#ifndef __HAVE_ARCH_BCMP
+/**
+ * bcmp - returns 0 if and only if the buffers have identical contents.
+ * @a: pointer to first buffer.
+ * @b: pointer to second buffer.
+ * @len: size of buffers.
+ *
+ * The sign or magnitude of a non-zero return value has no particular
+ * meaning, and architectures may implement their own more efficient bcmp(). So
+ * while this particular implementation is a simple (tail) call to memcmp, do
+ * not rely on anything but whether the return value is zero or non-zero.
+ */
+#undef bcmp
+int bcmp(const void *a, const void *b, size_t len)
+{
+	return memcmp(a, b, len);
+}
+EXPORT_SYMBOL(bcmp);
+#endif
+
 #ifndef __HAVE_ARCH_MEMSCAN
 /**
  * memscan - Find a character in an area of memory.
diff -druNp --no-dereference linux-libre-4.4.178-gnu/Makefile linux-libre-4.4.179-gnu/Makefile
--- linux-libre-4.4.178-gnu/Makefile	2019-04-03 20:12:04.000000000 -0400
+++ linux-libre-4.4.179-gnu/Makefile	2019-04-28 03:01:23.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 178
+SUBLEVEL = 179
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
@@ -610,7 +610,7 @@ all: vmlinux
 ifeq ($(cc-name),clang)
 ifneq ($(CROSS_COMPILE),)
 CLANG_TARGET	:= --target=$(notdir $(CROSS_COMPILE:%-=%))
-GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
+GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
 CLANG_PREFIX	:= --prefix=$(GCC_TOOLCHAIN_DIR)
 GCC_TOOLCHAIN	:= $(realpath $(GCC_TOOLCHAIN_DIR)/..)
 endif
@@ -639,7 +639,7 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
 KBUILD_CFLAGS	+= $(call cc-disable-warning, attribute-alias)
 
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
-KBUILD_CFLAGS	+= $(call cc-option,-Oz,-Os)
+KBUILD_CFLAGS	+= -Os
 else
 ifdef CONFIG_PROFILE_ALL_BRANCHES
 KBUILD_CFLAGS	+= -O2
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/cma.c linux-libre-4.4.179-gnu/mm/cma.c
--- linux-libre-4.4.178-gnu/mm/cma.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/cma.c	2019-04-27 03:34:03.000000000 -0400
@@ -339,12 +339,14 @@ int __init cma_declare_contiguous(phys_a
 
 	ret = cma_init_reserved_mem(base, size, order_per_bit, res_cma);
 	if (ret)
-		goto err;
+		goto free_mem;
 
 	pr_info("Reserved %ld MiB at %pa\n", (unsigned long)size / SZ_1M,
 		&base);
 	return 0;
 
+free_mem:
+	memblock_free(base, size);
 err:
 	pr_err("Failed to reserve %ld MiB\n", (unsigned long)size / SZ_1M);
 	return ret;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/mempolicy.c linux-libre-4.4.179-gnu/mm/mempolicy.c
--- linux-libre-4.4.178-gnu/mm/mempolicy.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/mempolicy.c	2019-04-27 03:34:03.000000000 -0400
@@ -514,12 +514,16 @@ static int queue_pages_pte_range(pmd_t *
 		if (node_isset(nid, *qp->nmask) == !!(flags & MPOL_MF_INVERT))
 			continue;
 
-		if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
+		if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {
+			if (!vma_migratable(vma))
+				break;
 			migrate_page_add(page, qp->pagelist, flags);
+		} else
+			break;
 	}
 	pte_unmap_unlock(pte - 1, ptl);
 	cond_resched();
-	return 0;
+	return addr != end ? -EIO : 0;
 }
 
 static int queue_pages_hugetlb(pte_t *pte, unsigned long hmask,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/page_ext.c linux-libre-4.4.179-gnu/mm/page_ext.c
--- linux-libre-4.4.178-gnu/mm/page_ext.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/page_ext.c	2019-04-27 03:34:03.000000000 -0400
@@ -255,6 +255,7 @@ static void free_page_ext(void *addr)
 		table_size = sizeof(struct page_ext) * PAGES_PER_SECTION;
 
 		BUG_ON(PageReserved(page));
+		kmemleak_free(addr);
 		free_pages_exact(addr, table_size);
 	}
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/slab.c linux-libre-4.4.179-gnu/mm/slab.c
--- linux-libre-4.4.178-gnu/mm/slab.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/slab.c	2019-04-27 03:34:03.000000000 -0400
@@ -660,14 +660,6 @@ static void start_cpu_timer(int cpu)
 
 static void init_arraycache(struct array_cache *ac, int limit, int batch)
 {
-	/*
-	 * The array_cache structures contain pointers to free object.
-	 * However, when such objects are allocated or transferred to another
-	 * cache the pointers are not cleared and they could be counted as
-	 * valid references during a kmemleak scan. Therefore, kmemleak must
-	 * not scan such objects.
-	 */
-	kmemleak_no_scan(ac);
 	if (ac) {
 		ac->avail = 0;
 		ac->limit = limit;
@@ -683,6 +675,14 @@ static struct array_cache *alloc_arrayca
 	struct array_cache *ac = NULL;
 
 	ac = kmalloc_node(memsize, gfp, node);
+	/*
+	 * The array_cache structures contain pointers to free object.
+	 * However, when such objects are allocated or transferred to another
+	 * cache the pointers are not cleared and they could be counted as
+	 * valid references during a kmemleak scan. Therefore, kmemleak must
+	 * not scan such objects.
+	 */
+	kmemleak_no_scan(ac);
 	init_arraycache(ac, entries, batchcount);
 	return ac;
 }
@@ -876,6 +876,7 @@ static struct alien_cache *__alloc_alien
 
 	alc = kmalloc_node(memsize, gfp, node);
 	if (alc) {
+		kmemleak_no_scan(alc);
 		init_arraycache(&alc->ac, entries, batch);
 		spin_lock_init(&alc->lock);
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/vmalloc.c linux-libre-4.4.179-gnu/mm/vmalloc.c
--- linux-libre-4.4.178-gnu/mm/vmalloc.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/vmalloc.c	2019-04-27 03:34:03.000000000 -0400
@@ -446,7 +446,11 @@ nocache:
 	}
 
 found:
-	if (addr + size > vend)
+	/*
+	 * Check also calculated address against the vstart,
+	 * because it can be 0 because of big align request.
+	 */
+	if (addr + size > vend || addr < vstart)
 		goto overflow;
 
 	va->va_start = addr;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/mm/vmstat.c linux-libre-4.4.179-gnu/mm/vmstat.c
--- linux-libre-4.4.178-gnu/mm/vmstat.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/mm/vmstat.c	2019-04-27 03:34:03.000000000 -0400
@@ -857,13 +857,8 @@ const char * const vmstat_text[] = {
 #endif
 #endif /* CONFIG_MEMORY_BALLOON */
 #ifdef CONFIG_DEBUG_TLBFLUSH
-#ifdef CONFIG_SMP
 	"nr_tlb_remote_flush",
 	"nr_tlb_remote_flush_received",
-#else
-	"", /* nr_tlb_remote_flush */
-	"", /* nr_tlb_remote_flush_received */
-#endif /* CONFIG_SMP */
 	"nr_tlb_local_flush_all",
 	"nr_tlb_local_flush_one",
 #endif /* CONFIG_DEBUG_TLBFLUSH */
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/9p/protocol.c linux-libre-4.4.179-gnu/net/9p/protocol.c
--- linux-libre-4.4.178-gnu/net/9p/protocol.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/9p/protocol.c	2019-04-27 03:34:03.000000000 -0400
@@ -570,9 +570,10 @@ int p9stat_read(struct p9_client *clnt,
 	if (ret) {
 		p9_debug(P9_DEBUG_9P, "<<< p9stat_read failed: %d\n", ret);
 		trace_9p_protocol_dump(clnt, &fake_pdu);
+		return ret;
 	}
 
-	return ret;
+	return fake_pdu.offset;
 }
 EXPORT_SYMBOL(p9stat_read);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/appletalk/atalk_proc.c linux-libre-4.4.179-gnu/net/appletalk/atalk_proc.c
--- linux-libre-4.4.178-gnu/net/appletalk/atalk_proc.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/appletalk/atalk_proc.c	2019-04-27 03:34:03.000000000 -0400
@@ -293,7 +293,7 @@ out_interface:
 	goto out;
 }
 
-void __exit atalk_proc_exit(void)
+void atalk_proc_exit(void)
 {
 	remove_proc_entry("interface", atalk_proc_dir);
 	remove_proc_entry("route", atalk_proc_dir);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/appletalk/ddp.c linux-libre-4.4.179-gnu/net/appletalk/ddp.c
--- linux-libre-4.4.178-gnu/net/appletalk/ddp.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/appletalk/ddp.c	2019-04-27 03:34:03.000000000 -0400
@@ -1912,12 +1912,16 @@ static const char atalk_err_snap[] __ini
 /* Called by proto.c on kernel start up */
 static int __init atalk_init(void)
 {
-	int rc = proto_register(&ddp_proto, 0);
+	int rc;
 
-	if (rc != 0)
+	rc = proto_register(&ddp_proto, 0);
+	if (rc)
 		goto out;
 
-	(void)sock_register(&atalk_family_ops);
+	rc = sock_register(&atalk_family_ops);
+	if (rc)
+		goto out_proto;
+
 	ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv);
 	if (!ddp_dl)
 		printk(atalk_err_snap);
@@ -1925,12 +1929,33 @@ static int __init atalk_init(void)
 	dev_add_pack(&ltalk_packet_type);
 	dev_add_pack(&ppptalk_packet_type);
 
-	register_netdevice_notifier(&ddp_notifier);
+	rc = register_netdevice_notifier(&ddp_notifier);
+	if (rc)
+		goto out_sock;
+
 	aarp_proto_init();
-	atalk_proc_init();
-	atalk_register_sysctl();
+	rc = atalk_proc_init();
+	if (rc)
+		goto out_aarp;
+
+	rc = atalk_register_sysctl();
+	if (rc)
+		goto out_proc;
 out:
 	return rc;
+out_proc:
+	atalk_proc_exit();
+out_aarp:
+	aarp_cleanup_module();
+	unregister_netdevice_notifier(&ddp_notifier);
+out_sock:
+	dev_remove_pack(&ppptalk_packet_type);
+	dev_remove_pack(&ltalk_packet_type);
+	unregister_snap_client(ddp_dl);
+	sock_unregister(PF_APPLETALK);
+out_proto:
+	proto_unregister(&ddp_proto);
+	goto out;
 }
 module_init(atalk_init);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/appletalk/sysctl_net_atalk.c linux-libre-4.4.179-gnu/net/appletalk/sysctl_net_atalk.c
--- linux-libre-4.4.178-gnu/net/appletalk/sysctl_net_atalk.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/appletalk/sysctl_net_atalk.c	2019-04-27 03:34:03.000000000 -0400
@@ -44,9 +44,12 @@ static struct ctl_table atalk_table[] =
 
 static struct ctl_table_header *atalk_table_header;
 
-void atalk_register_sysctl(void)
+int __init atalk_register_sysctl(void)
 {
 	atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table);
+	if (!atalk_table_header)
+		return -ENOMEM;
+	return 0;
 }
 
 void atalk_unregister_sysctl(void)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/atm/lec.c linux-libre-4.4.179-gnu/net/atm/lec.c
--- linux-libre-4.4.178-gnu/net/atm/lec.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/atm/lec.c	2019-04-27 03:34:03.000000000 -0400
@@ -721,7 +721,10 @@ static int lec_vcc_attach(struct atm_vcc
 
 static int lec_mcast_attach(struct atm_vcc *vcc, int arg)
 {
-	if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg])
+	if (arg < 0 || arg >= MAX_LEC_ITF)
+		return -EINVAL;
+	arg = array_index_nospec(arg, MAX_LEC_ITF);
+	if (!dev_lec[arg])
 		return -EINVAL;
 	vcc->proto_data = dev_lec[arg];
 	return lec_mcast_make(netdev_priv(dev_lec[arg]), vcc);
@@ -739,6 +742,7 @@ static int lecd_attach(struct atm_vcc *v
 		i = arg;
 	if (arg >= MAX_LEC_ITF)
 		return -EINVAL;
+	i = array_index_nospec(arg, MAX_LEC_ITF);
 	if (!dev_lec[i]) {
 		int size;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/bluetooth/hci_sock.c linux-libre-4.4.179-gnu/net/bluetooth/hci_sock.c
--- linux-libre-4.4.178-gnu/net/bluetooth/hci_sock.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/bluetooth/hci_sock.c	2019-04-27 03:34:03.000000000 -0400
@@ -558,13 +558,12 @@ static int hci_sock_release(struct socke
 	if (!sk)
 		return 0;
 
-	hdev = hci_pi(sk)->hdev;
-
 	if (hci_pi(sk)->channel == HCI_CHANNEL_MONITOR)
 		atomic_dec(&monitor_promisc);
 
 	bt_sock_unlink(&hci_sk_list, sk);
 
+	hdev = hci_pi(sk)->hdev;
 	if (hdev) {
 		if (hci_pi(sk)->channel == HCI_CHANNEL_USER) {
 			/* When releasing an user channel exclusive access,
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/bridge/br_multicast.c linux-libre-4.4.179-gnu/net/bridge/br_multicast.c
--- linux-libre-4.4.178-gnu/net/bridge/br_multicast.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/bridge/br_multicast.c	2019-04-27 03:34:03.000000000 -0400
@@ -1894,7 +1894,8 @@ static void br_multicast_start_querier(s
 
 	__br_multicast_open(br, query);
 
-	list_for_each_entry(port, &br->port_list, list) {
+	rcu_read_lock();
+	list_for_each_entry_rcu(port, &br->port_list, list) {
 		if (port->state == BR_STATE_DISABLED ||
 		    port->state == BR_STATE_BLOCKING)
 			continue;
@@ -1906,6 +1907,7 @@ static void br_multicast_start_querier(s
 			br_multicast_enable(&port->ip6_own_query);
 #endif
 	}
+	rcu_read_unlock();
 }
 
 int br_multicast_toggle(struct net_bridge *br, unsigned long val)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/bridge/br_netfilter_hooks.c linux-libre-4.4.179-gnu/net/bridge/br_netfilter_hooks.c
--- linux-libre-4.4.178-gnu/net/bridge/br_netfilter_hooks.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/bridge/br_netfilter_hooks.c	2019-04-27 03:34:03.000000000 -0400
@@ -873,11 +873,6 @@ static const struct nf_br_ops br_ops = {
 	.br_dev_xmit_hook =	br_nf_dev_xmit,
 };
 
-void br_netfilter_enable(void)
-{
-}
-EXPORT_SYMBOL_GPL(br_netfilter_enable);
-
 /* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
  * br_dev_queue_push_xmit is called afterwards */
 static struct nf_hook_ops br_nf_ops[] __read_mostly = {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/core/ethtool.c linux-libre-4.4.179-gnu/net/core/ethtool.c
--- linux-libre-4.4.178-gnu/net/core/ethtool.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/core/ethtool.c	2019-04-27 03:34:03.000000000 -0400
@@ -1287,17 +1287,22 @@ static int ethtool_get_strings(struct ne
 
 	gstrings.len = ret;
 
-	data = kcalloc(gstrings.len, ETH_GSTRING_LEN, GFP_USER);
-	if (!data)
-		return -ENOMEM;
+	if (gstrings.len) {
+		data = kcalloc(gstrings.len, ETH_GSTRING_LEN, GFP_USER);
+		if (!data)
+			return -ENOMEM;
 
-	__ethtool_get_strings(dev, gstrings.string_set, data);
+		__ethtool_get_strings(dev, gstrings.string_set, data);
+	} else {
+		data = NULL;
+	}
 
 	ret = -EFAULT;
 	if (copy_to_user(useraddr, &gstrings, sizeof(gstrings)))
 		goto out;
 	useraddr += sizeof(gstrings);
-	if (copy_to_user(useraddr, data, gstrings.len * ETH_GSTRING_LEN))
+	if (gstrings.len &&
+	    copy_to_user(useraddr, data, gstrings.len * ETH_GSTRING_LEN))
 		goto out;
 	ret = 0;
 
@@ -1385,17 +1390,21 @@ static int ethtool_get_stats(struct net_
 		return -EFAULT;
 
 	stats.n_stats = n_stats;
-	data = kmalloc(n_stats * sizeof(u64), GFP_USER);
-	if (!data)
-		return -ENOMEM;
+	if (n_stats) {
+		data = kmalloc(n_stats * sizeof(u64), GFP_USER);
+		if (!data)
+			return -ENOMEM;
 
-	ops->get_ethtool_stats(dev, &stats, data);
+		ops->get_ethtool_stats(dev, &stats, data);
+	} else {
+		data = NULL;
+	}
 
 	ret = -EFAULT;
 	if (copy_to_user(useraddr, &stats, sizeof(stats)))
 		goto out;
 	useraddr += sizeof(stats);
-	if (copy_to_user(useraddr, data, stats.n_stats * sizeof(u64)))
+	if (n_stats && copy_to_user(useraddr, data, n_stats * sizeof(u64)))
 		goto out;
 	ret = 0;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/core/net_namespace.c linux-libre-4.4.179-gnu/net/core/net_namespace.c
--- linux-libre-4.4.178-gnu/net/core/net_namespace.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/core/net_namespace.c	2019-04-27 03:34:03.000000000 -0400
@@ -280,6 +280,7 @@ static __net_init int setup_net(struct n
 
 	atomic_set(&net->count, 1);
 	atomic_set(&net->passive, 1);
+	get_random_bytes(&net->hash_mix, sizeof(u32));
 	net->dev_base_seq = 1;
 	net->user_ns = user_ns;
 	idr_init(&net->netns_ids);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv4/fou.c linux-libre-4.4.179-gnu/net/ipv4/fou.c
--- linux-libre-4.4.178-gnu/net/ipv4/fou.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv4/fou.c	2019-04-27 03:34:03.000000000 -0400
@@ -116,6 +116,7 @@ static int gue_udp_recv(struct sock *sk,
 	struct guehdr *guehdr;
 	void *data;
 	u16 doffset = 0;
+	u8 proto_ctype;
 
 	if (!fou)
 		return 1;
@@ -173,13 +174,14 @@ static int gue_udp_recv(struct sock *sk,
 	if (unlikely(guehdr->control))
 		return gue_control_message(skb, guehdr);
 
+	proto_ctype = guehdr->proto_ctype;
 	__skb_pull(skb, sizeof(struct udphdr) + hdrlen);
 	skb_reset_transport_header(skb);
 
 	if (iptunnel_pull_offloads(skb))
 		goto drop;
 
-	return -guehdr->proto_ctype;
+	return -proto_ctype;
 
 drop:
 	kfree_skb(skb);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv4/route.c linux-libre-4.4.179-gnu/net/ipv4/route.c
--- linux-libre-4.4.178-gnu/net/ipv4/route.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv4/route.c	2019-04-27 03:34:03.000000000 -0400
@@ -1164,9 +1164,23 @@ static struct dst_entry *ipv4_dst_check(
 
 static void ipv4_link_failure(struct sk_buff *skb)
 {
+	struct ip_options opt;
 	struct rtable *rt;
+	int res;
 
-	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
+	/* Recompile ip options since IPCB may not be valid anymore.
+	 */
+	memset(&opt, 0, sizeof(opt));
+	opt.optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
+
+	rcu_read_lock();
+	res = __ip_options_compile(dev_net(skb->dev), &opt, skb, NULL);
+	rcu_read_unlock();
+
+	if (res)
+		return;
+
+	__icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0, &opt);
 
 	rt = skb_rtable(skb);
 	if (rt)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv4/tcp_dctcp.c linux-libre-4.4.179-gnu/net/ipv4/tcp_dctcp.c
--- linux-libre-4.4.178-gnu/net/ipv4/tcp_dctcp.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv4/tcp_dctcp.c	2019-04-27 03:34:03.000000000 -0400
@@ -66,11 +66,6 @@ static unsigned int dctcp_alpha_on_init
 module_param(dctcp_alpha_on_init, uint, 0644);
 MODULE_PARM_DESC(dctcp_alpha_on_init, "parameter for initial alpha value");
 
-static unsigned int dctcp_clamp_alpha_on_loss __read_mostly;
-module_param(dctcp_clamp_alpha_on_loss, uint, 0644);
-MODULE_PARM_DESC(dctcp_clamp_alpha_on_loss,
-		 "parameter for clamping alpha on loss");
-
 static struct tcp_congestion_ops dctcp_reno;
 
 static void dctcp_reset(const struct tcp_sock *tp, struct dctcp *ca)
@@ -211,21 +206,23 @@ static void dctcp_update_alpha(struct so
 	}
 }
 
-static void dctcp_state(struct sock *sk, u8 new_state)
+static void dctcp_react_to_loss(struct sock *sk)
 {
-	if (dctcp_clamp_alpha_on_loss && new_state == TCP_CA_Loss) {
-		struct dctcp *ca = inet_csk_ca(sk);
+	struct dctcp *ca = inet_csk_ca(sk);
+	struct tcp_sock *tp = tcp_sk(sk);
 
-		/* If this extension is enabled, we clamp dctcp_alpha to
-		 * max on packet loss; the motivation is that dctcp_alpha
-		 * is an indicator to the extend of congestion and packet
-		 * loss is an indicator of extreme congestion; setting
-		 * this in practice turned out to be beneficial, and
-		 * effectively assumes total congestion which reduces the
-		 * window by half.
-		 */
-		ca->dctcp_alpha = DCTCP_MAX_ALPHA;
-	}
+	ca->loss_cwnd = tp->snd_cwnd;
+	tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U);
+}
+
+static void dctcp_state(struct sock *sk, u8 new_state)
+{
+	if (new_state == TCP_CA_Recovery &&
+	    new_state != inet_csk(sk)->icsk_ca_state)
+		dctcp_react_to_loss(sk);
+	/* We handle RTO in dctcp_cwnd_event to ensure that we perform only
+	 * one loss-adjustment per RTT.
+	 */
 }
 
 static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
@@ -237,6 +234,9 @@ static void dctcp_cwnd_event(struct sock
 	case CA_EVENT_ECN_NO_CE:
 		dctcp_ce_state_1_to_0(sk);
 		break;
+	case CA_EVENT_LOSS:
+		dctcp_react_to_loss(sk);
+		break;
 	default:
 		/* Don't care for the rest. */
 		break;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv4/tcp_input.c linux-libre-4.4.179-gnu/net/ipv4/tcp_input.c
--- linux-libre-4.4.178-gnu/net/ipv4/tcp_input.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv4/tcp_input.c	2019-04-27 03:34:03.000000000 -0400
@@ -365,11 +365,12 @@ static int __tcp_grow_window(const struc
 static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb)
 {
 	struct tcp_sock *tp = tcp_sk(sk);
+	int room;
+
+	room = min_t(int, tp->window_clamp, tcp_space(sk)) - tp->rcv_ssthresh;
 
 	/* Check #1 */
-	if (tp->rcv_ssthresh < tp->window_clamp &&
-	    (int)tp->rcv_ssthresh < tcp_space(sk) &&
-	    !tcp_under_memory_pressure(sk)) {
+	if (room > 0 && !tcp_under_memory_pressure(sk)) {
 		int incr;
 
 		/* Check #2. Increase window, if skb with such overhead
@@ -382,8 +383,7 @@ static void tcp_grow_window(struct sock
 
 		if (incr) {
 			incr = max_t(int, incr, 2 * skb->len);
-			tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr,
-					       tp->window_clamp);
+			tp->rcv_ssthresh += min(room, incr);
 			inet_csk(sk)->icsk_ack.quick |= 1;
 		}
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv6/ip6_output.c linux-libre-4.4.179-gnu/net/ipv6/ip6_output.c
--- linux-libre-4.4.178-gnu/net/ipv6/ip6_output.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv6/ip6_output.c	2019-04-27 03:34:03.000000000 -0400
@@ -575,7 +575,7 @@ int ip6_fragment(struct net *net, struct
 				inet6_sk(skb->sk) : NULL;
 	struct ipv6hdr *tmp_hdr;
 	struct frag_hdr *fh;
-	unsigned int mtu, hlen, left, len;
+	unsigned int mtu, hlen, left, len, nexthdr_offset;
 	int hroom, troom;
 	__be32 frag_id;
 	int ptr, offset = 0, err = 0;
@@ -586,6 +586,7 @@ int ip6_fragment(struct net *net, struct
 		goto fail;
 	hlen = err;
 	nexthdr = *prevhdr;
+	nexthdr_offset = prevhdr - skb_network_header(skb);
 
 	mtu = ip6_skb_dst_mtu(skb);
 
@@ -620,6 +621,7 @@ int ip6_fragment(struct net *net, struct
 	    (err = skb_checksum_help(skb)))
 		goto fail;
 
+	prevhdr = skb_network_header(skb) + nexthdr_offset;
 	hroom = LL_RESERVED_SPACE(rt->dst.dev);
 	if (skb_has_frag_list(skb)) {
 		int first_len = skb_pagelen(skb);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv6/ip6_tunnel.c linux-libre-4.4.179-gnu/net/ipv6/ip6_tunnel.c
--- linux-libre-4.4.178-gnu/net/ipv6/ip6_tunnel.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv6/ip6_tunnel.c	2019-04-27 03:34:03.000000000 -0400
@@ -622,7 +622,7 @@ ip4ip6_err(struct sk_buff *skb, struct i
 					   IPPROTO_IPIP,
 					   RT_TOS(eiph->tos), 0);
 		if (IS_ERR(rt) ||
-		    rt->dst.dev->type != ARPHRD_TUNNEL) {
+		    rt->dst.dev->type != ARPHRD_TUNNEL6) {
 			if (!IS_ERR(rt))
 				ip_rt_put(rt);
 			goto out;
@@ -632,7 +632,7 @@ ip4ip6_err(struct sk_buff *skb, struct i
 		ip_rt_put(rt);
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos,
 				   skb2->dev) ||
-		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL)
+		    skb_dst(skb2)->dev->type != ARPHRD_TUNNEL6)
 			goto out;
 	}
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/ipv6/sit.c linux-libre-4.4.179-gnu/net/ipv6/sit.c
--- linux-libre-4.4.178-gnu/net/ipv6/sit.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/ipv6/sit.c	2019-04-27 03:34:03.000000000 -0400
@@ -693,6 +693,10 @@ static int ipip6_rcv(struct sk_buff *skb
 		if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6)))
 			goto out;
 
+		/* skb can be uncloned in iptunnel_pull_header, so
+		 * old iph is no longer valid
+		 */
+		iph = (const struct iphdr *)skb_mac_header(skb);
 		err = IP_ECN_decapsulate(iph, skb);
 		if (unlikely(err)) {
 			if (log_ecn_error)
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/mac80211/driver-ops.h linux-libre-4.4.179-gnu/net/mac80211/driver-ops.h
--- linux-libre-4.4.178-gnu/net/mac80211/driver-ops.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/mac80211/driver-ops.h	2019-04-27 03:34:03.000000000 -0400
@@ -1157,6 +1157,9 @@ static inline void drv_wake_tx_queue(str
 {
 	struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
 
+	if (local->in_reconfig)
+		return;
+
 	if (!check_sdata_in_driver(sdata))
 		return;
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/netfilter/xt_physdev.c linux-libre-4.4.179-gnu/net/netfilter/xt_physdev.c
--- linux-libre-4.4.178-gnu/net/netfilter/xt_physdev.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/netfilter/xt_physdev.c	2019-04-27 03:34:03.000000000 -0400
@@ -96,8 +96,7 @@ match_outdev:
 static int physdev_mt_check(const struct xt_mtchk_param *par)
 {
 	const struct xt_physdev_info *info = par->matchinfo;
-
-	br_netfilter_enable();
+	static bool brnf_probed __read_mostly;
 
 	if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
 	    info->bitmask & ~XT_PHYSDEV_OP_MASK)
@@ -113,6 +112,12 @@ static int physdev_mt_check(const struct
 		if (par->hook_mask & (1 << NF_INET_LOCAL_OUT))
 			return -EINVAL;
 	}
+
+	if (!brnf_probed) {
+		brnf_probed = true;
+		request_module("br_netfilter");
+	}
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/openvswitch/flow_netlink.c linux-libre-4.4.179-gnu/net/openvswitch/flow_netlink.c
--- linux-libre-4.4.178-gnu/net/openvswitch/flow_netlink.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/openvswitch/flow_netlink.c	2019-04-27 03:34:03.000000000 -0400
@@ -1736,14 +1736,14 @@ static struct nlattr *reserve_sfa_size(s
 
 	struct sw_flow_actions *acts;
 	int new_acts_size;
-	int req_size = NLA_ALIGN(attr_len);
+	size_t req_size = NLA_ALIGN(attr_len);
 	int next_offset = offsetof(struct sw_flow_actions, actions) +
 					(*sfa)->actions_len;
 
 	if (req_size <= (ksize(*sfa) - next_offset))
 		goto out;
 
-	new_acts_size = ksize(*sfa) * 2;
+	new_acts_size = max(next_offset + req_size, ksize(*sfa) * 2);
 
 	if (new_acts_size > MAX_ACTIONS_BUFSIZE) {
 		if ((MAX_ACTIONS_BUFSIZE - next_offset) < req_size) {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/rds/tcp.c linux-libre-4.4.179-gnu/net/rds/tcp.c
--- linux-libre-4.4.178-gnu/net/rds/tcp.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/rds/tcp.c	2019-04-27 03:34:03.000000000 -0400
@@ -346,7 +346,7 @@ static void rds_tcp_kill_sock(struct net
 	list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
 		struct net *c_net = read_pnet(&tc->conn->c_net);
 
-		if (net != c_net || !tc->t_sock)
+		if (net != c_net)
 			continue;
 		list_move_tail(&tc->t_tcp_node, &tmp_list);
 	}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/net/sctp/protocol.c linux-libre-4.4.179-gnu/net/sctp/protocol.c
--- linux-libre-4.4.178-gnu/net/sctp/protocol.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/net/sctp/protocol.c	2019-04-27 03:34:03.000000000 -0400
@@ -598,6 +598,7 @@ out:
 static int sctp_v4_addr_to_user(struct sctp_sock *sp, union sctp_addr *addr)
 {
 	/* No address mapping for V4 sockets */
+	memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
 	return sizeof(struct sockaddr_in);
 }
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/scripts/mod/file2alias.c linux-libre-4.4.179-gnu/scripts/mod/file2alias.c
--- linux-libre-4.4.178-gnu/scripts/mod/file2alias.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/scripts/mod/file2alias.c	2019-04-27 03:34:03.000000000 -0400
@@ -47,49 +47,9 @@ typedef struct {
 struct devtable {
 	const char *device_id; /* name of table, __mod_<name>__*_device_table. */
 	unsigned long id_size;
-	void *function;
+	int (*do_entry)(const char *filename, void *symval, char *alias);
 };
 
-#define ___cat(a,b) a ## b
-#define __cat(a,b) ___cat(a,b)
-
-/* we need some special handling for this host tool running eventually on
- * Darwin. The Mach-O section handling is a bit different than ELF section
- * handling. The differnces in detail are:
- *  a) we have segments which have sections
- *  b) we need a API call to get the respective section symbols */
-#if defined(__MACH__)
-#include <mach-o/getsect.h>
-
-#define INIT_SECTION(name)  do {					\
-		unsigned long name ## _len;				\
-		char *__cat(pstart_,name) = getsectdata("__TEXT",	\
-			#name, &__cat(name,_len));			\
-		char *__cat(pstop_,name) = __cat(pstart_,name) +	\
-			__cat(name, _len);				\
-		__cat(__start_,name) = (void *)__cat(pstart_,name);	\
-		__cat(__stop_,name) = (void *)__cat(pstop_,name);	\
-	} while (0)
-#define SECTION(name)   __attribute__((section("__TEXT, " #name)))
-
-struct devtable **__start___devtable, **__stop___devtable;
-#else
-#define INIT_SECTION(name) /* no-op for ELF */
-#define SECTION(name)   __attribute__((section(#name)))
-
-/* We construct a table of pointers in an ELF section (pointers generally
- * go unpadded by gcc).  ld creates boundary syms for us. */
-extern struct devtable *__start___devtable[], *__stop___devtable[];
-#endif /* __MACH__ */
-
-#if !defined(__used)
-# if __GNUC__ == 3 && __GNUC_MINOR__ < 3
-#  define __used			__attribute__((__unused__))
-# else
-#  define __used			__attribute__((__used__))
-# endif
-#endif
-
 /* Define a variable f that holds the value of field f of struct devid
  * based at address m.
  */
@@ -102,16 +62,6 @@ extern struct devtable *__start___devtab
 #define DEF_FIELD_ADDR(m, devid, f) \
 	typeof(((struct devid *)0)->f) *f = ((m) + OFF_##devid##_##f)
 
-/* Add a table entry.  We test function type matches while we're here. */
-#define ADD_TO_DEVTABLE(device_id, type, function) \
-	static struct devtable __cat(devtable,__LINE__) = {	\
-		device_id + 0*sizeof((function)((const char *)NULL,	\
-						(void *)NULL,		\
-						(char *)NULL)),		\
-		SIZE_##type, (function) };				\
-	static struct devtable *SECTION(__devtable) __used \
-		__cat(devtable_ptr,__LINE__) = &__cat(devtable,__LINE__)
-
 #define ADD(str, sep, cond, field)                              \
 do {                                                            \
         strcat(str, sep);                                       \
@@ -388,7 +338,6 @@ static int do_hid_entry(const char *file
 
 	return 1;
 }
-ADD_TO_DEVTABLE("hid", hid_device_id, do_hid_entry);
 
 /* Looks like: ieee1394:venNmoNspNverN */
 static int do_ieee1394_entry(const char *filename,
@@ -413,7 +362,6 @@ static int do_ieee1394_entry(const char
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("ieee1394", ieee1394_device_id, do_ieee1394_entry);
 
 /* Looks like: pci:vNdNsvNsdNbcNscNiN. */
 static int do_pci_entry(const char *filename,
@@ -457,7 +405,6 @@ static int do_pci_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("pci", pci_device_id, do_pci_entry);
 
 /* looks like: "ccw:tNmNdtNdmN" */
 static int do_ccw_entry(const char *filename,
@@ -481,7 +428,6 @@ static int do_ccw_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("ccw", ccw_device_id, do_ccw_entry);
 
 /* looks like: "ap:tN" */
 static int do_ap_entry(const char *filename,
@@ -492,7 +438,6 @@ static int do_ap_entry(const char *filen
 	sprintf(alias, "ap:t%02X*", dev_type);
 	return 1;
 }
-ADD_TO_DEVTABLE("ap", ap_device_id, do_ap_entry);
 
 /* looks like: "css:tN" */
 static int do_css_entry(const char *filename,
@@ -503,7 +448,6 @@ static int do_css_entry(const char *file
 	sprintf(alias, "css:t%01X", type);
 	return 1;
 }
-ADD_TO_DEVTABLE("css", css_device_id, do_css_entry);
 
 /* Looks like: "serio:tyNprNidNexN" */
 static int do_serio_entry(const char *filename,
@@ -523,7 +467,6 @@ static int do_serio_entry(const char *fi
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry);
 
 /* looks like: "acpi:ACPI0003" or "acpi:PNP0C0B" or "acpi:LNXVIDEO" or
  *             "acpi:bbsspp" (bb=base-class, ss=sub-class, pp=prog-if)
@@ -561,7 +504,6 @@ static int do_acpi_entry(const char *fil
 	}
 	return 1;
 }
-ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry);
 
 /* looks like: "pnp:dD" */
 static void do_pnp_device_entry(void *symval, unsigned long size,
@@ -682,7 +624,6 @@ static int do_pcmcia_entry(const char *f
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("pcmcia", pcmcia_device_id, do_pcmcia_entry);
 
 static int do_of_entry (const char *filename, void *symval, char *alias)
 {
@@ -707,7 +648,6 @@ static int do_of_entry (const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
 
 static int do_vio_entry(const char *filename, void *symval,
 		char *alias)
@@ -727,7 +667,6 @@ static int do_vio_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("vio", vio_device_id, do_vio_entry);
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
@@ -800,7 +739,6 @@ static int do_input_entry(const char *fi
 		do_input(alias, *swbit, 0, INPUT_DEVICE_ID_SW_MAX);
 	return 1;
 }
-ADD_TO_DEVTABLE("input", input_device_id, do_input_entry);
 
 static int do_eisa_entry(const char *filename, void *symval,
 		char *alias)
@@ -812,7 +750,6 @@ static int do_eisa_entry(const char *fil
 		strcat(alias, "*");
 	return 1;
 }
-ADD_TO_DEVTABLE("eisa", eisa_device_id, do_eisa_entry);
 
 /* Looks like: parisc:tNhvNrevNsvN */
 static int do_parisc_entry(const char *filename, void *symval,
@@ -832,7 +769,6 @@ static int do_parisc_entry(const char *f
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("parisc", parisc_device_id, do_parisc_entry);
 
 /* Looks like: sdio:cNvNdN. */
 static int do_sdio_entry(const char *filename,
@@ -849,7 +785,6 @@ static int do_sdio_entry(const char *fil
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("sdio", sdio_device_id, do_sdio_entry);
 
 /* Looks like: ssb:vNidNrevN. */
 static int do_ssb_entry(const char *filename,
@@ -866,7 +801,6 @@ static int do_ssb_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("ssb", ssb_device_id, do_ssb_entry);
 
 /* Looks like: bcma:mNidNrevNclN. */
 static int do_bcma_entry(const char *filename,
@@ -885,7 +819,6 @@ static int do_bcma_entry(const char *fil
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("bcma", bcma_device_id, do_bcma_entry);
 
 /* Looks like: virtio:dNvN */
 static int do_virtio_entry(const char *filename, void *symval,
@@ -901,7 +834,6 @@ static int do_virtio_entry(const char *f
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("virtio", virtio_device_id, do_virtio_entry);
 
 /*
  * Looks like: vmbus:guid
@@ -924,7 +856,6 @@ static int do_vmbus_entry(const char *fi
 
 	return 1;
 }
-ADD_TO_DEVTABLE("vmbus", hv_vmbus_device_id, do_vmbus_entry);
 
 /* Looks like: i2c:S */
 static int do_i2c_entry(const char *filename, void *symval,
@@ -935,7 +866,6 @@ static int do_i2c_entry(const char *file
 
 	return 1;
 }
-ADD_TO_DEVTABLE("i2c", i2c_device_id, do_i2c_entry);
 
 /* Looks like: spi:S */
 static int do_spi_entry(const char *filename, void *symval,
@@ -946,7 +876,6 @@ static int do_spi_entry(const char *file
 
 	return 1;
 }
-ADD_TO_DEVTABLE("spi", spi_device_id, do_spi_entry);
 
 static const struct dmifield {
 	const char *prefix;
@@ -1001,7 +930,6 @@ static int do_dmi_entry(const char *file
 	strcat(alias, ":");
 	return 1;
 }
-ADD_TO_DEVTABLE("dmi", dmi_system_id, do_dmi_entry);
 
 static int do_platform_entry(const char *filename,
 			     void *symval, char *alias)
@@ -1010,7 +938,6 @@ static int do_platform_entry(const char
 	sprintf(alias, PLATFORM_MODULE_PREFIX "%s", *name);
 	return 1;
 }
-ADD_TO_DEVTABLE("platform", platform_device_id, do_platform_entry);
 
 static int do_mdio_entry(const char *filename,
 			 void *symval, char *alias)
@@ -1035,7 +962,6 @@ static int do_mdio_entry(const char *fil
 
 	return 1;
 }
-ADD_TO_DEVTABLE("mdio", mdio_device_id, do_mdio_entry);
 
 /* Looks like: zorro:iN. */
 static int do_zorro_entry(const char *filename, void *symval,
@@ -1046,7 +972,6 @@ static int do_zorro_entry(const char *fi
 	ADD(alias, "i", id != ZORRO_WILDCARD, id);
 	return 1;
 }
-ADD_TO_DEVTABLE("zorro", zorro_device_id, do_zorro_entry);
 
 /* looks like: "pnp:dD" */
 static int do_isapnp_entry(const char *filename,
@@ -1062,7 +987,6 @@ static int do_isapnp_entry(const char *f
 		(function >> 12) & 0x0f, (function >> 8) & 0x0f);
 	return 1;
 }
-ADD_TO_DEVTABLE("isapnp", isapnp_device_id, do_isapnp_entry);
 
 /* Looks like: "ipack:fNvNdN". */
 static int do_ipack_entry(const char *filename,
@@ -1078,7 +1002,6 @@ static int do_ipack_entry(const char *fi
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("ipack", ipack_device_id, do_ipack_entry);
 
 /*
  * Append a match expression for a single masked hex digit.
@@ -1149,7 +1072,6 @@ static int do_amba_entry(const char *fil
 
 	return 1;
 }
-ADD_TO_DEVTABLE("amba", amba_id, do_amba_entry);
 
 /*
  * looks like: "mipscdmm:tN"
@@ -1165,7 +1087,6 @@ static int do_mips_cdmm_entry(const char
 	sprintf(alias, "mipscdmm:t%02X*", type);
 	return 1;
 }
-ADD_TO_DEVTABLE("mipscdmm", mips_cdmm_device_id, do_mips_cdmm_entry);
 
 /* LOOKS like cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:*,FEAT,*
  * All fields are numbers. It would be nicer to use strings for vendor
@@ -1190,7 +1111,6 @@ static int do_x86cpu_entry(const char *f
 		sprintf(alias + strlen(alias), "%04X*", feature);
 	return 1;
 }
-ADD_TO_DEVTABLE("x86cpu", x86_cpu_id, do_x86cpu_entry);
 
 /* LOOKS like cpu:type:*:feature:*FEAT* */
 static int do_cpu_entry(const char *filename, void *symval, char *alias)
@@ -1200,7 +1120,6 @@ static int do_cpu_entry(const char *file
 	sprintf(alias, "cpu:type:*:feature:*%04X*", feature);
 	return 1;
 }
-ADD_TO_DEVTABLE("cpu", cpu_feature, do_cpu_entry);
 
 /* Looks like: mei:S:uuid:N:* */
 static int do_mei_entry(const char *filename, void *symval,
@@ -1219,7 +1138,6 @@ static int do_mei_entry(const char *file
 
 	return 1;
 }
-ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry);
 
 /* Looks like: rapidio:vNdNavNadN */
 static int do_rio_entry(const char *filename,
@@ -1239,7 +1157,6 @@ static int do_rio_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("rapidio", rio_device_id, do_rio_entry);
 
 /* Looks like: ulpi:vNpN */
 static int do_ulpi_entry(const char *filename, void *symval,
@@ -1252,7 +1169,6 @@ static int do_ulpi_entry(const char *fil
 
 	return 1;
 }
-ADD_TO_DEVTABLE("ulpi", ulpi_device_id, do_ulpi_entry);
 
 /* Looks like: hdaudio:vNrNaN */
 static int do_hda_entry(const char *filename, void *symval, char *alias)
@@ -1269,7 +1185,6 @@ static int do_hda_entry(const char *file
 	add_wildcard(alias);
 	return 1;
 }
-ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry);
 
 /* Does namelen bytes of name exactly match the symbol? */
 static bool sym_is(const char *name, unsigned namelen, const char *symbol)
@@ -1283,12 +1198,11 @@ static bool sym_is(const char *name, uns
 static void do_table(void *symval, unsigned long size,
 		     unsigned long id_size,
 		     const char *device_id,
-		     void *function,
+		     int (*do_entry)(const char *filename, void *symval, char *alias),
 		     struct module *mod)
 {
 	unsigned int i;
 	char alias[500];
-	int (*do_entry)(const char *, void *entry, char *alias) = function;
 
 	device_id_check(mod->name, device_id, size, id_size, symval);
 	/* Leave last one: it's the terminator. */
@@ -1302,6 +1216,44 @@ static void do_table(void *symval, unsig
 	}
 }
 
+static const struct devtable devtable[] = {
+	{"hid", SIZE_hid_device_id, do_hid_entry},
+	{"ieee1394", SIZE_ieee1394_device_id, do_ieee1394_entry},
+	{"pci", SIZE_pci_device_id, do_pci_entry},
+	{"ccw", SIZE_ccw_device_id, do_ccw_entry},
+	{"ap", SIZE_ap_device_id, do_ap_entry},
+	{"css", SIZE_css_device_id, do_css_entry},
+	{"serio", SIZE_serio_device_id, do_serio_entry},
+	{"acpi", SIZE_acpi_device_id, do_acpi_entry},
+	{"pcmcia", SIZE_pcmcia_device_id, do_pcmcia_entry},
+	{"vio", SIZE_vio_device_id, do_vio_entry},
+	{"input", SIZE_input_device_id, do_input_entry},
+	{"eisa", SIZE_eisa_device_id, do_eisa_entry},
+	{"parisc", SIZE_parisc_device_id, do_parisc_entry},
+	{"sdio", SIZE_sdio_device_id, do_sdio_entry},
+	{"ssb", SIZE_ssb_device_id, do_ssb_entry},
+	{"bcma", SIZE_bcma_device_id, do_bcma_entry},
+	{"virtio", SIZE_virtio_device_id, do_virtio_entry},
+	{"vmbus", SIZE_hv_vmbus_device_id, do_vmbus_entry},
+	{"i2c", SIZE_i2c_device_id, do_i2c_entry},
+	{"spi", SIZE_spi_device_id, do_spi_entry},
+	{"dmi", SIZE_dmi_system_id, do_dmi_entry},
+	{"platform", SIZE_platform_device_id, do_platform_entry},
+	{"mdio", SIZE_mdio_device_id, do_mdio_entry},
+	{"zorro", SIZE_zorro_device_id, do_zorro_entry},
+	{"isapnp", SIZE_isapnp_device_id, do_isapnp_entry},
+	{"ipack", SIZE_ipack_device_id, do_ipack_entry},
+	{"amba", SIZE_amba_id, do_amba_entry},
+	{"mipscdmm", SIZE_mips_cdmm_device_id, do_mips_cdmm_entry},
+	{"x86cpu", SIZE_x86_cpu_id, do_x86cpu_entry},
+	{"cpu", SIZE_cpu_feature, do_cpu_entry},
+	{"mei", SIZE_mei_cl_device_id, do_mei_entry},
+	{"rapidio", SIZE_rio_device_id, do_rio_entry},
+	{"ulpi", SIZE_ulpi_device_id, do_ulpi_entry},
+	{"hdaudio", SIZE_hda_device_id, do_hda_entry},
+	{"of", SIZE_of_device_id, do_of_entry},
+};
+
 /* Create MODULE_ALIAS() statements.
  * At this time, we cannot write the actual output C source yet,
  * so we write into the mod->dev_table_buf buffer. */
@@ -1354,13 +1306,14 @@ void handle_moddevtable(struct module *m
 	else if (sym_is(name, namelen, "pnp_card"))
 		do_pnp_card_entries(symval, sym->st_size, mod);
 	else {
-		struct devtable **p;
-		INIT_SECTION(__devtable);
+		int i;
 
-		for (p = __start___devtable; p < __stop___devtable; p++) {
-			if (sym_is(name, namelen, (*p)->device_id)) {
-				do_table(symval, sym->st_size, (*p)->id_size,
-					 (*p)->device_id, (*p)->function, mod);
+		for (i = 0; i < ARRAY_SIZE(devtable); i++) {
+			const struct devtable *p = &devtable[i];
+
+			if (sym_is(name, namelen, p->device_id)) {
+				do_table(symval, sym->st_size, p->id_size,
+					 p->device_id, p->do_entry, mod);
 				break;
 			}
 		}
diff -druNp --no-dereference linux-libre-4.4.178-gnu/security/device_cgroup.c linux-libre-4.4.179-gnu/security/device_cgroup.c
--- linux-libre-4.4.178-gnu/security/device_cgroup.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/security/device_cgroup.c	2019-04-27 03:34:03.000000000 -0400
@@ -568,7 +568,7 @@ static int propagate_exception(struct de
 		    devcg->behavior == DEVCG_DEFAULT_ALLOW) {
 			rc = dev_exception_add(devcg, ex);
 			if (rc)
-				break;
+				return rc;
 		} else {
 			/*
 			 * in the other possible cases:
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/core/info.c linux-libre-4.4.179-gnu/sound/core/info.c
--- linux-libre-4.4.178-gnu/sound/core/info.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/core/info.c	2019-04-27 03:34:03.000000000 -0400
@@ -724,8 +724,11 @@ snd_info_create_entry(const char *name,
 	INIT_LIST_HEAD(&entry->children);
 	INIT_LIST_HEAD(&entry->list);
 	entry->parent = parent;
-	if (parent)
+	if (parent) {
+		mutex_lock(&parent->access);
 		list_add_tail(&entry->list, &parent->children);
+		mutex_unlock(&parent->access);
+	}
 	return entry;
 }
 
@@ -809,7 +812,12 @@ void snd_info_free_entry(struct snd_info
 	list_for_each_entry_safe(p, n, &entry->children, list)
 		snd_info_free_entry(p);
 
-	list_del(&entry->list);
+	p = entry->parent;
+	if (p) {
+		mutex_lock(&p->access);
+		list_del(&entry->list);
+		mutex_unlock(&p->access);
+	}
 	kfree(entry->name);
 	if (entry->private_free)
 		entry->private_free(entry);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/core/init.c linux-libre-4.4.179-gnu/sound/core/init.c
--- linux-libre-4.4.178-gnu/sound/core/init.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/core/init.c	2019-04-27 03:34:03.000000000 -0400
@@ -405,14 +405,7 @@ int snd_card_disconnect(struct snd_card
 	card->shutdown = 1;
 	spin_unlock(&card->files_lock);
 
-	/* phase 1: disable fops (user space) operations for ALSA API */
-	mutex_lock(&snd_card_mutex);
-	snd_cards[card->number] = NULL;
-	clear_bit(card->number, snd_cards_lock);
-	mutex_unlock(&snd_card_mutex);
-	
-	/* phase 2: replace file->f_op with special dummy operations */
-	
+	/* replace file->f_op with special dummy operations */
 	spin_lock(&card->files_lock);
 	list_for_each_entry(mfile, &card->files_list, list) {
 		/* it's critical part, use endless loop */
@@ -428,7 +421,7 @@ int snd_card_disconnect(struct snd_card
 	}
 	spin_unlock(&card->files_lock);	
 
-	/* phase 3: notify all connected devices about disconnection */
+	/* notify all connected devices about disconnection */
 	/* at this point, they cannot respond to any calls except release() */
 
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
@@ -444,6 +437,13 @@ int snd_card_disconnect(struct snd_card
 		device_del(&card->card_dev);
 		card->registered = false;
 	}
+
+	/* disable fops (user space) operations for ALSA API */
+	mutex_lock(&snd_card_mutex);
+	snd_cards[card->number] = NULL;
+	clear_bit(card->number, snd_cards_lock);
+	mutex_unlock(&snd_card_mutex);
+
 #ifdef CONFIG_PM
 	wake_up(&card->power_sleep);
 #endif
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/core/pcm_native.c linux-libre-4.4.179-gnu/sound/core/pcm_native.c
--- linux-libre-4.4.178-gnu/sound/core/pcm_native.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/core/pcm_native.c	2019-04-27 03:34:03.000000000 -0400
@@ -1342,6 +1342,14 @@ int snd_pcm_suspend_all(struct snd_pcm *
 			/* FIXME: the open/close code should lock this as well */
 			if (substream->runtime == NULL)
 				continue;
+
+			/*
+			 * Skip BE dai link PCM's that are internal and may
+			 * not have their substream ops set.
+			 */
+			if (!substream->ops)
+				continue;
+
 			err = snd_pcm_suspend(substream);
 			if (err < 0 && err != -EBUSY)
 				return err;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/core/seq/seq_clientmgr.c linux-libre-4.4.179-gnu/sound/core/seq/seq_clientmgr.c
--- linux-libre-4.4.178-gnu/sound/core/seq/seq_clientmgr.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/core/seq/seq_clientmgr.c	2019-04-27 03:34:03.000000000 -0400
@@ -1249,7 +1249,7 @@ static int snd_seq_ioctl_set_client_info
 
 	/* fill the info fields */
 	if (client_info.name[0])
-		strlcpy(client->name, client_info.name, sizeof(client->name));
+		strscpy(client->name, client_info.name, sizeof(client->name));
 
 	client->filter = client_info.filter;
 	client->event_lost = client_info.event_lost;
@@ -1558,7 +1558,7 @@ static int snd_seq_ioctl_create_queue(st
 	/* set queue name */
 	if (! info.name[0])
 		snprintf(info.name, sizeof(info.name), "Queue-%d", q->queue);
-	strlcpy(q->name, info.name, sizeof(q->name));
+	strscpy(q->name, info.name, sizeof(q->name));
 	snd_use_lock_free(&q->use_lock);
 
 	if (copy_to_user(arg, &info, sizeof(info)))
@@ -1636,7 +1636,7 @@ static int snd_seq_ioctl_set_queue_info(
 		queuefree(q);
 		return -EPERM;
 	}
-	strlcpy(q->name, info.name, sizeof(q->name));
+	strscpy(q->name, info.name, sizeof(q->name));
 	queuefree(q);
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/drivers/opl3/opl3_voice.h linux-libre-4.4.179-gnu/sound/drivers/opl3/opl3_voice.h
--- linux-libre-4.4.178-gnu/sound/drivers/opl3/opl3_voice.h	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/drivers/opl3/opl3_voice.h	2019-04-27 03:34:03.000000000 -0400
@@ -41,7 +41,7 @@ void snd_opl3_timer_func(unsigned long d
 
 /* Prototypes for opl3_drums.c */
 void snd_opl3_load_drums(struct snd_opl3 *opl3);
-void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
+void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
 
 /* Prototypes for opl3_oss.c */
 #ifdef CONFIG_SND_SEQUENCER_OSS
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/isa/sb/sb8.c linux-libre-4.4.179-gnu/sound/isa/sb/sb8.c
--- linux-libre-4.4.178-gnu/sound/isa/sb/sb8.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/isa/sb/sb8.c	2019-04-27 03:34:03.000000000 -0400
@@ -111,6 +111,10 @@ static int snd_sb8_probe(struct device *
 
 	/* block the 0x388 port to avoid PnP conflicts */
 	acard->fm_res = request_region(0x388, 4, "SoundBlaster FM");
+	if (!acard->fm_res) {
+		err = -EBUSY;
+		goto _err;
+	}
 
 	if (port[dev] != SNDRV_AUTO_PORT) {
 		if ((err = snd_sbdsp_create(card, port[dev], irq[dev],
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/pci/echoaudio/echoaudio.c linux-libre-4.4.179-gnu/sound/pci/echoaudio/echoaudio.c
--- linux-libre-4.4.178-gnu/sound/pci/echoaudio/echoaudio.c	2019-04-03 20:40:09.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/pci/echoaudio/echoaudio.c	2019-04-28 03:25:16.000000000 -0400
@@ -1953,6 +1953,11 @@ static int snd_echo_create(struct snd_ca
 	}
 	chip->dsp_registers = (volatile u32 __iomem *)
 		ioremap_nocache(chip->dsp_registers_phys, sz);
+	if (!chip->dsp_registers) {
+		dev_err(chip->card->dev, "ioremap failed\n");
+		snd_echo_free(chip);
+		return -ENOMEM;
+	}
 
 	if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
 			KBUILD_MODNAME, chip)) {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/soc/fsl/fsl-asoc-card.c linux-libre-4.4.179-gnu/sound/soc/fsl/fsl-asoc-card.c
--- linux-libre-4.4.178-gnu/sound/soc/fsl/fsl-asoc-card.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/soc/fsl/fsl-asoc-card.c	2019-04-27 03:34:03.000000000 -0400
@@ -659,6 +659,7 @@ static int fsl_asoc_card_probe(struct pl
 asrc_fail:
 	of_node_put(asrc_np);
 	of_node_put(codec_np);
+	put_device(&cpu_pdev->dev);
 fail:
 	of_node_put(cpu_np);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/soc/fsl/fsl_esai.c linux-libre-4.4.179-gnu/sound/soc/fsl/fsl_esai.c
--- linux-libre-4.4.178-gnu/sound/soc/fsl/fsl_esai.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/soc/fsl/fsl_esai.c	2019-04-27 03:34:03.000000000 -0400
@@ -57,6 +57,8 @@ struct fsl_esai {
 	u32 fifo_depth;
 	u32 slot_width;
 	u32 slots;
+	u32 tx_mask;
+	u32 rx_mask;
 	u32 hck_rate[2];
 	u32 sck_rate[2];
 	bool hck_dir[2];
@@ -357,21 +359,13 @@ static int fsl_esai_set_dai_tdm_slot(str
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR,
 			   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(slots));
 
-	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMA,
-			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(tx_mask));
-	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMB,
-			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(tx_mask));
-
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR,
 			   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(slots));
 
-	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMA,
-			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(rx_mask));
-	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMB,
-			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(rx_mask));
-
 	esai_priv->slot_width = slot_width;
 	esai_priv->slots = slots;
+	esai_priv->tx_mask = tx_mask;
+	esai_priv->rx_mask = rx_mask;
 
 	return 0;
 }
@@ -582,6 +576,7 @@ static int fsl_esai_trigger(struct snd_p
 	bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
 	u8 i, channels = substream->runtime->channels;
 	u32 pins = DIV_ROUND_UP(channels, esai_priv->slots);
+	u32 mask;
 
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
@@ -594,15 +589,38 @@ static int fsl_esai_trigger(struct snd_p
 		for (i = 0; tx && i < channels; i++)
 			regmap_write(esai_priv->regmap, REG_ESAI_ETDR, 0x0);
 
+		/*
+		 * When set the TE/RE in the end of enablement flow, there
+		 * will be channel swap issue for multi data line case.
+		 * In order to workaround this issue, we switch the bit
+		 * enablement sequence to below sequence
+		 * 1) clear the xSMB & xSMA: which is done in probe and
+		 *                           stop state.
+		 * 2) set TE/RE
+		 * 3) set xSMB
+		 * 4) set xSMA:  xSMA is the last one in this flow, which
+		 *               will trigger esai to start.
+		 */
 		regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx),
 				   tx ? ESAI_xCR_TE_MASK : ESAI_xCR_RE_MASK,
 				   tx ? ESAI_xCR_TE(pins) : ESAI_xCR_RE(pins));
+		mask = tx ? esai_priv->tx_mask : esai_priv->rx_mask;
+
+		regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMB(tx),
+				   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(mask));
+		regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMA(tx),
+				   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(mask));
+
 		break;
 	case SNDRV_PCM_TRIGGER_SUSPEND:
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 		regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx),
 				   tx ? ESAI_xCR_TE_MASK : ESAI_xCR_RE_MASK, 0);
+		regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMA(tx),
+				   ESAI_xSMA_xS_MASK, 0);
+		regmap_update_bits(esai_priv->regmap, REG_ESAI_xSMB(tx),
+				   ESAI_xSMB_xS_MASK, 0);
 
 		/* Disable and reset FIFO */
 		regmap_update_bits(esai_priv->regmap, REG_ESAI_xFCR(tx),
@@ -887,6 +905,15 @@ static int fsl_esai_probe(struct platfor
 		return ret;
 	}
 
+	esai_priv->tx_mask = 0xFFFFFFFF;
+	esai_priv->rx_mask = 0xFFFFFFFF;
+
+	/* Clear the TSMA, TSMB, RSMA, RSMB */
+	regmap_write(esai_priv->regmap, REG_ESAI_TSMA, 0);
+	regmap_write(esai_priv->regmap, REG_ESAI_TSMB, 0);
+	regmap_write(esai_priv->regmap, REG_ESAI_RSMA, 0);
+	regmap_write(esai_priv->regmap, REG_ESAI_RSMB, 0);
+
 	ret = devm_snd_soc_register_component(&pdev->dev, &fsl_esai_component,
 					      &fsl_esai_dai, 1);
 	if (ret) {
diff -druNp --no-dereference linux-libre-4.4.178-gnu/sound/soc/fsl/imx-sgtl5000.c linux-libre-4.4.179-gnu/sound/soc/fsl/imx-sgtl5000.c
--- linux-libre-4.4.178-gnu/sound/soc/fsl/imx-sgtl5000.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/sound/soc/fsl/imx-sgtl5000.c	2019-04-27 03:34:03.000000000 -0400
@@ -115,6 +115,7 @@ static int imx_sgtl5000_probe(struct pla
 		ret = -EPROBE_DEFER;
 		goto fail;
 	}
+	put_device(&ssi_pdev->dev);
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
 		dev_err(&pdev->dev, "failed to find codec platform device\n");
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/lib/traceevent/event-parse.c linux-libre-4.4.179-gnu/tools/lib/traceevent/event-parse.c
--- linux-libre-4.4.178-gnu/tools/lib/traceevent/event-parse.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/lib/traceevent/event-parse.c	2019-04-27 03:34:03.000000000 -0400
@@ -2419,7 +2419,7 @@ static int arg_num_eval(struct print_arg
 static char *arg_eval (struct print_arg *arg)
 {
 	long long val;
-	static char buf[20];
+	static char buf[24];
 
 	switch (arg->type) {
 	case PRINT_ATOM:
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/perf/builtin-top.c linux-libre-4.4.179-gnu/tools/perf/builtin-top.c
--- linux-libre-4.4.178-gnu/tools/perf/builtin-top.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/perf/builtin-top.c	2019-04-27 03:34:03.000000000 -0400
@@ -1320,8 +1320,9 @@ int cmd_top(int argc, const char **argv,
 	symbol_conf.priv_size = sizeof(struct annotation);
 
 	symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);
-	if (symbol__init(NULL) < 0)
-		return -1;
+	status = symbol__init(NULL);
+	if (status < 0)
+		goto out_delete_evlist;
 
 	sort__setup_elide(stdout);
 
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/perf/tests/evsel-tp-sched.c linux-libre-4.4.179-gnu/tools/perf/tests/evsel-tp-sched.c
--- linux-libre-4.4.178-gnu/tools/perf/tests/evsel-tp-sched.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/perf/tests/evsel-tp-sched.c	2019-04-27 03:34:03.000000000 -0400
@@ -42,7 +42,7 @@ int test__perf_evsel__tp_sched_test(void
 		return -1;
 	}
 
-	if (perf_evsel__test_field(evsel, "prev_comm", 16, true))
+	if (perf_evsel__test_field(evsel, "prev_comm", 16, false))
 		ret = -1;
 
 	if (perf_evsel__test_field(evsel, "prev_pid", 4, true))
@@ -54,7 +54,7 @@ int test__perf_evsel__tp_sched_test(void
 	if (perf_evsel__test_field(evsel, "prev_state", sizeof(long), true))
 		ret = -1;
 
-	if (perf_evsel__test_field(evsel, "next_comm", 16, true))
+	if (perf_evsel__test_field(evsel, "next_comm", 16, false))
 		ret = -1;
 
 	if (perf_evsel__test_field(evsel, "next_pid", 4, true))
@@ -72,7 +72,7 @@ int test__perf_evsel__tp_sched_test(void
 		return -1;
 	}
 
-	if (perf_evsel__test_field(evsel, "comm", 16, true))
+	if (perf_evsel__test_field(evsel, "comm", 16, false))
 		ret = -1;
 
 	if (perf_evsel__test_field(evsel, "pid", 4, true))
@@ -84,5 +84,6 @@ int test__perf_evsel__tp_sched_test(void
 	if (perf_evsel__test_field(evsel, "target_cpu", 4, true))
 		ret = -1;
 
+	perf_evsel__delete(evsel);
 	return ret;
 }
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/perf/tests/openat-syscall-all-cpus.c linux-libre-4.4.179-gnu/tools/perf/tests/openat-syscall-all-cpus.c
--- linux-libre-4.4.178-gnu/tools/perf/tests/openat-syscall-all-cpus.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/perf/tests/openat-syscall-all-cpus.c	2019-04-27 03:34:03.000000000 -0400
@@ -35,7 +35,7 @@ int test__openat_syscall_event_on_all_cp
 	if (IS_ERR(evsel)) {
 		tracing_path__strerror_open_tp(errno, errbuf, sizeof(errbuf), "syscalls", "sys_enter_openat");
 		pr_debug("%s\n", errbuf);
-		goto out_thread_map_delete;
+		goto out_cpu_map_delete;
 	}
 
 	if (perf_evsel__open(evsel, cpus, threads) < 0) {
@@ -109,6 +109,8 @@ out_close_fd:
 	perf_evsel__close_fd(evsel, 1, threads->nr);
 out_evsel_delete:
 	perf_evsel__delete(evsel);
+out_cpu_map_delete:
+	cpu_map__put(cpus);
 out_thread_map_delete:
 	thread_map__put(threads);
 	return err;
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/perf/util/evsel.c linux-libre-4.4.179-gnu/tools/perf/util/evsel.c
--- linux-libre-4.4.178-gnu/tools/perf/util/evsel.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/perf/util/evsel.c	2019-04-27 03:34:03.000000000 -0400
@@ -1051,6 +1051,7 @@ void perf_evsel__exit(struct perf_evsel
 {
 	assert(list_empty(&evsel->node));
 	assert(evsel->evlist == NULL);
+	perf_evsel__free_counts(evsel);
 	perf_evsel__free_fd(evsel);
 	perf_evsel__free_id(evsel);
 	perf_evsel__free_config_terms(evsel);
diff -druNp --no-dereference linux-libre-4.4.178-gnu/tools/power/x86/turbostat/turbostat.c linux-libre-4.4.179-gnu/tools/power/x86/turbostat/turbostat.c
--- linux-libre-4.4.178-gnu/tools/power/x86/turbostat/turbostat.c	2019-04-03 00:23:29.000000000 -0400
+++ linux-libre-4.4.179-gnu/tools/power/x86/turbostat/turbostat.c	2019-04-27 03:34:03.000000000 -0400
@@ -3089,6 +3089,9 @@ int fork_it(char **argv)
 		signal(SIGQUIT, SIG_IGN);
 		if (waitpid(child_pid, &status, 0) == -1)
 			err(status, "waitpid");
+
+		if (WIFEXITED(status))
+			status = WEXITSTATUS(status);
 	}
 	/*
 	 * n.b. fork_it() does not check for errors from for_all_cpus()
