diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arc/include/asm/mach_desc.h linux-libre-4.4.152-gnu/arch/arc/include/asm/mach_desc.h
--- linux-libre-4.4.151-gnu/arch/arc/include/asm/mach_desc.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arc/include/asm/mach_desc.h	2018-08-24 07:27:02.000000000 -0400
@@ -34,9 +34,7 @@ struct machine_desc {
 	const char		*name;
 	const char		**dt_compat;
 	void			(*init_early)(void);
-#ifdef CONFIG_SMP
 	void			(*init_per_cpu)(unsigned int);
-#endif
 	void			(*init_machine)(void);
 	void			(*init_late)(void);
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arc/kernel/irq.c linux-libre-4.4.152-gnu/arch/arc/kernel/irq.c
--- linux-libre-4.4.151-gnu/arch/arc/kernel/irq.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arc/kernel/irq.c	2018-08-24 07:27:02.000000000 -0400
@@ -31,10 +31,10 @@ void __init init_IRQ(void)
 	/* a SMP H/w block could do IPI IRQ request here */
 	if (plat_smp_ops.init_per_cpu)
 		plat_smp_ops.init_per_cpu(smp_processor_id());
+#endif
 
 	if (machine_desc->init_per_cpu)
 		machine_desc->init_per_cpu(smp_processor_id());
-#endif
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arc/Makefile linux-libre-4.4.152-gnu/arch/arc/Makefile
--- linux-libre-4.4.151-gnu/arch/arc/Makefile	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arc/Makefile	2018-08-24 07:27:02.000000000 -0400
@@ -14,7 +14,7 @@ endif
 
 KBUILD_DEFCONFIG := nsim_700_defconfig
 
-cflags-y	+= -fno-common -pipe -fno-builtin -D__linux__
+cflags-y	+= -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
 cflags-$(CONFIG_ISA_ARCOMPACT)	+= -mA7
 cflags-$(CONFIG_ISA_ARCV2)	+= -mcpu=archs
 
@@ -137,16 +137,3 @@ dtbs: scripts
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
-
-# Hacks to enable final link due to absence of link-time branch relexation
-# and gcc choosing optimal(shorter) branches at -O3
-#
-# vineetg Feb 2010: -mlong-calls switched off for overall kernel build
-# However lib/decompress_inflate.o (.init.text) calls
-# zlib_inflate_workspacesize (.text) causing relocation errors.
-# Thus forcing all exten calls in this file to be long calls
-export CFLAGS_decompress_inflate.o = -mmedium-calls
-export CFLAGS_initramfs.o = -mmedium-calls
-ifdef CONFIG_SMP
-export CFLAGS_core.o = -mmedium-calls
-endif
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/boot/dts/am3517.dtsi linux-libre-4.4.152-gnu/arch/arm/boot/dts/am3517.dtsi
--- linux-libre-4.4.151-gnu/arch/arm/boot/dts/am3517.dtsi	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/boot/dts/am3517.dtsi	2018-08-24 07:27:02.000000000 -0400
@@ -74,6 +74,11 @@
 	};
 };
 
+/* Table Table 5-79 of the TRM shows 480ab000 is reserved */
+&usb_otg_hs {
+	status = "disabled";
+};
+
 &iva {
 	status = "disabled";
 };
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/boot/dts/am437x-sk-evm.dts linux-libre-4.4.152-gnu/arch/arm/boot/dts/am437x-sk-evm.dts
--- linux-libre-4.4.151-gnu/arch/arm/boot/dts/am437x-sk-evm.dts	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/boot/dts/am437x-sk-evm.dts	2018-08-24 07:27:02.000000000 -0400
@@ -508,6 +508,8 @@
 
 		touchscreen-size-x = <480>;
 		touchscreen-size-y = <272>;
+
+		wakeup-source;
 	};
 
 	tlv320aic3106: tlv320aic3106@1b {
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/boot/dts/bcm-cygnus.dtsi linux-libre-4.4.152-gnu/arch/arm/boot/dts/bcm-cygnus.dtsi
--- linux-libre-4.4.151-gnu/arch/arm/boot/dts/bcm-cygnus.dtsi	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/boot/dts/bcm-cygnus.dtsi	2018-08-24 07:27:02.000000000 -0400
@@ -110,7 +110,7 @@
 			reg = <0x18008000 0x100>;
 			#address-cells = <1>;
 			#size-cells = <0>;
-			interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
+			interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
 			clock-frequency = <100000>;
 			status = "disabled";
 		};
@@ -138,7 +138,7 @@
 			reg = <0x1800b000 0x100>;
 			#address-cells = <1>;
 			#size-cells = <0>;
-			interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
+			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			clock-frequency = <100000>;
 			status = "disabled";
 		};
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/boot/dts/da850.dtsi linux-libre-4.4.152-gnu/arch/arm/boot/dts/da850.dtsi
--- linux-libre-4.4.151-gnu/arch/arm/boot/dts/da850.dtsi	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/boot/dts/da850.dtsi	2018-08-24 07:27:02.000000000 -0400
@@ -267,11 +267,7 @@
 			compatible = "ti,dm6441-gpio";
 			gpio-controller;
 			reg = <0x226000 0x1000>;
-			interrupts = <42 IRQ_TYPE_EDGE_BOTH
-				43 IRQ_TYPE_EDGE_BOTH 44 IRQ_TYPE_EDGE_BOTH
-				45 IRQ_TYPE_EDGE_BOTH 46 IRQ_TYPE_EDGE_BOTH
-				47 IRQ_TYPE_EDGE_BOTH 48 IRQ_TYPE_EDGE_BOTH
-				49 IRQ_TYPE_EDGE_BOTH 50 IRQ_TYPE_EDGE_BOTH>;
+			interrupts = <42 43 44 45 46 47 48 49 50>;
 			ti,ngpio = <144>;
 			ti,davinci-gpio-unbanked = <0>;
 			status = "disabled";
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/configs/imx_v4_v5_defconfig linux-libre-4.4.152-gnu/arch/arm/configs/imx_v4_v5_defconfig
--- linux-libre-4.4.151-gnu/arch/arm/configs/imx_v4_v5_defconfig	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/configs/imx_v4_v5_defconfig	2018-08-24 07:27:02.000000000 -0400
@@ -145,9 +145,11 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_ULPI=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_ETH=m
+CONFIG_USB_ULPI_BUS=y
 CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/configs/imx_v6_v7_defconfig linux-libre-4.4.152-gnu/arch/arm/configs/imx_v6_v7_defconfig
--- linux-libre-4.4.151-gnu/arch/arm/configs/imx_v6_v7_defconfig	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/configs/imx_v6_v7_defconfig	2018-08-24 07:27:02.000000000 -0400
@@ -261,6 +261,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_ULPI=y
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -287,6 +288,7 @@ CONFIG_USB_G_NCM=m
 CONFIG_USB_GADGETFS=m
 CONFIG_USB_MASS_STORAGE=m
 CONFIG_USB_G_SERIAL=m
+CONFIG_USB_ULPI_BUS=y
 CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/mach-pxa/irq.c linux-libre-4.4.152-gnu/arch/arm/mach-pxa/irq.c
--- linux-libre-4.4.151-gnu/arch/arm/mach-pxa/irq.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/mach-pxa/irq.c	2018-08-24 07:27:02.000000000 -0400
@@ -185,7 +185,7 @@ static int pxa_irq_suspend(void)
 {
 	int i;
 
-	for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
+	for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
 		void __iomem *base = irq_base(i);
 
 		saved_icmr[i] = __raw_readl(base + ICMR);
@@ -204,7 +204,7 @@ static void pxa_irq_resume(void)
 {
 	int i;
 
-	for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
+	for (i = 0; i < DIV_ROUND_UP(pxa_internal_irq_nr, 32); i++) {
 		void __iomem *base = irq_base(i);
 
 		__raw_writel(saved_icmr[i], base + ICMR);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm/mm/init.c linux-libre-4.4.152-gnu/arch/arm/mm/init.c
--- linux-libre-4.4.151-gnu/arch/arm/mm/init.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm/mm/init.c	2018-08-24 07:27:02.000000000 -0400
@@ -716,19 +716,28 @@ int __mark_rodata_ro(void *unused)
 	return 0;
 }
 
+static int kernel_set_to_readonly __read_mostly;
+
 void mark_rodata_ro(void)
 {
+	kernel_set_to_readonly = 1;
 	stop_machine(__mark_rodata_ro, NULL, NULL);
 }
 
 void set_kernel_text_rw(void)
 {
+	if (!kernel_set_to_readonly)
+		return;
+
 	set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
 				current->active_mm);
 }
 
 void set_kernel_text_ro(void)
 {
+	if (!kernel_set_to_readonly)
+		return;
+
 	set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
 				current->active_mm);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/arm64/kernel/smp.c linux-libre-4.4.152-gnu/arch/arm64/kernel/smp.c
--- linux-libre-4.4.151-gnu/arch/arm64/kernel/smp.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/arm64/kernel/smp.c	2018-08-24 07:27:02.000000000 -0400
@@ -131,7 +131,7 @@ static void smp_store_cpu_info(unsigned
  * This is the secondary CPU boot entry.  We're using this CPUs
  * idle thread stack, but a set of temporary page tables.
  */
-asmlinkage void secondary_start_kernel(void)
+asmlinkage notrace void secondary_start_kernel(void)
 {
 	struct mm_struct *mm = &init_mm;
 	unsigned int cpu = smp_processor_id();
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/m68k/include/asm/mcf_pgalloc.h linux-libre-4.4.152-gnu/arch/m68k/include/asm/mcf_pgalloc.h
--- linux-libre-4.4.151-gnu/arch/m68k/include/asm/mcf_pgalloc.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/m68k/include/asm/mcf_pgalloc.h	2018-08-24 07:27:02.000000000 -0400
@@ -43,6 +43,7 @@ extern inline pmd_t *pmd_alloc_kernel(pg
 static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page,
 				  unsigned long address)
 {
+	pgtable_page_dtor(page);
 	__free_page(page);
 }
 
@@ -73,8 +74,9 @@ static inline struct page *pte_alloc_one
 	return page;
 }
 
-extern inline void pte_free(struct mm_struct *mm, struct page *page)
+static inline void pte_free(struct mm_struct *mm, struct page *page)
 {
+	pgtable_page_dtor(page);
 	__free_page(page);
 }
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/parisc/include/asm/spinlock.h linux-libre-4.4.152-gnu/arch/parisc/include/asm/spinlock.h
--- linux-libre-4.4.151-gnu/arch/parisc/include/asm/spinlock.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/parisc/include/asm/spinlock.h	2018-08-24 07:27:02.000000000 -0400
@@ -21,7 +21,6 @@ static inline void arch_spin_lock_flags(
 {
 	volatile unsigned int *a;
 
-	mb();
 	a = __ldcw_align(x);
 	while (__ldcw(a) == 0)
 		while (*a == 0)
@@ -31,16 +30,15 @@ static inline void arch_spin_lock_flags(
 				local_irq_disable();
 			} else
 				cpu_relax();
-	mb();
 }
 
 static inline void arch_spin_unlock(arch_spinlock_t *x)
 {
 	volatile unsigned int *a;
-	mb();
+
 	a = __ldcw_align(x);
-	*a = 1;
 	mb();
+	*a = 1;
 }
 
 static inline int arch_spin_trylock(arch_spinlock_t *x)
@@ -48,10 +46,8 @@ static inline int arch_spin_trylock(arch
 	volatile unsigned int *a;
 	int ret;
 
-	mb();
 	a = __ldcw_align(x);
         ret = __ldcw(a) != 0;
-	mb();
 
 	return ret;
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/arch/parisc/kernel/syscall.S linux-libre-4.4.152-gnu/arch/parisc/kernel/syscall.S
--- linux-libre-4.4.151-gnu/arch/parisc/kernel/syscall.S	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/arch/parisc/kernel/syscall.S	2018-08-24 07:27:02.000000000 -0400
@@ -627,12 +627,12 @@ cas_action:
 	stw	%r1, 4(%sr2,%r20)
 #endif
 	/* The load and store could fail */
-1:	ldw,ma	0(%r26), %r28
+1:	ldw	0(%r26), %r28
 	sub,<>	%r28, %r25, %r0
-2:	stw,ma	%r24, 0(%r26)
+2:	stw	%r24, 0(%r26)
 	/* Free lock */
 	sync
-	stw,ma	%r20, 0(%sr2,%r20)
+	stw	%r20, 0(%sr2,%r20)
 #if ENABLE_LWS_DEBUG
 	/* Clear thread register indicator */
 	stw	%r0, 4(%sr2,%r20)
@@ -796,30 +796,30 @@ cas2_action:
 	ldo	1(%r0),%r28
 
 	/* 8bit CAS */
-13:	ldb,ma	0(%r26), %r29
+13:	ldb	0(%r26), %r29
 	sub,=	%r29, %r25, %r0
 	b,n	cas2_end
-14:	stb,ma	%r24, 0(%r26)
+14:	stb	%r24, 0(%r26)
 	b	cas2_end
 	copy	%r0, %r28
 	nop
 	nop
 
 	/* 16bit CAS */
-15:	ldh,ma	0(%r26), %r29
+15:	ldh	0(%r26), %r29
 	sub,=	%r29, %r25, %r0
 	b,n	cas2_end
-16:	sth,ma	%r24, 0(%r26)
+16:	sth	%r24, 0(%r26)
 	b	cas2_end
 	copy	%r0, %r28
 	nop
 	nop
 
 	/* 32bit CAS */
-17:	ldw,ma	0(%r26), %r29
+17:	ldw	0(%r26), %r29
 	sub,=	%r29, %r25, %r0
 	b,n	cas2_end
-18:	stw,ma	%r24, 0(%r26)
+18:	stw	%r24, 0(%r26)
 	b	cas2_end
 	copy	%r0, %r28
 	nop
@@ -827,10 +827,10 @@ cas2_action:
 
 	/* 64bit CAS */
 #ifdef CONFIG_64BIT
-19:	ldd,ma	0(%r26), %r29
+19:	ldd	0(%r26), %r29
 	sub,*=	%r29, %r25, %r0
 	b,n	cas2_end
-20:	std,ma	%r24, 0(%r26)
+20:	std	%r24, 0(%r26)
 	copy	%r0, %r28
 #else
 	/* Compare first word */
@@ -849,7 +849,7 @@ cas2_action:
 cas2_end:
 	/* Free lock */
 	sync
-	stw,ma	%r20, 0(%sr2,%r20)
+	stw	%r20, 0(%sr2,%r20)
 	/* Enable interrupts */
 	ssm	PSW_SM_I, %r0
 	/* Return to userspace, set no error */
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/dma/k3dma.c linux-libre-4.4.152-gnu/drivers/dma/k3dma.c
--- linux-libre-4.4.151-gnu/drivers/dma/k3dma.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/dma/k3dma.c	2018-08-24 07:27:02.000000000 -0400
@@ -660,7 +660,7 @@ static struct dma_chan *k3_of_dma_simple
 	struct k3_dma_dev *d = ofdma->of_dma_data;
 	unsigned int request = dma_spec->args[0];
 
-	if (request > d->dma_requests)
+	if (request >= d->dma_requests)
 		return NULL;
 
 	return dma_get_slave_channel(&(d->chans[request].vc.chan));
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/armada/armada_hw.h linux-libre-4.4.152-gnu/drivers/gpu/drm/armada/armada_hw.h
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/armada/armada_hw.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/armada/armada_hw.h	2018-08-24 07:27:02.000000000 -0400
@@ -160,6 +160,7 @@ enum {
 	CFG_ALPHAM_GRA		= 0x1 << 16,
 	CFG_ALPHAM_CFG		= 0x2 << 16,
 	CFG_ALPHA_MASK		= 0xff << 8,
+#define CFG_ALPHA(x)		((x) << 8)
 	CFG_PIXCMD_MASK		= 0xff,
 };
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/armada/armada_overlay.c linux-libre-4.4.152-gnu/drivers/gpu/drm/armada/armada_overlay.c
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/armada/armada_overlay.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/armada/armada_overlay.c	2018-08-24 07:27:02.000000000 -0400
@@ -27,6 +27,7 @@ struct armada_ovl_plane_properties {
 	uint16_t contrast;
 	uint16_t saturation;
 	uint32_t colorkey_mode;
+	uint32_t colorkey_enable;
 };
 
 struct armada_ovl_plane {
@@ -62,11 +63,13 @@ armada_ovl_update_attr(struct armada_ovl
 	writel_relaxed(0x00002000, dcrtc->base + LCD_SPU_CBSH_HUE);
 
 	spin_lock_irq(&dcrtc->irq_lock);
-	armada_updatel(prop->colorkey_mode | CFG_ALPHAM_GRA,
-		     CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
-		     dcrtc->base + LCD_SPU_DMA_CTRL1);
-
-	armada_updatel(ADV_GRACOLORKEY, 0, dcrtc->base + LCD_SPU_ADV_REG);
+	armada_updatel(prop->colorkey_mode,
+		       CFG_CKMODE_MASK | CFG_ALPHAM_MASK | CFG_ALPHA_MASK,
+		       dcrtc->base + LCD_SPU_DMA_CTRL1);
+	if (dcrtc->variant->has_spu_adv_reg)
+		armada_updatel(prop->colorkey_enable,
+			       ADV_GRACOLORKEY | ADV_VIDCOLORKEY,
+			       dcrtc->base + LCD_SPU_ADV_REG);
 	spin_unlock_irq(&dcrtc->irq_lock);
 }
 
@@ -339,8 +342,17 @@ static int armada_ovl_plane_set_property
 		dplane->prop.colorkey_vb |= K2B(val);
 		update_attr = true;
 	} else if (property == priv->colorkey_mode_prop) {
-		dplane->prop.colorkey_mode &= ~CFG_CKMODE_MASK;
-		dplane->prop.colorkey_mode |= CFG_CKMODE(val);
+		if (val == CKMODE_DISABLE) {
+			dplane->prop.colorkey_mode =
+				CFG_CKMODE(CKMODE_DISABLE) |
+				CFG_ALPHAM_CFG | CFG_ALPHA(255);
+			dplane->prop.colorkey_enable = 0;
+		} else {
+			dplane->prop.colorkey_mode =
+				CFG_CKMODE(val) |
+				CFG_ALPHAM_GRA | CFG_ALPHA(0);
+			dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
+		}
 		update_attr = true;
 	} else if (property == priv->brightness_prop) {
 		dplane->prop.brightness = val - 256;
@@ -469,7 +481,9 @@ int armada_overlay_plane_create(struct d
 	dplane->prop.colorkey_yr = 0xfefefe00;
 	dplane->prop.colorkey_ug = 0x01010100;
 	dplane->prop.colorkey_vb = 0x01010100;
-	dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB);
+	dplane->prop.colorkey_mode = CFG_CKMODE(CKMODE_RGB) |
+				     CFG_ALPHAM_GRA | CFG_ALPHA(0);
+	dplane->prop.colorkey_enable = ADV_GRACOLORKEY;
 	dplane->prop.brightness = 0;
 	dplane->prop.contrast = 0x4000;
 	dplane->prop.saturation = 0x4000;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/exynos5433_drm_decon.c linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/exynos5433_drm_decon.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/exynos5433_drm_decon.c	2018-08-24 07:27:02.000000000 -0400
@@ -190,7 +190,7 @@ static void decon_win_set_pixfmt(struct
 	unsigned long val;
 
 	val = readl(ctx->addr + DECON_WINCONx(win));
-	val &= ~WINCONx_BPPMODE_MASK;
+	val &= WINCONx_ENWIN_F;
 
 	switch (fb->pixel_format) {
 	case DRM_FORMAT_XRGB1555:
@@ -278,8 +278,8 @@ static void decon_update_plane(struct ex
 		COORDINATE_Y(plane->crtc_y + plane->crtc_h - 1);
 	writel(val, ctx->addr + DECON_VIDOSDxB(win));
 
-	val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
-		VIDOSD_Wx_ALPHA_B_F(0x0);
+	val = VIDOSD_Wx_ALPHA_R_F(0xff) | VIDOSD_Wx_ALPHA_G_F(0xff) |
+		VIDOSD_Wx_ALPHA_B_F(0xff);
 	writel(val, ctx->addr + DECON_VIDOSDxC(win));
 
 	val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/exynos_drm_gsc.c linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/exynos_drm_gsc.c
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/exynos_drm_gsc.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/exynos_drm_gsc.c	2018-08-24 07:27:02.000000000 -0400
@@ -526,21 +526,25 @@ static int gsc_src_set_fmt(struct device
 			GSC_IN_CHROMA_ORDER_CRCB);
 		break;
 	case DRM_FORMAT_NV21:
+		cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_2P);
+		break;
 	case DRM_FORMAT_NV61:
-		cfg |= (GSC_IN_CHROMA_ORDER_CRCB |
-			GSC_IN_YUV420_2P);
+		cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV422_2P);
 		break;
 	case DRM_FORMAT_YUV422:
 		cfg |= GSC_IN_YUV422_3P;
 		break;
 	case DRM_FORMAT_YUV420:
+		cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_3P);
+		break;
 	case DRM_FORMAT_YVU420:
-		cfg |= GSC_IN_YUV420_3P;
+		cfg |= (GSC_IN_CHROMA_ORDER_CRCB | GSC_IN_YUV420_3P);
 		break;
 	case DRM_FORMAT_NV12:
+		cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV420_2P);
+		break;
 	case DRM_FORMAT_NV16:
-		cfg |= (GSC_IN_CHROMA_ORDER_CBCR |
-			GSC_IN_YUV420_2P);
+		cfg |= (GSC_IN_CHROMA_ORDER_CBCR | GSC_IN_YUV422_2P);
 		break;
 	default:
 		dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
@@ -800,18 +804,25 @@ static int gsc_dst_set_fmt(struct device
 			GSC_OUT_CHROMA_ORDER_CRCB);
 		break;
 	case DRM_FORMAT_NV21:
-	case DRM_FORMAT_NV61:
 		cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_2P);
 		break;
+	case DRM_FORMAT_NV61:
+		cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV422_2P);
+		break;
 	case DRM_FORMAT_YUV422:
+		cfg |= GSC_OUT_YUV422_3P;
+		break;
 	case DRM_FORMAT_YUV420:
+		cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_3P);
+		break;
 	case DRM_FORMAT_YVU420:
-		cfg |= GSC_OUT_YUV420_3P;
+		cfg |= (GSC_OUT_CHROMA_ORDER_CRCB | GSC_OUT_YUV420_3P);
 		break;
 	case DRM_FORMAT_NV12:
+		cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV420_2P);
+		break;
 	case DRM_FORMAT_NV16:
-		cfg |= (GSC_OUT_CHROMA_ORDER_CBCR |
-			GSC_OUT_YUV420_2P);
+		cfg |= (GSC_OUT_CHROMA_ORDER_CBCR | GSC_OUT_YUV422_2P);
 		break;
 	default:
 		dev_err(ippdrv->dev, "invalid target yuv order 0x%x.\n", fmt);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/regs-gsc.h linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/regs-gsc.h
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/exynos/regs-gsc.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/exynos/regs-gsc.h	2018-08-24 07:27:02.000000000 -0400
@@ -138,6 +138,7 @@
 #define GSC_OUT_YUV420_3P		(3 << 4)
 #define GSC_OUT_YUV422_1P		(4 << 4)
 #define GSC_OUT_YUV422_2P		(5 << 4)
+#define GSC_OUT_YUV422_3P		(6 << 4)
 #define GSC_OUT_YUV444			(7 << 4)
 #define GSC_OUT_TILE_TYPE_MASK		(1 << 2)
 #define GSC_OUT_TILE_C_16x8		(0 << 2)
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/gpu/drm/nouveau/nouveau_gem.c linux-libre-4.4.152-gnu/drivers/gpu/drm/nouveau/nouveau_gem.c
--- linux-libre-4.4.151-gnu/drivers/gpu/drm/nouveau/nouveau_gem.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/gpu/drm/nouveau/nouveau_gem.c	2018-08-24 07:27:02.000000000 -0400
@@ -602,7 +602,7 @@ nouveau_gem_pushbuf_reloc_apply(struct n
 		struct nouveau_bo *nvbo;
 		uint32_t data;
 
-		if (unlikely(r->bo_index > req->nr_buffers)) {
+		if (unlikely(r->bo_index >= req->nr_buffers)) {
 			NV_PRINTK(err, cli, "reloc bo index invalid\n");
 			ret = -EINVAL;
 			break;
@@ -612,7 +612,7 @@ nouveau_gem_pushbuf_reloc_apply(struct n
 		if (b->presumed.valid)
 			continue;
 
-		if (unlikely(r->reloc_bo_index > req->nr_buffers)) {
+		if (unlikely(r->reloc_bo_index >= req->nr_buffers)) {
 			NV_PRINTK(err, cli, "reloc container bo index invalid\n");
 			ret = -EINVAL;
 			break;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/hid/wacom_wac.c linux-libre-4.4.152-gnu/drivers/hid/wacom_wac.c
--- linux-libre-4.4.151-gnu/drivers/hid/wacom_wac.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/hid/wacom_wac.c	2018-08-24 07:27:02.000000000 -0400
@@ -2487,8 +2487,14 @@ void wacom_setup_device_quirks(struct wa
 			if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
 				features->device_type |= WACOM_DEVICETYPE_PAD;
 
-			features->x_max = 4096;
-			features->y_max = 4096;
+			if (features->type == INTUOSHT2) {
+				features->x_max = features->x_max / 10;
+				features->y_max = features->y_max / 10;
+			}
+			else {
+				features->x_max = 4096;
+				features->y_max = 4096;
+			}
 		}
 		else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
 			features->device_type |= WACOM_DEVICETYPE_PAD;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/i2c/busses/i2c-imx.c linux-libre-4.4.152-gnu/drivers/i2c/busses/i2c-imx.c
--- linux-libre-4.4.151-gnu/drivers/i2c/busses/i2c-imx.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/i2c/busses/i2c-imx.c	2018-08-24 07:27:02.000000000 -0400
@@ -677,9 +677,6 @@ static int i2c_imx_dma_read(struct imx_i
 	struct imx_i2c_dma *dma = i2c_imx->dma;
 	struct device *dev = &i2c_imx->adapter.dev;
 
-	temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2CR);
-	temp |= I2CR_DMAEN;
-	imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
 
 	dma->chan_using = dma->chan_rx;
 	dma->dma_transfer_dir = DMA_DEV_TO_MEM;
@@ -792,6 +789,7 @@ static int i2c_imx_read(struct imx_i2c_s
 	int i, result;
 	unsigned int temp;
 	int block_data = msgs->flags & I2C_M_RECV_LEN;
+	int use_dma = i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data;
 
 	dev_dbg(&i2c_imx->adapter.dev,
 		"<%s> write slave address: addr=0x%x\n",
@@ -818,12 +816,14 @@ static int i2c_imx_read(struct imx_i2c_s
 	 */
 	if ((msgs->len - 1) || block_data)
 		temp &= ~I2CR_TXAK;
+	if (use_dma)
+		temp |= I2CR_DMAEN;
 	imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
 	imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR); /* dummy read */
 
 	dev_dbg(&i2c_imx->adapter.dev, "<%s> read data\n", __func__);
 
-	if (i2c_imx->dma && msgs->len >= DMA_THRESHOLD && !block_data)
+	if (use_dma)
 		return i2c_imx_dma_read(i2c_imx, msgs, is_lastmsg);
 
 	/* read data */
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/md/raid10.c linux-libre-4.4.152-gnu/drivers/md/raid10.c
--- linux-libre-4.4.151-gnu/drivers/md/raid10.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/md/raid10.c	2018-08-24 07:27:02.000000000 -0400
@@ -3691,6 +3691,13 @@ static int run(struct mddev *mddev)
 			    disk->rdev->saved_raid_disk < 0)
 				conf->fullsync = 1;
 		}
+
+		if (disk->replacement &&
+		    !test_bit(In_sync, &disk->replacement->flags) &&
+		    disk->replacement->saved_raid_disk < 0) {
+			conf->fullsync = 1;
+		}
+
 		disk->recovery_disabled = mddev->recovery_disabled - 1;
 	}
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c	2018-08-22 11:22:55.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c	2018-08-24 11:57:56.000000000 -0400
@@ -1277,6 +1277,11 @@ void __bnx2x_link_report(struct bnx2x *b
 {
 	struct bnx2x_link_report_data cur_data;
 
+	if (bp->force_link_down) {
+		bp->link_vars.link_up = 0;
+		return;
+	}
+
 	/* reread mf_cfg */
 	if (IS_PF(bp) && !CHIP_IS_E1(bp))
 		bnx2x_read_mf_cfg(bp);
@@ -2839,6 +2844,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int
 		bp->pending_max = 0;
 	}
 
+	bp->force_link_down = false;
 	if (bp->port.pmf) {
 		rc = bnx2x_initial_phy_init(bp, load_mode);
 		if (rc)
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h	2018-08-24 07:27:02.000000000 -0400
@@ -1634,6 +1634,7 @@ struct bnx2x {
 	struct link_vars	link_vars;
 	u32			link_cnt;
 	struct bnx2x_link_report_data last_reported_link;
+	bool			force_link_down;
 
 	struct mdio_if_info	mdio;
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c	2018-08-22 11:22:55.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c	2018-08-24 11:57:54.000000000 -0400
@@ -10216,6 +10216,12 @@ static void bnx2x_sp_rtnl_task(struct wo
 		bp->sp_rtnl_state = 0;
 		smp_mb();
 
+		/* Immediately indicate link as down */
+		bp->link_vars.link_up = 0;
+		bp->force_link_down = true;
+		netif_carrier_off(bp->dev);
+		BNX2X_ERR("Indicating link is down due to Tx-timeout\n");
+
 		bnx2x_nic_unload(bp, UNLOAD_NORMAL, true);
 		bnx2x_nic_load(bp, LOAD_NORMAL);
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/broadcom/bnxt/bnxt.c	2018-08-24 07:27:02.000000000 -0400
@@ -4591,7 +4591,7 @@ static int __bnxt_open_nic(struct bnxt *
 		rc = bnxt_request_irq(bp);
 		if (rc) {
 			netdev_err(bp->dev, "bnxt_request_irq err: %x\n", rc);
-			goto open_err;
+			goto open_err_irq;
 		}
 	}
 
@@ -4629,6 +4629,8 @@ static int __bnxt_open_nic(struct bnxt *
 
 open_err:
 	bnxt_disable_napi(bp);
+
+open_err_irq:
 	bnxt_del_napi(bp);
 
 open_err_free_mem:
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c linux-libre-4.4.152-gnu/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c	2018-08-22 11:23:16.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c	2018-08-24 11:58:28.000000000 -0400
@@ -336,7 +336,7 @@ static void dcb_tx_queue_prio_enable(str
 				"Can't %s DCB Priority on port %d, TX Queue %d: err=%d\n",
 				enable ? "set" : "unset", pi->port_id, i, -err);
 		else
-			txq->dcb_prio = value;
+			txq->dcb_prio = enable ? value : 0;
 	}
 }
 #endif /* CONFIG_CHELSIO_T4_DCB */
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/cisco/enic/enic_clsf.c linux-libre-4.4.152-gnu/drivers/net/ethernet/cisco/enic/enic_clsf.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/cisco/enic/enic_clsf.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/cisco/enic/enic_clsf.c	2018-08-24 07:27:02.000000000 -0400
@@ -78,7 +78,6 @@ void enic_rfs_flw_tbl_init(struct enic *
 	enic->rfs_h.max = enic->config.num_arfs;
 	enic->rfs_h.free = enic->rfs_h.max;
 	enic->rfs_h.toclean = 0;
-	enic_rfs_timer_start(enic);
 }
 
 void enic_rfs_flw_tbl_free(struct enic *enic)
@@ -87,7 +86,6 @@ void enic_rfs_flw_tbl_free(struct enic *
 
 	enic_rfs_timer_stop(enic);
 	spin_lock_bh(&enic->rfs_h.lock);
-	enic->rfs_h.free = 0;
 	for (i = 0; i < (1 << ENIC_RFS_FLW_BITSHIFT); i++) {
 		struct hlist_head *hhead;
 		struct hlist_node *tmp;
@@ -98,6 +96,7 @@ void enic_rfs_flw_tbl_free(struct enic *
 			enic_delfltr(enic, n->fltr_id);
 			hlist_del(&n->node);
 			kfree(n);
+			enic->rfs_h.free++;
 		}
 	}
 	spin_unlock_bh(&enic->rfs_h.lock);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/cisco/enic/enic_main.c linux-libre-4.4.152-gnu/drivers/net/ethernet/cisco/enic/enic_main.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2018-08-24 07:27:02.000000000 -0400
@@ -1760,7 +1760,7 @@ static int enic_open(struct net_device *
 		vnic_intr_unmask(&enic->intr[i]);
 
 	enic_notify_timer_start(enic);
-	enic_rfs_flw_tbl_init(enic);
+	enic_rfs_timer_start(enic);
 
 	return 0;
 
@@ -2694,6 +2694,7 @@ static int enic_probe(struct pci_dev *pd
 	enic->notify_timer.function = enic_notify_timer;
 	enic->notify_timer.data = (unsigned long)enic;
 
+	enic_rfs_flw_tbl_init(enic);
 	enic_set_rx_coal_setting(enic);
 	INIT_WORK(&enic->reset, enic_reset);
 	INIT_WORK(&enic->tx_hang_reset, enic_tx_hang_reset);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c linux-libre-4.4.152-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c	2018-08-24 07:27:02.000000000 -0400
@@ -1814,7 +1814,12 @@ s32 ixgbe_set_rar_generic(struct ixgbe_h
 	if (enable_addr != 0)
 		rar_high |= IXGBE_RAH_AV;
 
+	/* Record lower 32 bits of MAC address and then make
+	 * sure that write is flushed to hardware before writing
+	 * the upper 16 bits and setting the valid bit.
+	 */
 	IXGBE_WRITE_REG(hw, IXGBE_RAL(index), rar_low);
+	IXGBE_WRITE_FLUSH(hw);
 	IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
 
 	return 0;
@@ -1846,8 +1851,13 @@ s32 ixgbe_clear_rar_generic(struct ixgbe
 	rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(index));
 	rar_high &= ~(0x0000FFFF | IXGBE_RAH_AV);
 
-	IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
+	/* Clear the address valid bit and upper 16 bits of the address
+	 * before clearing the lower bits. This way we aren't updating
+	 * a live filter.
+	 */
 	IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
+	IXGBE_WRITE_FLUSH(hw);
+	IXGBE_WRITE_REG(hw, IXGBE_RAL(index), 0);
 
 	/* clear VMDq pool/queue selection for this RAR */
 	hw->mac.ops.clear_vmdq(hw, index, IXGBE_CLEAR_VMDQ_ALL);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/qlogic/qed/qed_main.c linux-libre-4.4.152-gnu/drivers/net/ethernet/qlogic/qed/qed_main.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/qlogic/qed/qed_main.c	2018-08-22 11:23:40.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/qlogic/qed/qed_main.c	2018-08-24 11:59:09.000000000 -0400
@@ -461,8 +461,16 @@ static irqreturn_t qed_single_int(int ir
 		/* Fastpath interrupts */
 		for (j = 0; j < 64; j++) {
 			if ((0x2ULL << j) & status) {
-				hwfn->simd_proto_handler[j].func(
-					hwfn->simd_proto_handler[j].token);
+				struct qed_simd_fp_handler *p_handler =
+					&hwfn->simd_proto_handler[j];
+
+				if (p_handler->func)
+					p_handler->func(p_handler->token);
+				else
+					DP_NOTICE(hwfn,
+						  "Not calling fastpath handler as it is NULL [handler #%d, status 0x%llx]\n",
+						  j, status);
+
 				status &= ~(0x2ULL << j);
 				rc = IRQ_HANDLED;
 			}
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c linux-libre-4.4.152-gnu/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c	2018-08-24 07:27:02.000000000 -0400
@@ -1128,6 +1128,8 @@ static ssize_t qlcnic_83xx_sysfs_flash_w
 	struct qlcnic_adapter *adapter = dev_get_drvdata(dev);
 
 	ret = kstrtoul(buf, 16, &data);
+	if (ret)
+		return ret;
 
 	switch (data) {
 	case QLC_83XX_FLASH_SECTOR_ERASE_CMD:
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/qualcomm/qca_spi.c linux-libre-4.4.152-gnu/drivers/net/ethernet/qualcomm/qca_spi.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/qualcomm/qca_spi.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/qualcomm/qca_spi.c	2018-08-24 07:27:02.000000000 -0400
@@ -635,7 +635,7 @@ qcaspi_netdev_open(struct net_device *de
 		return ret;
 	}
 
-	netif_start_queue(qca->net_dev);
+	/* SPI thread takes care of TX queue */
 
 	return 0;
 }
@@ -739,6 +739,9 @@ qcaspi_netdev_tx_timeout(struct net_devi
 	qca->net_dev->stats.tx_errors++;
 	/* Trigger tx queue flush and QCA7000 reset */
 	qca->sync = QCASPI_SYNC_UNKNOWN;
+
+	if (qca->spi_thread)
+		wake_up_process(qca->spi_thread);
 }
 
 static int
@@ -865,22 +868,22 @@ qca_spi_probe(struct spi_device *spi)
 
 	if ((qcaspi_clkspeed < QCASPI_CLK_SPEED_MIN) ||
 	    (qcaspi_clkspeed > QCASPI_CLK_SPEED_MAX)) {
-		dev_info(&spi->dev, "Invalid clkspeed: %d\n",
-			 qcaspi_clkspeed);
+		dev_err(&spi->dev, "Invalid clkspeed: %d\n",
+			qcaspi_clkspeed);
 		return -EINVAL;
 	}
 
 	if ((qcaspi_burst_len < QCASPI_BURST_LEN_MIN) ||
 	    (qcaspi_burst_len > QCASPI_BURST_LEN_MAX)) {
-		dev_info(&spi->dev, "Invalid burst len: %d\n",
-			 qcaspi_burst_len);
+		dev_err(&spi->dev, "Invalid burst len: %d\n",
+			qcaspi_burst_len);
 		return -EINVAL;
 	}
 
 	if ((qcaspi_pluggable < QCASPI_PLUGGABLE_MIN) ||
 	    (qcaspi_pluggable > QCASPI_PLUGGABLE_MAX)) {
-		dev_info(&spi->dev, "Invalid pluggable: %d\n",
-			 qcaspi_pluggable);
+		dev_err(&spi->dev, "Invalid pluggable: %d\n",
+			qcaspi_pluggable);
 		return -EINVAL;
 	}
 
@@ -941,8 +944,8 @@ qca_spi_probe(struct spi_device *spi)
 	}
 
 	if (register_netdev(qcaspi_devs)) {
-		dev_info(&spi->dev, "Unable to register net device %s\n",
-			 qcaspi_devs->name);
+		dev_err(&spi->dev, "Unable to register net device %s\n",
+			qcaspi_devs->name);
 		free_netdev(qcaspi_devs);
 		return -EFAULT;
 	}
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ethernet/ti/davinci_emac.c linux-libre-4.4.152-gnu/drivers/net/ethernet/ti/davinci_emac.c
--- linux-libre-4.4.151-gnu/drivers/net/ethernet/ti/davinci_emac.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ethernet/ti/davinci_emac.c	2018-08-24 07:27:02.000000000 -0400
@@ -1517,6 +1517,10 @@ static int emac_devioctl(struct net_devi
 
 static int match_first_device(struct device *dev, void *data)
 {
+	if (dev->parent && dev->parent->of_node)
+		return of_device_is_compatible(dev->parent->of_node,
+					       "ti,davinci_mdio");
+
 	return !strncmp(dev_name(dev), "davinci_mdio", 12);
 }
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/hamradio/bpqether.c linux-libre-4.4.152-gnu/drivers/net/hamradio/bpqether.c
--- linux-libre-4.4.151-gnu/drivers/net/hamradio/bpqether.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/hamradio/bpqether.c	2018-08-24 07:27:02.000000000 -0400
@@ -89,10 +89,6 @@
 static const char banner[] __initconst = KERN_INFO \
 	"AX.25: bpqether driver version 004\n";
 
-static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
-
-static char bpq_eth_addr[6];
-
 static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
 static int bpq_device_event(struct notifier_block *, unsigned long, void *);
 
@@ -515,8 +511,8 @@ static int bpq_new_device(struct net_dev
 	bpq->ethdev = edev;
 	bpq->axdev = ndev;
 
-	memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
-	memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
+	eth_broadcast_addr(bpq->dest_addr);
+	eth_broadcast_addr(bpq->acpt_addr);
 
 	err = register_netdevice(ndev);
 	if (err)
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ieee802154/at86rf230.c linux-libre-4.4.152-gnu/drivers/net/ieee802154/at86rf230.c
--- linux-libre-4.4.151-gnu/drivers/net/ieee802154/at86rf230.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ieee802154/at86rf230.c	2018-08-24 07:27:02.000000000 -0400
@@ -932,7 +932,7 @@ at86rf230_xmit(struct ieee802154_hw *hw,
 static int
 at86rf230_ed(struct ieee802154_hw *hw, u8 *level)
 {
-	BUG_ON(!level);
+	WARN_ON(!level);
 	*level = 0xbe;
 	return 0;
 }
@@ -1108,8 +1108,7 @@ at86rf230_set_hw_addr_filt(struct ieee80
 	if (changed & IEEE802154_AFILT_SADDR_CHANGED) {
 		u16 addr = le16_to_cpu(filt->short_addr);
 
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for saddr\n");
+		dev_vdbg(&lp->spi->dev, "%s called for saddr\n", __func__);
 		__at86rf230_write(lp, RG_SHORT_ADDR_0, addr);
 		__at86rf230_write(lp, RG_SHORT_ADDR_1, addr >> 8);
 	}
@@ -1117,8 +1116,7 @@ at86rf230_set_hw_addr_filt(struct ieee80
 	if (changed & IEEE802154_AFILT_PANID_CHANGED) {
 		u16 pan = le16_to_cpu(filt->pan_id);
 
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for pan id\n");
+		dev_vdbg(&lp->spi->dev, "%s called for pan id\n", __func__);
 		__at86rf230_write(lp, RG_PAN_ID_0, pan);
 		__at86rf230_write(lp, RG_PAN_ID_1, pan >> 8);
 	}
@@ -1127,15 +1125,13 @@ at86rf230_set_hw_addr_filt(struct ieee80
 		u8 i, addr[8];
 
 		memcpy(addr, &filt->ieee_addr, 8);
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for IEEE addr\n");
+		dev_vdbg(&lp->spi->dev, "%s called for IEEE addr\n", __func__);
 		for (i = 0; i < 8; i++)
 			__at86rf230_write(lp, RG_IEEE_ADDR_0 + i, addr[i]);
 	}
 
 	if (changed & IEEE802154_AFILT_PANC_CHANGED) {
-		dev_vdbg(&lp->spi->dev,
-			 "at86rf230_set_hw_addr_filt called for panc change\n");
+		dev_vdbg(&lp->spi->dev, "%s called for panc change\n", __func__);
 		if (filt->pan_coord)
 			at86rf230_write_subreg(lp, SR_AACK_I_AM_COORD, 1);
 		else
@@ -1239,7 +1235,6 @@ at86rf230_set_cca_mode(struct ieee802154
 	return at86rf230_write_subreg(lp, SR_CCA_MODE, val);
 }
 
-
 static int
 at86rf230_set_cca_ed_level(struct ieee802154_hw *hw, s32 mbm)
 {
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/ieee802154/fakelb.c linux-libre-4.4.152-gnu/drivers/net/ieee802154/fakelb.c
--- linux-libre-4.4.151-gnu/drivers/net/ieee802154/fakelb.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/ieee802154/fakelb.c	2018-08-24 07:27:02.000000000 -0400
@@ -49,7 +49,7 @@ struct fakelb_phy {
 
 static int fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level)
 {
-	BUG_ON(!level);
+	WARN_ON(!level);
 	*level = 0xbe;
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/usb/rtl8150.c linux-libre-4.4.152-gnu/drivers/net/usb/rtl8150.c
--- linux-libre-4.4.151-gnu/drivers/net/usb/rtl8150.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/usb/rtl8150.c	2018-08-24 07:27:02.000000000 -0400
@@ -681,7 +681,7 @@ static void rtl8150_set_multicast(struct
 		   (netdev->flags & IFF_ALLMULTI)) {
 		rx_creg &= 0xfffe;
 		rx_creg |= 0x0002;
-		dev_info(&netdev->dev, "%s: allmulti set\n", netdev->name);
+		dev_dbg(&netdev->dev, "%s: allmulti set\n", netdev->name);
 	} else {
 		/* ~RX_MULTICAST, ~RX_PROMISCUOUS */
 		rx_creg &= 0x00fc;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/usb/smsc75xx.c linux-libre-4.4.152-gnu/drivers/net/usb/smsc75xx.c
--- linux-libre-4.4.151-gnu/drivers/net/usb/smsc75xx.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/usb/smsc75xx.c	2018-08-24 07:27:02.000000000 -0400
@@ -81,6 +81,9 @@ static bool turbo_mode = true;
 module_param(turbo_mode, bool, 0644);
 MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
 
+static int smsc75xx_link_ok_nopm(struct usbnet *dev);
+static int smsc75xx_phy_gig_workaround(struct usbnet *dev);
+
 static int __must_check __smsc75xx_read_reg(struct usbnet *dev, u32 index,
 					    u32 *data, int in_pm)
 {
@@ -840,6 +843,9 @@ static int smsc75xx_phy_initialize(struc
 		return -EIO;
 	}
 
+	/* phy workaround for gig link */
+	smsc75xx_phy_gig_workaround(dev);
+
 	smsc75xx_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
 		ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP |
 		ADVERTISE_PAUSE_ASYM);
@@ -978,6 +984,62 @@ static int smsc75xx_wait_ready(struct us
 	return -EIO;
 }
 
+static int smsc75xx_phy_gig_workaround(struct usbnet *dev)
+{
+	struct mii_if_info *mii = &dev->mii;
+	int ret = 0, timeout = 0;
+	u32 buf, link_up = 0;
+
+	/* Set the phy in Gig loopback */
+	smsc75xx_mdio_write(dev->net, mii->phy_id, MII_BMCR, 0x4040);
+
+	/* Wait for the link up */
+	do {
+		link_up = smsc75xx_link_ok_nopm(dev);
+		usleep_range(10000, 20000);
+		timeout++;
+	} while ((!link_up) && (timeout < 1000));
+
+	if (timeout >= 1000) {
+		netdev_warn(dev->net, "Timeout waiting for PHY link up\n");
+		return -EIO;
+	}
+
+	/* phy reset */
+	ret = smsc75xx_read_reg(dev, PMT_CTL, &buf);
+	if (ret < 0) {
+		netdev_warn(dev->net, "Failed to read PMT_CTL: %d\n", ret);
+		return ret;
+	}
+
+	buf |= PMT_CTL_PHY_RST;
+
+	ret = smsc75xx_write_reg(dev, PMT_CTL, buf);
+	if (ret < 0) {
+		netdev_warn(dev->net, "Failed to write PMT_CTL: %d\n", ret);
+		return ret;
+	}
+
+	timeout = 0;
+	do {
+		usleep_range(10000, 20000);
+		ret = smsc75xx_read_reg(dev, PMT_CTL, &buf);
+		if (ret < 0) {
+			netdev_warn(dev->net, "Failed to read PMT_CTL: %d\n",
+				    ret);
+			return ret;
+		}
+		timeout++;
+	} while ((buf & PMT_CTL_PHY_RST) && (timeout < 100));
+
+	if (timeout >= 100) {
+		netdev_warn(dev->net, "timeout waiting for PHY Reset\n");
+		return -EIO;
+	}
+
+	return 0;
+}
+
 static int smsc75xx_reset(struct usbnet *dev)
 {
 	struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0]);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/net/wireless/brcm80211/brcmfmac/sdio.c linux-libre-4.4.152-gnu/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
--- linux-libre-4.4.151-gnu/drivers/net/wireless/brcm80211/brcmfmac/sdio.c	2018-08-22 11:25:16.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/net/wireless/brcm80211/brcmfmac/sdio.c	2018-08-24 12:01:09.000000000 -0400
@@ -4264,6 +4264,13 @@ void brcmf_sdio_remove(struct brcmf_sdio
 	brcmf_dbg(TRACE, "Enter\n");
 
 	if (bus) {
+		/* Stop watchdog task */
+		if (bus->watchdog_tsk) {
+			send_sig(SIGTERM, bus->watchdog_tsk, 1);
+			kthread_stop(bus->watchdog_tsk);
+			bus->watchdog_tsk = NULL;
+		}
+
 		/* De-register interrupt handler */
 		brcmf_sdiod_intr_unregister(bus->sdiodev);
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp_core.c linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp_core.c
--- linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp_core.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp_core.c	2018-08-24 07:27:02.000000000 -0400
@@ -77,6 +77,12 @@ static int reset_slot		(struct hotplug_s
  */
 static void release_slot(struct hotplug_slot *hotplug_slot)
 {
+	struct slot *slot = hotplug_slot->private;
+
+	/* queued work needs hotplug_slot name */
+	cancel_delayed_work(&slot->work);
+	drain_workqueue(slot->wq);
+
 	kfree(hotplug_slot->ops);
 	kfree(hotplug_slot->info);
 	kfree(hotplug_slot);
@@ -276,6 +282,7 @@ static void pciehp_remove(struct pcie_de
 {
 	struct controller *ctrl = get_service_data(dev);
 
+	pcie_shutdown_notification(ctrl);
 	cleanup_slot(ctrl);
 	pciehp_release_ctrl(ctrl);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp.h linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp.h
--- linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp.h	2018-08-24 07:27:02.000000000 -0400
@@ -132,6 +132,7 @@ int pciehp_unconfigure_device(struct slo
 void pciehp_queue_pushbutton_work(struct work_struct *work);
 struct controller *pcie_init(struct pcie_device *dev);
 int pcie_init_notification(struct controller *ctrl);
+void pcie_shutdown_notification(struct controller *ctrl);
 int pciehp_enable_slot(struct slot *p_slot);
 int pciehp_disable_slot(struct slot *p_slot);
 void pcie_reenable_notification(struct controller *ctrl);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp_hpc.c linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp_hpc.c
--- linux-libre-4.4.151-gnu/drivers/pci/hotplug/pciehp_hpc.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/pci/hotplug/pciehp_hpc.c	2018-08-24 07:27:02.000000000 -0400
@@ -741,7 +741,7 @@ int pcie_init_notification(struct contro
 	return 0;
 }
 
-static void pcie_shutdown_notification(struct controller *ctrl)
+void pcie_shutdown_notification(struct controller *ctrl)
 {
 	if (ctrl->notification_enabled) {
 		pcie_disable_notification(ctrl);
@@ -776,7 +776,7 @@ abort:
 static void pcie_cleanup_slot(struct controller *ctrl)
 {
 	struct slot *slot = ctrl->slot;
-	cancel_delayed_work(&slot->work);
+
 	destroy_workqueue(slot->wq);
 	kfree(slot);
 }
@@ -853,7 +853,6 @@ abort:
 
 void pciehp_release_ctrl(struct controller *ctrl)
 {
-	pcie_shutdown_notification(ctrl);
 	pcie_cleanup_slot(ctrl);
 	kfree(ctrl);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/pci/hotplug/pci_hotplug_core.c linux-libre-4.4.152-gnu/drivers/pci/hotplug/pci_hotplug_core.c
--- linux-libre-4.4.151-gnu/drivers/pci/hotplug/pci_hotplug_core.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/pci/hotplug/pci_hotplug_core.c	2018-08-24 07:27:02.000000000 -0400
@@ -457,8 +457,17 @@ int __pci_hp_register(struct hotplug_slo
 	list_add(&slot->slot_list, &pci_hotplug_slot_list);
 
 	result = fs_add_slot(pci_slot);
+	if (result)
+		goto err_list_del;
+
 	kobject_uevent(&pci_slot->kobj, KOBJ_ADD);
 	dbg("Added slot %s to the list\n", name);
+	goto out;
+
+err_list_del:
+	list_del(&slot->slot_list);
+	pci_slot->hotplug = NULL;
+	pci_destroy_slot(pci_slot);
 out:
 	mutex_unlock(&pci_hp_mutex);
 	return result;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/pci/probe.c linux-libre-4.4.152-gnu/drivers/pci/probe.c
--- linux-libre-4.4.151-gnu/drivers/pci/probe.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/pci/probe.c	2018-08-24 07:27:02.000000000 -0400
@@ -1338,6 +1338,10 @@ static void pci_configure_mps(struct pci
 	if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge))
 		return;
 
+	/* MPS and MRRS fields are of type 'RsvdP' for VFs, short-circuit out */
+	if (dev->is_virtfn)
+		return;
+
 	mps = pcie_get_mps(dev);
 	p_mps = pcie_get_mps(bridge);
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/scsi/xen-scsifront.c linux-libre-4.4.152-gnu/drivers/scsi/xen-scsifront.c
--- linux-libre-4.4.151-gnu/drivers/scsi/xen-scsifront.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/scsi/xen-scsifront.c	2018-08-24 07:27:02.000000000 -0400
@@ -676,10 +676,17 @@ static int scsifront_dev_reset_handler(s
 static int scsifront_sdev_configure(struct scsi_device *sdev)
 {
 	struct vscsifrnt_info *info = shost_priv(sdev->host);
+	int err;
 
-	if (info && current == info->curr)
-		xenbus_printf(XBT_NIL, info->dev->nodename,
+	if (info && current == info->curr) {
+		err = xenbus_printf(XBT_NIL, info->dev->nodename,
 			      info->dev_state_path, "%d", XenbusStateConnected);
+		if (err) {
+			xenbus_dev_error(info->dev, err,
+				"%s: writing dev_state_path", __func__);
+			return err;
+		}
+	}
 
 	return 0;
 }
@@ -687,10 +694,15 @@ static int scsifront_sdev_configure(stru
 static void scsifront_sdev_destroy(struct scsi_device *sdev)
 {
 	struct vscsifrnt_info *info = shost_priv(sdev->host);
+	int err;
 
-	if (info && current == info->curr)
-		xenbus_printf(XBT_NIL, info->dev->nodename,
+	if (info && current == info->curr) {
+		err = xenbus_printf(XBT_NIL, info->dev->nodename,
 			      info->dev_state_path, "%d", XenbusStateClosed);
+		if (err)
+			xenbus_dev_error(info->dev, err,
+				"%s: writing dev_state_path", __func__);
+	}
 }
 
 static struct scsi_host_template scsifront_sht = {
@@ -1025,9 +1037,12 @@ static void scsifront_do_lun_hotplug(str
 
 			if (scsi_add_device(info->host, chn, tgt, lun)) {
 				dev_err(&dev->dev, "scsi_add_device\n");
-				xenbus_printf(XBT_NIL, dev->nodename,
+				err = xenbus_printf(XBT_NIL, dev->nodename,
 					      info->dev_state_path,
 					      "%d", XenbusStateClosed);
+				if (err)
+					xenbus_dev_error(dev, err,
+						"%s: writing dev_state_path", __func__);
 			}
 			break;
 		case VSCSIFRONT_OP_DEL_LUN:
@@ -1041,10 +1056,14 @@ static void scsifront_do_lun_hotplug(str
 			}
 			break;
 		case VSCSIFRONT_OP_READD_LUN:
-			if (device_state == XenbusStateConnected)
-				xenbus_printf(XBT_NIL, dev->nodename,
+			if (device_state == XenbusStateConnected) {
+				err = xenbus_printf(XBT_NIL, dev->nodename,
 					      info->dev_state_path,
 					      "%d", XenbusStateConnected);
+				if (err)
+					xenbus_dev_error(dev, err,
+						"%s: writing dev_state_path", __func__);
+			}
 			break;
 		default:
 			break;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/staging/android/ion/ion.c linux-libre-4.4.152-gnu/drivers/staging/android/ion/ion.c
--- linux-libre-4.4.151-gnu/drivers/staging/android/ion/ion.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/staging/android/ion/ion.c	2018-08-24 07:27:02.000000000 -0400
@@ -15,6 +15,7 @@
  *
  */
 
+#include <linux/atomic.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/file.h>
@@ -387,6 +388,16 @@ static void ion_handle_get(struct ion_ha
 	kref_get(&handle->ref);
 }
 
+/* Must hold the client lock */
+static struct ion_handle *ion_handle_get_check_overflow(
+					struct ion_handle *handle)
+{
+	if (atomic_read(&handle->ref.refcount) + 1 == 0)
+		return ERR_PTR(-EOVERFLOW);
+	ion_handle_get(handle);
+	return handle;
+}
+
 static int ion_handle_put_nolock(struct ion_handle *handle)
 {
 	int ret;
@@ -433,9 +444,9 @@ static struct ion_handle *ion_handle_get
 
 	handle = idr_find(&client->idr, id);
 	if (handle)
-		ion_handle_get(handle);
+		return ion_handle_get_check_overflow(handle);
 
-	return handle ? handle : ERR_PTR(-EINVAL);
+	return ERR_PTR(-EINVAL);
 }
 
 struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
@@ -1202,7 +1213,7 @@ struct ion_handle *ion_import_dma_buf(st
 	/* if a handle exists for this buffer just take a reference to it */
 	handle = ion_handle_lookup(client, buffer);
 	if (!IS_ERR(handle)) {
-		ion_handle_get(handle);
+		handle = ion_handle_get_check_overflow(handle);
 		mutex_unlock(&client->lock);
 		goto end;
 	}
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/usb/dwc2/gadget.c linux-libre-4.4.152-gnu/drivers/usb/dwc2/gadget.c
--- linux-libre-4.4.151-gnu/drivers/usb/dwc2/gadget.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/usb/dwc2/gadget.c	2018-08-24 07:27:02.000000000 -0400
@@ -3657,9 +3657,11 @@ int dwc2_gadget_init(struct dwc2_hsotg *
 	}
 
 	ret = usb_add_gadget_udc(dev, &hsotg->gadget);
-	if (ret)
+	if (ret) {
+		dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep,
+					   hsotg->ctrl_req);
 		return ret;
-
+	}
 	dwc2_hsotg_dump(hsotg);
 
 	return 0;
@@ -3672,6 +3674,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *
 int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg)
 {
 	usb_del_gadget_udc(&hsotg->gadget);
+	dwc2_hsotg_ep_free_request(&hsotg->eps_out[0]->ep, hsotg->ctrl_req);
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/usb/dwc2/hcd_intr.c linux-libre-4.4.152-gnu/drivers/usb/dwc2/hcd_intr.c
--- linux-libre-4.4.151-gnu/drivers/usb/dwc2/hcd_intr.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/usb/dwc2/hcd_intr.c	2018-08-24 07:27:02.000000000 -0400
@@ -931,9 +931,8 @@ static int dwc2_xfercomp_isoc_split_in(s
 	frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index];
 	len = dwc2_get_actual_xfer_length(hsotg, chan, chnum, qtd,
 					  DWC2_HC_XFER_COMPLETE, NULL);
-	if (!len) {
+	if (!len && !qtd->isoc_split_offset) {
 		qtd->complete_split = 0;
-		qtd->isoc_split_offset = 0;
 		return 0;
 	}
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/usb/gadget/composite.c linux-libre-4.4.152-gnu/drivers/usb/gadget/composite.c
--- linux-libre-4.4.151-gnu/drivers/usb/gadget/composite.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/usb/gadget/composite.c	2018-08-24 07:27:02.000000000 -0400
@@ -1619,6 +1619,8 @@ composite_setup(struct usb_gadget *gadge
 		 */
 		if (w_value && !f->get_alt)
 			break;
+
+		spin_lock(&cdev->lock);
 		value = f->set_alt(f, w_index, w_value);
 		if (value == USB_GADGET_DELAYED_STATUS) {
 			DBG(cdev,
@@ -1628,6 +1630,7 @@ composite_setup(struct usb_gadget *gadge
 			DBG(cdev, "delayed_status count %d\n",
 					cdev->delayed_status);
 		}
+		spin_unlock(&cdev->lock);
 		break;
 	case USB_REQ_GET_INTERFACE:
 		if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE))
diff -druNp --no-dereference linux-libre-4.4.151-gnu/drivers/usb/host/xhci.c linux-libre-4.4.152-gnu/drivers/usb/host/xhci.c
--- linux-libre-4.4.151-gnu/drivers/usb/host/xhci.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/drivers/usb/host/xhci.c	2018-08-24 07:27:02.000000000 -0400
@@ -1052,8 +1052,13 @@ int xhci_resume(struct xhci_hcd *xhci, b
 		command = readl(&xhci->op_regs->command);
 		command |= CMD_CRS;
 		writel(command, &xhci->op_regs->command);
+		/*
+		 * Some controllers take up to 55+ ms to complete the controller
+		 * restore so setting the timeout to 100ms. Xhci specification
+		 * doesn't mention any timeout value.
+		 */
 		if (xhci_handshake(&xhci->op_regs->status,
-			      STS_RESTORE, 0, 10 * 1000)) {
+			      STS_RESTORE, 0, 100 * 1000)) {
 			xhci_warn(xhci, "WARN: xHC restore state timeout\n");
 			spin_unlock_irq(&xhci->lock);
 			return -ETIMEDOUT;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/fs/ext4/mballoc.c linux-libre-4.4.152-gnu/fs/ext4/mballoc.c
--- linux-libre-4.4.151-gnu/fs/ext4/mballoc.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/fs/ext4/mballoc.c	2018-08-24 07:27:02.000000000 -0400
@@ -26,6 +26,7 @@
 #include <linux/log2.h>
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/nospec.h>
 #include <linux/backing-dev.h>
 #include <trace/events/ext4.h>
 
@@ -2144,7 +2145,8 @@ ext4_mb_regular_allocator(struct ext4_al
 		 * This should tell if fe_len is exactly power of 2
 		 */
 		if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0)
-			ac->ac_2order = i - 1;
+			ac->ac_2order = array_index_nospec(i - 1,
+							   sb->s_blocksize_bits + 2);
 	}
 
 	/* if stream allocation is enabled, use global goal */
diff -druNp --no-dereference linux-libre-4.4.151-gnu/fs/reiserfs/xattr.c linux-libre-4.4.152-gnu/fs/reiserfs/xattr.c
--- linux-libre-4.4.151-gnu/fs/reiserfs/xattr.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/fs/reiserfs/xattr.c	2018-08-24 07:27:02.000000000 -0400
@@ -791,8 +791,10 @@ static int listxattr_filler(struct dir_c
 			size = handler->list(handler, b->dentry,
 					     b->buf + b->pos, b->size, name,
 					     namelen);
-			if (size > b->size)
+			if (b->pos + size > b->size) {
+				b->pos = -ERANGE;
 				return -ERANGE;
+			}
 		} else {
 			size = handler->list(handler, b->dentry,
 					     NULL, 0, name, namelen);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/include/linux/fsl/guts.h linux-libre-4.4.152-gnu/include/linux/fsl/guts.h
--- linux-libre-4.4.151-gnu/include/linux/fsl/guts.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/include/linux/fsl/guts.h	2018-08-24 07:27:02.000000000 -0400
@@ -16,6 +16,7 @@
 #define __FSL_GUTS_H__
 
 #include <linux/types.h>
+#include <linux/io.h>
 
 /**
  * Global Utility Registers.
diff -druNp --no-dereference linux-libre-4.4.151-gnu/include/net/net_namespace.h linux-libre-4.4.152-gnu/include/net/net_namespace.h
--- linux-libre-4.4.151-gnu/include/net/net_namespace.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/include/net/net_namespace.h	2018-08-24 07:27:02.000000000 -0400
@@ -115,6 +115,7 @@ struct net {
 #endif
 #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
 	struct netns_nf_frag	nf_frag;
+	struct ctl_table_header *nf_frag_frags_hdr;
 #endif
 	struct sock		*nfnl;
 	struct sock		*nfnl_stash;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/include/net/netns/ipv6.h linux-libre-4.4.152-gnu/include/net/netns/ipv6.h
--- linux-libre-4.4.151-gnu/include/net/netns/ipv6.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/include/net/netns/ipv6.h	2018-08-24 07:27:02.000000000 -0400
@@ -86,7 +86,6 @@ struct netns_ipv6 {
 
 #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
 struct netns_nf_frag {
-	struct netns_sysctl_ipv6 sysctl;
 	struct netns_frags	frags;
 };
 #endif
diff -druNp --no-dereference linux-libre-4.4.151-gnu/include/net/tcp.h linux-libre-4.4.152-gnu/include/net/tcp.h
--- linux-libre-4.4.151-gnu/include/net/tcp.h	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/include/net/tcp.h	2018-08-24 07:27:02.000000000 -0400
@@ -821,8 +821,6 @@ enum tcp_ca_event {
 	CA_EVENT_LOSS,		/* loss timeout */
 	CA_EVENT_ECN_NO_CE,	/* ECT set, but not CE marked */
 	CA_EVENT_ECN_IS_CE,	/* received CE marked IP packet */
-	CA_EVENT_DELAYED_ACK,	/* Delayed ack is sent */
-	CA_EVENT_NON_DELAYED_ACK,
 };
 
 /* Information about inbound ACK, passed to cong_ops->in_ack_event() */
diff -druNp --no-dereference linux-libre-4.4.151-gnu/kernel/locking/lockdep.c linux-libre-4.4.152-gnu/kernel/locking/lockdep.c
--- linux-libre-4.4.151-gnu/kernel/locking/lockdep.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/kernel/locking/lockdep.c	2018-08-24 07:27:02.000000000 -0400
@@ -1264,11 +1264,11 @@ unsigned long lockdep_count_forward_deps
 	this.parent = NULL;
 	this.class = class;
 
-	local_irq_save(flags);
+	raw_local_irq_save(flags);
 	arch_spin_lock(&lockdep_lock);
 	ret = __lockdep_count_forward_deps(&this);
 	arch_spin_unlock(&lockdep_lock);
-	local_irq_restore(flags);
+	raw_local_irq_restore(flags);
 
 	return ret;
 }
@@ -1291,11 +1291,11 @@ unsigned long lockdep_count_backward_dep
 	this.parent = NULL;
 	this.class = class;
 
-	local_irq_save(flags);
+	raw_local_irq_save(flags);
 	arch_spin_lock(&lockdep_lock);
 	ret = __lockdep_count_backward_deps(&this);
 	arch_spin_unlock(&lockdep_lock);
-	local_irq_restore(flags);
+	raw_local_irq_restore(flags);
 
 	return ret;
 }
@@ -4123,7 +4123,7 @@ void debug_check_no_locks_freed(const vo
 	if (unlikely(!debug_locks))
 		return;
 
-	local_irq_save(flags);
+	raw_local_irq_save(flags);
 	for (i = 0; i < curr->lockdep_depth; i++) {
 		hlock = curr->held_locks + i;
 
@@ -4134,7 +4134,7 @@ void debug_check_no_locks_freed(const vo
 		print_freed_lock_bug(curr, mem_from, mem_from + mem_len, hlock);
 		break;
 	}
-	local_irq_restore(flags);
+	raw_local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(debug_check_no_locks_freed);
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/kernel/trace/trace.c linux-libre-4.4.152-gnu/kernel/trace/trace.c
--- linux-libre-4.4.151-gnu/kernel/trace/trace.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/kernel/trace/trace.c	2018-08-24 07:27:02.000000000 -0400
@@ -2186,6 +2186,7 @@ out:
 }
 EXPORT_SYMBOL_GPL(trace_vbprintk);
 
+__printf(3, 0)
 static int
 __trace_array_vprintk(struct ring_buffer *buffer,
 		      unsigned long ip, const char *fmt, va_list args)
@@ -2236,12 +2237,14 @@ __trace_array_vprintk(struct ring_buffer
 	return len;
 }
 
+__printf(3, 0)
 int trace_array_vprintk(struct trace_array *tr,
 			unsigned long ip, const char *fmt, va_list args)
 {
 	return __trace_array_vprintk(tr->trace_buffer.buffer, ip, fmt, args);
 }
 
+__printf(3, 0)
 int trace_array_printk(struct trace_array *tr,
 		       unsigned long ip, const char *fmt, ...)
 {
@@ -2257,6 +2260,7 @@ int trace_array_printk(struct trace_arra
 	return ret;
 }
 
+__printf(3, 4)
 int trace_array_printk_buf(struct ring_buffer *buffer,
 			   unsigned long ip, const char *fmt, ...)
 {
@@ -2272,6 +2276,7 @@ int trace_array_printk_buf(struct ring_b
 	return ret;
 }
 
+__printf(2, 0)
 int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
 {
 	return trace_array_vprintk(&global_trace, ip, fmt, args);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/Makefile linux-libre-4.4.152-gnu/Makefile
--- linux-libre-4.4.151-gnu/Makefile	2018-08-22 11:09:49.000000000 -0400
+++ linux-libre-4.4.152-gnu/Makefile	2018-08-24 11:43:10.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 151
+SUBLEVEL = 152
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/mm/kasan/kasan.c linux-libre-4.4.152-gnu/mm/kasan/kasan.c
--- linux-libre-4.4.151-gnu/mm/kasan/kasan.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/mm/kasan/kasan.c	2018-08-24 07:27:02.000000000 -0400
@@ -427,12 +427,13 @@ void kasan_kfree_large(const void *ptr)
 int kasan_module_alloc(void *addr, size_t size)
 {
 	void *ret;
+	size_t scaled_size;
 	size_t shadow_size;
 	unsigned long shadow_start;
 
 	shadow_start = (unsigned long)kasan_mem_to_shadow(addr);
-	shadow_size = round_up(size >> KASAN_SHADOW_SCALE_SHIFT,
-			PAGE_SIZE);
+	scaled_size = (size + KASAN_SHADOW_MASK) >> KASAN_SHADOW_SCALE_SHIFT;
+	shadow_size = round_up(scaled_size, PAGE_SIZE);
 
 	if (WARN_ON(!PAGE_ALIGNED(shadow_start)))
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/bridge/br_if.c linux-libre-4.4.152-gnu/net/bridge/br_if.c
--- linux-libre-4.4.151-gnu/net/bridge/br_if.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/bridge/br_if.c	2018-08-24 07:27:02.000000000 -0400
@@ -511,8 +511,11 @@ int br_add_if(struct net_bridge *br, str
 	if (br_fdb_insert(br, p, dev->dev_addr, 0))
 		netdev_err(dev, "failed insert local address bridge forwarding table\n");
 
-	if (nbp_vlan_init(p))
+	err = nbp_vlan_init(p);
+	if (err) {
 		netdev_err(dev, "failed to initialize vlan filtering on this port\n");
+		goto err6;
+	}
 
 	spin_lock_bh(&br->lock);
 	changed_addr = br_stp_recalculate_bridge_id(br);
@@ -533,6 +536,12 @@ int br_add_if(struct net_bridge *br, str
 
 	return 0;
 
+err6:
+	list_del_rcu(&p->list);
+	br_fdb_delete_by_port(br, p, 0, 1);
+	nbp_update_port_count(br);
+	netdev_upper_dev_unlink(dev, br->dev);
+
 err5:
 	dev->priv_flags &= ~IFF_BRIDGE_PORT;
 	netdev_rx_handler_unregister(dev);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/core/dev.c linux-libre-4.4.152-gnu/net/core/dev.c
--- linux-libre-4.4.151-gnu/net/core/dev.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/core/dev.c	2018-08-24 07:27:02.000000000 -0400
@@ -7420,7 +7420,8 @@ int dev_change_net_namespace(struct net_
 		/* We get here if we can't use the current device name */
 		if (!pat)
 			goto out;
-		if (dev_get_valid_name(net, dev, pat) < 0)
+		err = dev_get_valid_name(net, dev, pat);
+		if (err < 0)
 			goto out;
 	}
 
@@ -7432,7 +7433,6 @@ int dev_change_net_namespace(struct net_
 	dev_close(dev);
 
 	/* And unlink it from device chain */
-	err = -ENODEV;
 	unlist_netdevice(dev);
 
 	synchronize_net();
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv4/netfilter/ip_tables.c linux-libre-4.4.152-gnu/net/ipv4/netfilter/ip_tables.c
--- linux-libre-4.4.151-gnu/net/ipv4/netfilter/ip_tables.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv4/netfilter/ip_tables.c	2018-08-24 07:27:02.000000000 -0400
@@ -2072,6 +2072,7 @@ static struct xt_match ipt_builtin_mt[]
 		.checkentry = icmp_checkentry,
 		.proto      = IPPROTO_ICMP,
 		.family     = NFPROTO_IPV4,
+		.me	    = THIS_MODULE,
 	},
 };
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv4/tcp.c linux-libre-4.4.152-gnu/net/ipv4/tcp.c
--- linux-libre-4.4.151-gnu/net/ipv4/tcp.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv4/tcp.c	2018-08-24 07:27:02.000000000 -0400
@@ -1659,7 +1659,7 @@ int tcp_recvmsg(struct sock *sk, struct
 			 * shouldn't happen.
 			 */
 			if (WARN(before(*seq, TCP_SKB_CB(skb)->seq),
-				 "recvmsg bug: copied %X seq %X rcvnxt %X fl %X\n",
+				 "TCP recvmsg seq # bug: copied %X, seq %X, rcvnxt %X, fl %X\n",
 				 *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
 				 flags))
 				break;
@@ -1672,7 +1672,7 @@ int tcp_recvmsg(struct sock *sk, struct
 			if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
 				goto found_fin_ok;
 			WARN(!(flags & MSG_PEEK),
-			     "recvmsg bug 2: copied %X seq %X rcvnxt %X fl %X\n",
+			     "TCP recvmsg seq # bug 2: copied %X, seq %X, rcvnxt %X, fl %X\n",
 			     *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, flags);
 		}
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv4/tcp_dctcp.c linux-libre-4.4.152-gnu/net/ipv4/tcp_dctcp.c
--- linux-libre-4.4.151-gnu/net/ipv4/tcp_dctcp.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv4/tcp_dctcp.c	2018-08-24 07:27:02.000000000 -0400
@@ -55,7 +55,6 @@ struct dctcp {
 	u32 dctcp_alpha;
 	u32 next_seq;
 	u32 ce_state;
-	u32 delayed_ack_reserved;
 	u32 loss_cwnd;
 };
 
@@ -96,7 +95,6 @@ static void dctcp_init(struct sock *sk)
 
 		ca->dctcp_alpha = min(dctcp_alpha_on_init, DCTCP_MAX_ALPHA);
 
-		ca->delayed_ack_reserved = 0;
 		ca->loss_cwnd = 0;
 		ca->ce_state = 0;
 
@@ -230,25 +228,6 @@ static void dctcp_state(struct sock *sk,
 	}
 }
 
-static void dctcp_update_ack_reserved(struct sock *sk, enum tcp_ca_event ev)
-{
-	struct dctcp *ca = inet_csk_ca(sk);
-
-	switch (ev) {
-	case CA_EVENT_DELAYED_ACK:
-		if (!ca->delayed_ack_reserved)
-			ca->delayed_ack_reserved = 1;
-		break;
-	case CA_EVENT_NON_DELAYED_ACK:
-		if (ca->delayed_ack_reserved)
-			ca->delayed_ack_reserved = 0;
-		break;
-	default:
-		/* Don't care for the rest. */
-		break;
-	}
-}
-
 static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
 {
 	switch (ev) {
@@ -258,10 +237,6 @@ static void dctcp_cwnd_event(struct sock
 	case CA_EVENT_ECN_NO_CE:
 		dctcp_ce_state_1_to_0(sk);
 		break;
-	case CA_EVENT_DELAYED_ACK:
-	case CA_EVENT_NON_DELAYED_ACK:
-		dctcp_update_ack_reserved(sk, ev);
-		break;
 	default:
 		/* Don't care for the rest. */
 		break;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv4/tcp_output.c linux-libre-4.4.152-gnu/net/ipv4/tcp_output.c
--- linux-libre-4.4.151-gnu/net/ipv4/tcp_output.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv4/tcp_output.c	2018-08-24 07:27:02.000000000 -0400
@@ -3316,8 +3316,6 @@ void tcp_send_delayed_ack(struct sock *s
 	int ato = icsk->icsk_ack.ato;
 	unsigned long timeout;
 
-	tcp_ca_event(sk, CA_EVENT_DELAYED_ACK);
-
 	if (ato > TCP_DELACK_MIN) {
 		const struct tcp_sock *tp = tcp_sk(sk);
 		int max_ato = HZ / 2;
@@ -3374,8 +3372,6 @@ void __tcp_send_ack(struct sock *sk, u32
 	if (sk->sk_state == TCP_CLOSE)
 		return;
 
-	tcp_ca_event(sk, CA_EVENT_NON_DELAYED_ACK);
-
 	/* We are not putting this on the write queue, so
 	 * tcp_transmit_skb() will set the ownership to this
 	 * sock.
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv6/mcast.c linux-libre-4.4.152-gnu/net/ipv6/mcast.c
--- linux-libre-4.4.151-gnu/net/ipv6/mcast.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv6/mcast.c	2018-08-24 07:27:02.000000000 -0400
@@ -2061,7 +2061,8 @@ void ipv6_mc_dad_complete(struct inet6_d
 		mld_send_initial_cr(idev);
 		idev->mc_dad_count--;
 		if (idev->mc_dad_count)
-			mld_dad_start_timer(idev, idev->mc_maxdelay);
+			mld_dad_start_timer(idev,
+					    unsolicited_report_interval(idev));
 	}
 }
 
@@ -2073,7 +2074,8 @@ static void mld_dad_timer_expire(unsigne
 	if (idev->mc_dad_count) {
 		idev->mc_dad_count--;
 		if (idev->mc_dad_count)
-			mld_dad_start_timer(idev, idev->mc_maxdelay);
+			mld_dad_start_timer(idev,
+					    unsolicited_report_interval(idev));
 	}
 	in6_dev_put(idev);
 }
@@ -2431,7 +2433,8 @@ static void mld_ifc_timer_expire(unsigne
 	if (idev->mc_ifc_count) {
 		idev->mc_ifc_count--;
 		if (idev->mc_ifc_count)
-			mld_ifc_start_timer(idev, idev->mc_maxdelay);
+			mld_ifc_start_timer(idev,
+					    unsolicited_report_interval(idev));
 	}
 	in6_dev_put(idev);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv6/netfilter/ip6_tables.c linux-libre-4.4.152-gnu/net/ipv6/netfilter/ip6_tables.c
--- linux-libre-4.4.151-gnu/net/ipv6/netfilter/ip6_tables.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv6/netfilter/ip6_tables.c	2018-08-24 07:27:02.000000000 -0400
@@ -2073,6 +2073,7 @@ static struct xt_match ip6t_builtin_mt[]
 		.checkentry = icmp6_checkentry,
 		.proto      = IPPROTO_ICMPV6,
 		.family     = NFPROTO_IPV6,
+		.me	    = THIS_MODULE,
 	},
 };
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/ipv6/netfilter/nf_conntrack_reasm.c linux-libre-4.4.152-gnu/net/ipv6/netfilter/nf_conntrack_reasm.c
--- linux-libre-4.4.151-gnu/net/ipv6/netfilter/nf_conntrack_reasm.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/ipv6/netfilter/nf_conntrack_reasm.c	2018-08-24 07:27:02.000000000 -0400
@@ -118,7 +118,7 @@ static int nf_ct_frag6_sysctl_register(s
 	if (hdr == NULL)
 		goto err_reg;
 
-	net->nf_frag.sysctl.frags_hdr = hdr;
+	net->nf_frag_frags_hdr = hdr;
 	return 0;
 
 err_reg:
@@ -132,8 +132,8 @@ static void __net_exit nf_ct_frags6_sysc
 {
 	struct ctl_table *table;
 
-	table = net->nf_frag.sysctl.frags_hdr->ctl_table_arg;
-	unregister_net_sysctl_table(net->nf_frag.sysctl.frags_hdr);
+	table = net->nf_frag_frags_hdr->ctl_table_arg;
+	unregister_net_sysctl_table(net->nf_frag_frags_hdr);
 	if (!net_eq(net, &init_net))
 		kfree(table);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/netfilter/nf_conntrack_proto_dccp.c linux-libre-4.4.152-gnu/net/netfilter/nf_conntrack_proto_dccp.c
--- linux-libre-4.4.151-gnu/net/netfilter/nf_conntrack_proto_dccp.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/netfilter/nf_conntrack_proto_dccp.c	2018-08-24 07:27:02.000000000 -0400
@@ -244,14 +244,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][D
 		 * We currently ignore Sync packets
 		 *
 		 *	sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
-			sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
+			sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
 		},
 		[DCCP_PKT_SYNCACK] = {
 		/*
 		 * We currently ignore SyncAck packets
 		 *
 		 *	sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
-			sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
+			sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
 		},
 	},
 	[CT_DCCP_ROLE_SERVER] = {
@@ -372,14 +372,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][D
 		 * We currently ignore Sync packets
 		 *
 		 *	sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
-			sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
+			sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
 		},
 		[DCCP_PKT_SYNCACK] = {
 		/*
 		 * We currently ignore SyncAck packets
 		 *
 		 *	sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
-			sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
+			sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
 		},
 	},
 };
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/packet/af_packet.c linux-libre-4.4.152-gnu/net/packet/af_packet.c
--- linux-libre-4.4.151-gnu/net/packet/af_packet.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/packet/af_packet.c	2018-08-24 07:27:02.000000000 -0400
@@ -2780,6 +2780,8 @@ static int packet_snd(struct socket *soc
 			goto out_free;
 	} else if (reserve) {
 		skb_reserve(skb, -reserve);
+		if (len < reserve)
+			skb_reset_network_header(skb);
 	}
 
 	/* Returns -EFAULT on error */
@@ -4174,6 +4176,8 @@ static int packet_set_ring(struct sock *
 	}
 
 	if (req->tp_block_nr) {
+		unsigned int min_frame_size;
+
 		/* Sanity tests and some calculations */
 		err = -EBUSY;
 		if (unlikely(rb->pg_vec))
@@ -4196,12 +4200,12 @@ static int packet_set_ring(struct sock *
 			goto out;
 		if (unlikely(!PAGE_ALIGNED(req->tp_block_size)))
 			goto out;
+		min_frame_size = po->tp_hdrlen + po->tp_reserve;
 		if (po->tp_version >= TPACKET_V3 &&
-		    req->tp_block_size <=
-		    BLK_PLUS_PRIV((u64)req_u->req3.tp_sizeof_priv) + sizeof(struct tpacket3_hdr))
+		    req->tp_block_size <
+		    BLK_PLUS_PRIV((u64)req_u->req3.tp_sizeof_priv) + min_frame_size)
 			goto out;
-		if (unlikely(req->tp_frame_size < po->tp_hdrlen +
-					po->tp_reserve))
+		if (unlikely(req->tp_frame_size < min_frame_size))
 			goto out;
 		if (unlikely(req->tp_frame_size & (TPACKET_ALIGNMENT - 1)))
 			goto out;
diff -druNp --no-dereference linux-libre-4.4.151-gnu/net/xfrm/xfrm_user.c linux-libre-4.4.152-gnu/net/xfrm/xfrm_user.c
--- linux-libre-4.4.151-gnu/net/xfrm/xfrm_user.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/net/xfrm/xfrm_user.c	2018-08-24 07:27:02.000000000 -0400
@@ -1624,9 +1624,11 @@ static inline size_t userpolicy_type_att
 #ifdef CONFIG_XFRM_SUB_POLICY
 static int copy_to_user_policy_type(u8 type, struct sk_buff *skb)
 {
-	struct xfrm_userpolicy_type upt = {
-		.type = type,
-	};
+	struct xfrm_userpolicy_type upt;
+
+	/* Sadly there are two holes in struct xfrm_userpolicy_type */
+	memset(&upt, 0, sizeof(upt));
+	upt.type = type;
 
 	return nla_put(skb, XFRMA_POLICY_TYPE, sizeof(upt), &upt);
 }
diff -druNp --no-dereference linux-libre-4.4.151-gnu/security/smack/smack_lsm.c linux-libre-4.4.152-gnu/security/smack/smack_lsm.c
--- linux-libre-4.4.151-gnu/security/smack/smack_lsm.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/security/smack/smack_lsm.c	2018-08-24 07:27:02.000000000 -0400
@@ -2260,6 +2260,7 @@ static void smack_task_to_inode(struct t
 	struct smack_known *skp = smk_of_task_struct(p);
 
 	isp->smk_inode = skp;
+	isp->smk_flags |= SMK_INODE_INSTANT;
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/perf/arch/powerpc/util/skip-callchain-idx.c linux-libre-4.4.152-gnu/tools/perf/arch/powerpc/util/skip-callchain-idx.c
--- linux-libre-4.4.151-gnu/tools/perf/arch/powerpc/util/skip-callchain-idx.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/perf/arch/powerpc/util/skip-callchain-idx.c	2018-08-24 07:27:02.000000000 -0400
@@ -243,7 +243,7 @@ int arch_skip_callchain_idx(struct threa
 	u64 ip;
 	u64 skip_slot = -1;
 
-	if (chain->nr < 3)
+	if (!chain || chain->nr < 3)
 		return skip_slot;
 
 	ip = chain->ips[2];
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/perf/tests/topology.c linux-libre-4.4.152-gnu/tools/perf/tests/topology.c
--- linux-libre-4.4.151-gnu/tools/perf/tests/topology.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/perf/tests/topology.c	2018-08-24 07:27:02.000000000 -0400
@@ -42,6 +42,7 @@ static int session_write_header(char *pa
 
 	perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY);
 	perf_header__set_feat(&session->header, HEADER_NRCPUS);
+	perf_header__set_feat(&session->header, HEADER_ARCH);
 
 	session->header.data_size += DATA_SIZE;
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/perf/util/llvm-utils.c linux-libre-4.4.152-gnu/tools/perf/util/llvm-utils.c
--- linux-libre-4.4.151-gnu/tools/perf/util/llvm-utils.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/perf/util/llvm-utils.c	2018-08-24 07:27:02.000000000 -0400
@@ -254,16 +254,16 @@ static const char *kinc_fetch_script =
 "#!/usr/bin/env sh\n"
 "if ! test -d \"$KBUILD_DIR\"\n"
 "then\n"
-"	exit -1\n"
+"	exit 1\n"
 "fi\n"
 "if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
 "then\n"
-"	exit -1\n"
+"	exit 1\n"
 "fi\n"
 "TMPDIR=`mktemp -d`\n"
 "if test -z \"$TMPDIR\"\n"
 "then\n"
-"    exit -1\n"
+"    exit 1\n"
 "fi\n"
 "cat << EOF > $TMPDIR/Makefile\n"
 "obj-y := dummy.o\n"
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/pstore/pstore_post_reboot_tests linux-libre-4.4.152-gnu/tools/testing/selftests/pstore/pstore_post_reboot_tests
--- linux-libre-4.4.151-gnu/tools/testing/selftests/pstore/pstore_post_reboot_tests	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/pstore/pstore_post_reboot_tests	2018-08-24 07:27:02.000000000 -0400
@@ -7,13 +7,16 @@
 #
 # Released under the terms of the GPL v2.
 
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
 . ./common_tests
 
 if [ -e $REBOOT_FLAG  ]; then
     rm $REBOOT_FLAG
 else
     prlog "pstore_crash_test has not been executed yet. we skip further tests."
-    exit 0
+    exit $ksft_skip
 fi
 
 prlog -n "Mounting pstore filesystem ... "
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/static_keys/test_static_keys.sh linux-libre-4.4.152-gnu/tools/testing/selftests/static_keys/test_static_keys.sh
--- linux-libre-4.4.151-gnu/tools/testing/selftests/static_keys/test_static_keys.sh	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/static_keys/test_static_keys.sh	2018-08-24 07:27:02.000000000 -0400
@@ -1,6 +1,19 @@
 #!/bin/sh
 # Runs static keys kernel module tests
 
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+if ! /sbin/modprobe -q -n test_static_key_base; then
+	echo "static_key: module test_static_key_base is not found [SKIP]"
+	exit $ksft_skip
+fi
+
+if ! /sbin/modprobe -q -n test_static_keys; then
+	echo "static_key: module test_static_keys is not found [SKIP]"
+	exit $ksft_skip
+fi
+
 if /sbin/modprobe -q test_static_key_base; then
 	if /sbin/modprobe -q test_static_keys; then
 		echo "static_key: ok"
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/sync/config linux-libre-4.4.152-gnu/tools/testing/selftests/sync/config
--- linux-libre-4.4.151-gnu/tools/testing/selftests/sync/config	1969-12-31 19:00:00.000000000 -0500
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/sync/config	2018-08-24 07:27:02.000000000 -0400
@@ -0,0 +1,4 @@
+CONFIG_STAGING=y
+CONFIG_ANDROID=y
+CONFIG_SYNC=y
+CONFIG_SW_SYNC=y
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/user/test_user_copy.sh linux-libre-4.4.152-gnu/tools/testing/selftests/user/test_user_copy.sh
--- linux-libre-4.4.151-gnu/tools/testing/selftests/user/test_user_copy.sh	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/user/test_user_copy.sh	2018-08-24 07:27:02.000000000 -0400
@@ -1,6 +1,13 @@
 #!/bin/sh
 # Runs copy_to/from_user infrastructure using test_user_copy kernel module
 
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+if ! /sbin/modprobe -q -n test_user_copy; then
+	echo "user: module test_user_copy is not found [SKIP]"
+	exit $ksft_skip
+fi
 if /sbin/modprobe -q test_user_copy; then
 	/sbin/modprobe -q -r test_user_copy
 	echo "user_copy: ok"
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/x86/sigreturn.c linux-libre-4.4.152-gnu/tools/testing/selftests/x86/sigreturn.c
--- linux-libre-4.4.151-gnu/tools/testing/selftests/x86/sigreturn.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/x86/sigreturn.c	2018-08-24 07:27:02.000000000 -0400
@@ -456,19 +456,38 @@ static int test_valid_sigreturn(int cs_b
 		greg_t req = requested_regs[i], res = resulting_regs[i];
 		if (i == REG_TRAPNO || i == REG_IP)
 			continue;	/* don't care */
-		if (i == REG_SP) {
-			printf("\tSP: %llx -> %llx\n", (unsigned long long)req,
-			       (unsigned long long)res);
 
+		if (i == REG_SP) {
 			/*
-			 * In many circumstances, the high 32 bits of rsp
-			 * are zeroed.  For example, we could be a real
-			 * 32-bit program, or we could hit any of a number
-			 * of poorly-documented IRET or segmented ESP
-			 * oddities.  If this happens, it's okay.
+			 * If we were using a 16-bit stack segment, then
+			 * the kernel is a bit stuck: IRET only restores
+			 * the low 16 bits of ESP/RSP if SS is 16-bit.
+			 * The kernel uses a hack to restore bits 31:16,
+			 * but that hack doesn't help with bits 63:32.
+			 * On Intel CPUs, bits 63:32 end up zeroed, and, on
+			 * AMD CPUs, they leak the high bits of the kernel
+			 * espfix64 stack pointer.  There's very little that
+			 * the kernel can do about it.
+			 *
+			 * Similarly, if we are returning to a 32-bit context,
+			 * the CPU will often lose the high 32 bits of RSP.
 			 */
-			if (res == (req & 0xFFFFFFFF))
-				continue;  /* OK; not expected to work */
+
+			if (res == req)
+				continue;
+
+			if (cs_bits != 64 && ((res ^ req) & 0xFFFFFFFF) == 0) {
+				printf("[NOTE]\tSP: %llx -> %llx\n",
+				       (unsigned long long)req,
+				       (unsigned long long)res);
+				continue;
+			}
+
+			printf("[FAIL]\tSP mismatch: requested 0x%llx; got 0x%llx\n",
+			       (unsigned long long)requested_regs[i],
+			       (unsigned long long)resulting_regs[i]);
+			nerrs++;
+			continue;
 		}
 
 		bool ignore_reg = false;
@@ -507,13 +526,6 @@ static int test_valid_sigreturn(int cs_b
 		}
 
 		if (requested_regs[i] != resulting_regs[i] && !ignore_reg) {
-			/*
-			 * SP is particularly interesting here.  The
-			 * usual cause of failures is that we hit the
-			 * nasty IRET case of returning to a 16-bit SS,
-			 * in which case bits 16:31 of the *kernel*
-			 * stack pointer persist in ESP.
-			 */
 			printf("[FAIL]\tReg %d mismatch: requested 0x%llx; got 0x%llx\n",
 			       i, (unsigned long long)requested_regs[i],
 			       (unsigned long long)resulting_regs[i]);
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/zram/zram_lib.sh linux-libre-4.4.152-gnu/tools/testing/selftests/zram/zram_lib.sh
--- linux-libre-4.4.151-gnu/tools/testing/selftests/zram/zram_lib.sh	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/zram/zram_lib.sh	2018-08-24 07:27:02.000000000 -0400
@@ -18,6 +18,9 @@ MODULE=0
 dev_makeswap=-1
 dev_mounted=-1
 
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
 trap INT
 
 check_prereqs()
@@ -27,7 +30,7 @@ check_prereqs()
 
 	if [ $uid -ne 0 ]; then
 		echo $msg must be run as root >&2
-		exit 0
+		exit $ksft_skip
 	fi
 }
 
diff -druNp --no-dereference linux-libre-4.4.151-gnu/tools/testing/selftests/zram/zram.sh linux-libre-4.4.152-gnu/tools/testing/selftests/zram/zram.sh
--- linux-libre-4.4.151-gnu/tools/testing/selftests/zram/zram.sh	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/tools/testing/selftests/zram/zram.sh	2018-08-24 07:27:02.000000000 -0400
@@ -1,6 +1,9 @@
 #!/bin/bash
 TCID="zram.sh"
 
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
 . ./zram_lib.sh
 
 run_zram () {
@@ -23,5 +26,5 @@ elif [ -b /dev/zram0 ]; then
 else
 	echo "$TCID : No zram.ko module or /dev/zram0 device file not found"
 	echo "$TCID : CONFIG_ZRAM is not set"
-	exit 1
+	exit $ksft_skip
 fi
diff -druNp --no-dereference linux-libre-4.4.151-gnu/virt/kvm/eventfd.c linux-libre-4.4.152-gnu/virt/kvm/eventfd.c
--- linux-libre-4.4.151-gnu/virt/kvm/eventfd.c	2018-08-22 01:48:38.000000000 -0400
+++ linux-libre-4.4.152-gnu/virt/kvm/eventfd.c	2018-08-24 07:27:02.000000000 -0400
@@ -405,11 +405,6 @@ kvm_irqfd_assign(struct kvm *kvm, struct
 	if (events & POLLIN)
 		schedule_work(&irqfd->inject);
 
-	/*
-	 * do not drop the file until the irqfd is fully initialized, otherwise
-	 * we might race against the POLLHUP
-	 */
-	fdput(f);
 #ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
 	irqfd->consumer.token = (void *)irqfd->eventfd;
 	irqfd->consumer.add_producer = kvm_arch_irq_bypass_add_producer;
@@ -423,6 +418,12 @@ kvm_irqfd_assign(struct kvm *kvm, struct
 #endif
 
 	srcu_read_unlock(&kvm->irq_srcu, idx);
+
+	/*
+	 * do not drop the file until the irqfd is fully initialized, otherwise
+	 * we might race against the POLLHUP
+	 */
+	fdput(f);
 	return 0;
 
 fail:
