diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/arm/boot/compressed/libfdt_env.h linux-libre-4.9.208-gnu/arch/arm/boot/compressed/libfdt_env.h
--- linux-libre-4.9.207-gnu/arch/arm/boot/compressed/libfdt_env.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/arm/boot/compressed/libfdt_env.h	2020-01-04 07:41:15.000000000 -0500
@@ -1,11 +1,13 @@
 #ifndef _ARM_LIBFDT_ENV_H
 #define _ARM_LIBFDT_ENV_H
 
+#include <linux/limits.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <asm/byteorder.h>
 
-#define INT_MAX			((int)(~0U>>1))
+#define INT32_MAX	S32_MAX
+#define UINT32_MAX	U32_MAX
 
 typedef __be16 fdt16_t;
 typedef __be32 fdt32_t;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/arm64/kernel/psci.c linux-libre-4.9.208-gnu/arch/arm64/kernel/psci.c
--- linux-libre-4.9.207-gnu/arch/arm64/kernel/psci.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/arm64/kernel/psci.c	2020-01-04 07:41:15.000000000 -0500
@@ -83,7 +83,8 @@ static void cpu_psci_cpu_die(unsigned in
 
 static int cpu_psci_cpu_kill(unsigned int cpu)
 {
-	int err, i;
+	int err;
+	unsigned long start, end;
 
 	if (!psci_ops.affinity_info)
 		return 0;
@@ -93,16 +94,18 @@ static int cpu_psci_cpu_kill(unsigned in
 	 * while it is dying. So, try again a few times.
 	 */
 
-	for (i = 0; i < 10; i++) {
+	start = jiffies;
+	end = start + msecs_to_jiffies(100);
+	do {
 		err = psci_ops.affinity_info(cpu_logical_map(cpu), 0);
 		if (err == PSCI_0_2_AFFINITY_LEVEL_OFF) {
-			pr_info("CPU%d killed.\n", cpu);
+			pr_info("CPU%d killed (polled %d ms)\n", cpu,
+				jiffies_to_msecs(jiffies - start));
 			return 0;
 		}
 
-		msleep(10);
-		pr_info("Retrying again to check for CPU kill\n");
-	}
+		usleep_range(100, 1000);
+	} while (time_before(jiffies, end));
 
 	pr_warn("CPU%d may not have shut down cleanly (AFFINITY_INFO reports %d)\n",
 			cpu, err);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/boot/libfdt_env.h linux-libre-4.9.208-gnu/arch/powerpc/boot/libfdt_env.h
--- linux-libre-4.9.207-gnu/arch/powerpc/boot/libfdt_env.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/boot/libfdt_env.h	2020-01-04 07:41:15.000000000 -0500
@@ -5,6 +5,8 @@
 #include <string.h>
 
 #define INT_MAX			((int)(~0U>>1))
+#define UINT32_MAX		((u32)~0U)
+#define INT32_MAX		((s32)(UINT32_MAX >> 1))
 
 #include "of.h"
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/kernel/irq.c linux-libre-4.9.208-gnu/arch/powerpc/kernel/irq.c
--- linux-libre-4.9.207-gnu/arch/powerpc/kernel/irq.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/kernel/irq.c	2020-01-04 07:41:15.000000000 -0500
@@ -527,8 +527,6 @@ void __do_irq(struct pt_regs *regs)
 
 	trace_irq_entry(regs);
 
-	check_stack_overflow();
-
 	/*
 	 * Query the platform PIC for the interrupt & ack it.
 	 *
@@ -560,6 +558,8 @@ void do_IRQ(struct pt_regs *regs)
 	irqtp = hardirq_ctx[raw_smp_processor_id()];
 	sirqtp = softirq_ctx[raw_smp_processor_id()];
 
+	check_stack_overflow();
+
 	/* Already there ? */
 	if (unlikely(curtp == irqtp || curtp == sirqtp)) {
 		__do_irq(regs);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/kernel/security.c linux-libre-4.9.208-gnu/arch/powerpc/kernel/security.c
--- linux-libre-4.9.207-gnu/arch/powerpc/kernel/security.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/kernel/security.c	2020-01-04 07:41:15.000000000 -0500
@@ -135,32 +135,33 @@ ssize_t cpu_show_meltdown(struct device
 
 	thread_priv = security_ftr_enabled(SEC_FTR_L1D_THREAD_PRIV);
 
-	if (rfi_flush || thread_priv) {
+	if (rfi_flush) {
 		struct seq_buf s;
 		seq_buf_init(&s, buf, PAGE_SIZE - 1);
 
-		seq_buf_printf(&s, "Mitigation: ");
-
-		if (rfi_flush)
-			seq_buf_printf(&s, "RFI Flush");
-
-		if (rfi_flush && thread_priv)
-			seq_buf_printf(&s, ", ");
-
+		seq_buf_printf(&s, "Mitigation: RFI Flush");
 		if (thread_priv)
-			seq_buf_printf(&s, "L1D private per thread");
+			seq_buf_printf(&s, ", L1D private per thread");
 
 		seq_buf_printf(&s, "\n");
 
 		return s.len;
 	}
 
+	if (thread_priv)
+		return sprintf(buf, "Vulnerable: L1D private per thread\n");
+
 	if (!security_ftr_enabled(SEC_FTR_L1D_FLUSH_HV) &&
 	    !security_ftr_enabled(SEC_FTR_L1D_FLUSH_PR))
 		return sprintf(buf, "Not affected\n");
 
 	return sprintf(buf, "Vulnerable\n");
 }
+
+ssize_t cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return cpu_show_meltdown(dev, attr, buf);
+}
 #endif
 
 ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, char *buf)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/kernel/time.c linux-libre-4.9.208-gnu/arch/powerpc/kernel/time.c
--- linux-libre-4.9.207-gnu/arch/powerpc/kernel/time.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/kernel/time.c	2020-01-04 07:41:15.000000000 -0500
@@ -257,7 +257,7 @@ static u64 scan_dispatch_log(u64 stop_tb
  * Accumulate stolen time by scanning the dispatch trace log.
  * Called on entry from user mode.
  */
-void accumulate_stolen_time(void)
+void notrace accumulate_stolen_time(void)
 {
 	u64 sst, ust;
 	u8 save_soft_enabled = local_paca->soft_enabled;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/mm/hash_utils_64.c linux-libre-4.9.208-gnu/arch/powerpc/mm/hash_utils_64.c
--- linux-libre-4.9.207-gnu/arch/powerpc/mm/hash_utils_64.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/mm/hash_utils_64.c	2020-01-04 07:41:15.000000000 -0500
@@ -289,10 +289,18 @@ int htab_bolt_mapping(unsigned long vsta
 		ret = mmu_hash_ops.hpte_insert(hpteg, vpn, paddr, tprot,
 					       HPTE_V_BOLTED, psize, psize,
 					       ssize);
-
+		if (ret == -1) {
+			/* Try to remove a non bolted entry */
+			ret = mmu_hash_ops.hpte_remove(hpteg);
+			if (ret != -1)
+				ret = mmu_hash_ops.hpte_insert(hpteg, vpn, paddr, tprot,
+							       HPTE_V_BOLTED, psize, psize,
+							       ssize);
+		}
 		if (ret < 0)
 			break;
 
+		cond_resched();
 #ifdef CONFIG_DEBUG_PAGEALLOC
 		if (debug_pagealloc_enabled() &&
 			(paddr >> PAGE_SHIFT) < linear_map_hash_count)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/powerpc/platforms/pseries/cmm.c linux-libre-4.9.208-gnu/arch/powerpc/platforms/pseries/cmm.c
--- linux-libre-4.9.207-gnu/arch/powerpc/platforms/pseries/cmm.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/powerpc/platforms/pseries/cmm.c	2020-01-04 07:41:15.000000000 -0500
@@ -391,6 +391,10 @@ static struct bus_type cmm_subsys = {
 	.dev_name = "cmm",
 };
 
+static void cmm_release_device(struct device *dev)
+{
+}
+
 /**
  * cmm_sysfs_register - Register with sysfs
  *
@@ -406,6 +410,7 @@ static int cmm_sysfs_register(struct dev
 
 	dev->id = 0;
 	dev->bus = &cmm_subsys;
+	dev->release = cmm_release_device;
 
 	if ((rc = device_register(dev)))
 		goto subsys_unregister;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/s390/kernel/dis.c linux-libre-4.9.208-gnu/arch/s390/kernel/dis.c
--- linux-libre-4.9.207-gnu/arch/s390/kernel/dis.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/s390/kernel/dis.c	2020-01-04 07:41:15.000000000 -0500
@@ -1930,10 +1930,11 @@ static int print_insn(char *buffer, unsi
 				ptr += sprintf(ptr, "%%c%i", value);
 			else if (operand->flags & OPERAND_VR)
 				ptr += sprintf(ptr, "%%v%i", value);
-			else if (operand->flags & OPERAND_PCREL)
-				ptr += sprintf(ptr, "%lx", (signed int) value
-								      + addr);
-			else if (operand->flags & OPERAND_SIGNED)
+			else if (operand->flags & OPERAND_PCREL) {
+				void *pcrel = (void *)((int)value + addr);
+
+				ptr += sprintf(ptr, "%px", pcrel);
+			} else if (operand->flags & OPERAND_SIGNED)
 				ptr += sprintf(ptr, "%i", value);
 			else
 				ptr += sprintf(ptr, "%u", value);
@@ -2005,7 +2006,7 @@ void show_code(struct pt_regs *regs)
 		else
 			*ptr++ = ' ';
 		addr = regs->psw.addr + start - 32;
-		ptr += sprintf(ptr, "%016lx: ", addr);
+		ptr += sprintf(ptr, "%px: ", (void *)addr);
 		if (start + opsize >= end)
 			break;
 		for (i = 0; i < opsize; i++)
@@ -2033,7 +2034,7 @@ void print_fn_code(unsigned char *code,
 		opsize = insn_length(*code);
 		if (opsize > len)
 			break;
-		ptr += sprintf(ptr, "%p: ", code);
+		ptr += sprintf(ptr, "%px: ", code);
 		for (i = 0; i < opsize; i++)
 			ptr += sprintf(ptr, "%02x", code[i]);
 		*ptr++ = '\t';
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/s390/kernel/perf_cpum_sf.c linux-libre-4.9.208-gnu/arch/s390/kernel/perf_cpum_sf.c
--- linux-libre-4.9.207-gnu/arch/s390/kernel/perf_cpum_sf.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/s390/kernel/perf_cpum_sf.c	2020-01-04 07:41:15.000000000 -0500
@@ -185,7 +185,7 @@ static int realloc_sampling_buffer(struc
 				   unsigned long num_sdb, gfp_t gfp_flags)
 {
 	int i, rc;
-	unsigned long *new, *tail;
+	unsigned long *new, *tail, *tail_prev = NULL;
 
 	if (!sfb->sdbt || !sfb->tail)
 		return -EINVAL;
@@ -224,6 +224,7 @@ static int realloc_sampling_buffer(struc
 			sfb->num_sdbt++;
 			/* Link current page to tail of chain */
 			*tail = (unsigned long)(void *) new + 1;
+			tail_prev = tail;
 			tail = new;
 		}
 
@@ -233,10 +234,22 @@ static int realloc_sampling_buffer(struc
 		 * issue, a new realloc call (if required) might succeed.
 		 */
 		rc = alloc_sample_data_block(tail, gfp_flags);
-		if (rc)
+		if (rc) {
+			/* Undo last SDBT. An SDBT with no SDB at its first
+			 * entry but with an SDBT entry instead can not be
+			 * handled by the interrupt handler code.
+			 * Avoid this situation.
+			 */
+			if (tail_prev) {
+				sfb->num_sdbt--;
+				free_page((unsigned long) new);
+				tail = tail_prev;
+			}
 			break;
+		}
 		sfb->num_sdb++;
 		tail++;
+		tail_prev = new = NULL;	/* Allocated at least one SBD */
 	}
 
 	/* Link sampling buffer to its origin */
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/sh/include/cpu-sh4/cpu/sh7734.h linux-libre-4.9.208-gnu/arch/sh/include/cpu-sh4/cpu/sh7734.h
--- linux-libre-4.9.207-gnu/arch/sh/include/cpu-sh4/cpu/sh7734.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/sh/include/cpu-sh4/cpu/sh7734.h	2020-01-04 07:41:15.000000000 -0500
@@ -133,7 +133,7 @@ enum {
 	GPIO_FN_EX_WAIT1, GPIO_FN_SD1_DAT0_A, GPIO_FN_DREQ2, GPIO_FN_CAN1_TX_C,
 		GPIO_FN_ET0_LINK_C, GPIO_FN_ET0_ETXD5_A,
 	GPIO_FN_EX_WAIT0, GPIO_FN_TCLK1_B,
-	GPIO_FN_RD_WR, GPIO_FN_TCLK0,
+	GPIO_FN_RD_WR, GPIO_FN_TCLK0, GPIO_FN_CAN_CLK_B, GPIO_FN_ET0_ETXD4,
 	GPIO_FN_EX_CS5, GPIO_FN_SD1_CMD_A, GPIO_FN_ATADIR, GPIO_FN_QSSL_B,
 		GPIO_FN_ET0_ETXD3_A,
 	GPIO_FN_EX_CS4, GPIO_FN_SD1_WP_A, GPIO_FN_ATAWR, GPIO_FN_QMI_QIO1_B,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/include/asm/crash.h linux-libre-4.9.208-gnu/arch/x86/include/asm/crash.h
--- linux-libre-4.9.207-gnu/arch/x86/include/asm/crash.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/include/asm/crash.h	2020-01-04 07:41:15.000000000 -0500
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_CRASH_H
 #define _ASM_X86_CRASH_H
 
+struct kimage;
+
 int crash_load_segments(struct kimage *image);
 int crash_copy_backup_region(struct kimage *image);
 int crash_setup_memmap_entries(struct kimage *image,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/include/asm/fixmap.h linux-libre-4.9.208-gnu/arch/x86/include/asm/fixmap.h
--- linux-libre-4.9.207-gnu/arch/x86/include/asm/fixmap.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/include/asm/fixmap.h	2020-01-04 07:41:15.000000000 -0500
@@ -142,7 +142,7 @@ extern pte_t *kmap_pte;
 extern pte_t *pkmap_page_table;
 
 void __native_set_fixmap(enum fixed_addresses idx, pte_t pte);
-void native_set_fixmap(enum fixed_addresses idx,
+void native_set_fixmap(unsigned /* enum fixed_addresses */ idx,
 		       phys_addr_t phys, pgprot_t flags);
 
 #ifndef CONFIG_PARAVIRT
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/kernel/apic/io_apic.c linux-libre-4.9.208-gnu/arch/x86/kernel/apic/io_apic.c
--- linux-libre-4.9.207-gnu/arch/x86/kernel/apic/io_apic.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/kernel/apic/io_apic.c	2020-01-04 07:41:15.000000000 -0500
@@ -1712,9 +1712,10 @@ static bool io_apic_level_ack_pending(st
 
 static inline bool ioapic_irqd_mask(struct irq_data *data)
 {
-	/* If we are moving the irq we need to mask it */
+	/* If we are moving the IRQ we need to mask it */
 	if (unlikely(irqd_is_setaffinity_pending(data))) {
-		mask_ioapic_irq(data);
+		if (!irqd_irq_masked(data))
+			mask_ioapic_irq(data);
 		return true;
 	}
 	return false;
@@ -1751,7 +1752,9 @@ static inline void ioapic_irqd_unmask(st
 		 */
 		if (!io_apic_level_ack_pending(data->chip_data))
 			irq_move_masked_irq(data);
-		unmask_ioapic_irq(data);
+		/* If the IRQ is masked in the core, leave it: */
+		if (!irqd_irq_masked(data))
+			unmask_ioapic_irq(data);
 	}
 }
 #else
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/kernel/cpu/mcheck/mce.c linux-libre-4.9.208-gnu/arch/x86/kernel/cpu/mcheck/mce.c
--- linux-libre-4.9.207-gnu/arch/x86/kernel/cpu/mcheck/mce.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/kernel/cpu/mcheck/mce.c	2020-01-04 07:41:15.000000000 -0500
@@ -782,8 +782,8 @@ static int mce_no_way_out(struct mce *m,
 		if (quirk_no_way_out)
 			quirk_no_way_out(i, m, regs);
 
+		m->bank = i;
 		if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
-			m->bank = i;
 			mce_read_aux(m, i);
 			*msg = tmp;
 			return 1;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/kernel/cpu/mcheck/therm_throt.c linux-libre-4.9.208-gnu/arch/x86/kernel/cpu/mcheck/therm_throt.c
--- linux-libre-4.9.207-gnu/arch/x86/kernel/cpu/mcheck/therm_throt.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/kernel/cpu/mcheck/therm_throt.c	2020-01-04 07:41:15.000000000 -0500
@@ -190,7 +190,7 @@ static int therm_throt_process(bool new_
 	/* if we just entered the thermal event */
 	if (new_event) {
 		if (event == THERMAL_THROTTLING_EVENT)
-			pr_crit("CPU%d: %s temperature above threshold, cpu clock throttled (total events = %lu)\n",
+			pr_warn("CPU%d: %s temperature above threshold, cpu clock throttled (total events = %lu)\n",
 				this_cpu,
 				level == CORE_LEVEL ? "Core" : "Package",
 				state->count);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/lib/x86-opcode-map.txt linux-libre-4.9.208-gnu/arch/x86/lib/x86-opcode-map.txt
--- linux-libre-4.9.207-gnu/arch/x86/lib/x86-opcode-map.txt	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/lib/x86-opcode-map.txt	2020-01-04 07:41:15.000000000 -0500
@@ -333,7 +333,7 @@ AVXcode: 1
 06: CLTS
 07: SYSRET (o64)
 08: INVD
-09: WBINVD
+09: WBINVD | WBNOINVD (F3)
 0a:
 0b: UD2 (1B)
 0c:
@@ -364,7 +364,7 @@ AVXcode: 1
 # a ModR/M byte.
 1a: BNDCL Gv,Ev (F3) | BNDCU Gv,Ev (F2) | BNDMOV Gv,Ev (66) | BNDLDX Gv,Ev
 1b: BNDCN Gv,Ev (F2) | BNDMOV Ev,Gv (66) | BNDMK Gv,Ev (F3) | BNDSTX Ev,Gv
-1c:
+1c: Grp20 (1A),(1C)
 1d:
 1e:
 1f: NOP Ev
@@ -792,6 +792,8 @@ f3: Grp17 (1A)
 f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v)
 f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v)
 f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v)
+f8: MOVDIR64B Gv,Mdqq (66) | ENQCMD Gv,Mdqq (F2) | ENQCMDS Gv,Mdqq (F3)
+f9: MOVDIRI My,Gy
 EndTable
 
 Table: 3-byte opcode 2 (0x0f 0x3a)
@@ -943,9 +945,9 @@ GrpTable: Grp6
 EndTable
 
 GrpTable: Grp7
-0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B)
-1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B)
-2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B)
+0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B)
+1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B)
+2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B)
 3: LIDT Ms
 4: SMSW Mw/Rv
 5: rdpkru (110),(11B) | wrpkru (111),(11B)
@@ -1011,7 +1013,7 @@ GrpTable: Grp15
 3: vstmxcsr Md (v1) | WRGSBASE Ry (F3),(11B)
 4: XSAVE
 5: XRSTOR | lfence (11B)
-6: XSAVEOPT | clwb (66) | mfence (11B)
+6: XSAVEOPT | clwb (66) | mfence (11B) | TPAUSE Rd (66),(11B) | UMONITOR Rv (F3),(11B) | UMWAIT Rd (F2),(11B)
 7: clflush | clflushopt (66) | sfence (11B)
 EndTable
 
@@ -1042,6 +1044,10 @@ GrpTable: Grp19
 6: vscatterpf1qps/d Wx (66),(ev)
 EndTable
 
+GrpTable: Grp20
+0: cldemote Mb
+EndTable
+
 # AMD's Prefetch Group
 GrpTable: GrpP
 0: PREFETCH
diff -druNp --no-dereference linux-libre-4.9.207-gnu/arch/x86/mm/pgtable.c linux-libre-4.9.208-gnu/arch/x86/mm/pgtable.c
--- linux-libre-4.9.207-gnu/arch/x86/mm/pgtable.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/arch/x86/mm/pgtable.c	2020-01-04 07:41:15.000000000 -0500
@@ -544,8 +544,8 @@ void __native_set_fixmap(enum fixed_addr
 	fixmaps_set++;
 }
 
-void native_set_fixmap(enum fixed_addresses idx, phys_addr_t phys,
-		       pgprot_t flags)
+void native_set_fixmap(unsigned /* enum fixed_addresses */ idx,
+		       phys_addr_t phys, pgprot_t flags)
 {
 	__native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags));
 }
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/ata/libata-core.c linux-libre-4.9.208-gnu/drivers/ata/libata-core.c
--- linux-libre-4.9.207-gnu/drivers/ata/libata-core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/ata/libata-core.c	2020-01-04 07:41:15.000000000 -0500
@@ -6550,6 +6550,9 @@ void ata_host_detach(struct ata_host *ho
 {
 	int i;
 
+	/* Ensure ata_port probe has completed */
+	async_synchronize_full();
+
 	for (i = 0; i < host->n_ports; i++)
 		ata_port_detach(host->ports[i]);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/cdrom/cdrom.c linux-libre-4.9.208-gnu/drivers/cdrom/cdrom.c
--- linux-libre-4.9.207-gnu/drivers/cdrom/cdrom.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/cdrom/cdrom.c	2020-01-04 07:41:15.000000000 -0500
@@ -998,6 +998,12 @@ static void cdrom_count_tracks(struct cd
 	tracks->xa = 0;
 	tracks->error = 0;
 	cd_dbg(CD_COUNT_TRACKS, "entering cdrom_count_tracks\n");
+
+	if (!CDROM_CAN(CDC_PLAY_AUDIO)) {
+		tracks->error = CDS_NO_INFO;
+		return;
+	}
+
 	/* Grab the TOC header so we can see how many tracks there are */
 	ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header);
 	if (ret) {
@@ -1164,7 +1170,8 @@ int cdrom_open(struct cdrom_device_info
 		ret = open_for_data(cdi);
 		if (ret)
 			goto err;
-		cdrom_mmc3_profile(cdi);
+		if (CDROM_CAN(CDC_GENERIC_PACKET))
+			cdrom_mmc3_profile(cdi);
 		if (mode & FMODE_WRITE) {
 			ret = -EROFS;
 			if (cdrom_open_write(cdi))
@@ -2873,6 +2880,9 @@ int cdrom_get_last_written(struct cdrom_
 	   it doesn't give enough information or fails. then we return
 	   the toc contents. */
 use_toc:
+	if (!CDROM_CAN(CDC_PLAY_AUDIO))
+		return -ENOSYS;
+
 	toc.cdte_format = CDROM_MSF;
 	toc.cdte_track = CDROM_LEADOUT;
 	if ((ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCENTRY, &toc)))
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/char/hw_random/omap3-rom-rng.c linux-libre-4.9.208-gnu/drivers/char/hw_random/omap3-rom-rng.c
--- linux-libre-4.9.207-gnu/drivers/char/hw_random/omap3-rom-rng.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/char/hw_random/omap3-rom-rng.c	2020-01-04 07:41:15.000000000 -0500
@@ -114,7 +114,8 @@ static int omap3_rom_rng_remove(struct p
 {
 	cancel_delayed_work_sync(&idle_work);
 	hwrng_unregister(&omap3_rom_rng_ops);
-	clk_disable_unprepare(rng_clk);
+	if (!rng_idle)
+		clk_disable_unprepare(rng_clk);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/clk/pxa/clk-pxa27x.c linux-libre-4.9.208-gnu/drivers/clk/pxa/clk-pxa27x.c
--- linux-libre-4.9.207-gnu/drivers/clk/pxa/clk-pxa27x.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/clk/pxa/clk-pxa27x.c	2020-01-04 07:41:15.000000000 -0500
@@ -362,6 +362,7 @@ struct dummy_clk {
 };
 static struct dummy_clk dummy_clks[] __initdata = {
 	DUMMY_CLK(NULL, "pxa27x-gpio", "osc_32_768khz"),
+	DUMMY_CLK(NULL, "pxa-rtc", "osc_32_768khz"),
 	DUMMY_CLK(NULL, "sa1100-rtc", "osc_32_768khz"),
 	DUMMY_CLK("UARTCLK", "pxa2xx-ir", "STUART"),
 };
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/clk/qcom/clk-rcg2.c linux-libre-4.9.208-gnu/drivers/clk/qcom/clk-rcg2.c
--- linux-libre-4.9.207-gnu/drivers/clk/qcom/clk-rcg2.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/clk/qcom/clk-rcg2.c	2020-01-04 07:41:15.000000000 -0500
@@ -196,6 +196,8 @@ static int _freq_tbl_determine_rate(stru
 	p = clk_hw_get_parent_by_index(hw, index);
 	if (clk_flags & CLK_SET_RATE_PARENT) {
 		if (f->pre_div) {
+			if (!rate)
+				rate = req->rate;
 			rate /= 2;
 			rate *= f->pre_div + 1;
 		}
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/clk/qcom/common.c linux-libre-4.9.208-gnu/drivers/clk/qcom/common.c
--- linux-libre-4.9.207-gnu/drivers/clk/qcom/common.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/clk/qcom/common.c	2020-01-04 07:41:15.000000000 -0500
@@ -37,6 +37,9 @@ struct freq_tbl *qcom_find_freq(const st
 	if (!f)
 		return NULL;
 
+	if (!f->freq)
+		return f;
+
 	for (; f->freq; f++)
 		if (rate <= f->freq)
 			return f;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/clocksource/asm9260_timer.c linux-libre-4.9.208-gnu/drivers/clocksource/asm9260_timer.c
--- linux-libre-4.9.207-gnu/drivers/clocksource/asm9260_timer.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/clocksource/asm9260_timer.c	2020-01-04 07:41:15.000000000 -0500
@@ -198,6 +198,10 @@ static int __init asm9260_timer_init(str
 	}
 
 	clk = of_clk_get(np, 0);
+	if (IS_ERR(clk)) {
+		pr_err("Failed to get clk!\n");
+		return PTR_ERR(clk);
+	}
 
 	ret = clk_prepare_enable(clk);
 	if (ret) {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/cpufreq/cpufreq.c linux-libre-4.9.208-gnu/drivers/cpufreq/cpufreq.c
--- linux-libre-4.9.207-gnu/drivers/cpufreq/cpufreq.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/cpufreq/cpufreq.c	2020-01-04 07:41:15.000000000 -0500
@@ -2449,6 +2449,13 @@ int cpufreq_register_driver(struct cpufr
 	if (cpufreq_disabled())
 		return -ENODEV;
 
+	/*
+	 * The cpufreq core depends heavily on the availability of device
+	 * structure, make sure they are available before proceeding further.
+	 */
+	if (!get_cpu_device(0))
+		return -EPROBE_DEFER;
+
 	if (!driver_data || !driver_data->verify || !driver_data->init ||
 	    !(driver_data->setpolicy || driver_data->target_index ||
 		    driver_data->target) ||
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/crypto/sunxi-ss/sun4i-ss-hash.c linux-libre-4.9.208-gnu/drivers/crypto/sunxi-ss/sun4i-ss-hash.c
--- linux-libre-4.9.207-gnu/drivers/crypto/sunxi-ss/sun4i-ss-hash.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/crypto/sunxi-ss/sun4i-ss-hash.c	2020-01-04 07:41:15.000000000 -0500
@@ -286,8 +286,8 @@ static int sun4i_hash(struct ahash_reque
 			 */
 			while (op->len < 64 && i < end) {
 				/* how many bytes we can read from current SG */
-				in_r = min3(mi.length - in_i, end - i,
-					    64 - op->len);
+				in_r = min(end - i, 64 - op->len);
+				in_r = min_t(size_t, mi.length - in_i, in_r);
 				memcpy(op->buf + op->len, mi.addr + in_i, in_r);
 				op->len += in_r;
 				i += in_r;
@@ -307,8 +307,8 @@ static int sun4i_hash(struct ahash_reque
 		}
 		if (mi.length - in_i > 3 && i < end) {
 			/* how many bytes we can read from current SG */
-			in_r = min3(mi.length - in_i, areq->nbytes - i,
-				    ((mi.length - in_i) / 4) * 4);
+			in_r = min_t(size_t, mi.length - in_i, areq->nbytes - i);
+			in_r = min_t(size_t, ((mi.length - in_i) / 4) * 4, in_r);
 			/* how many bytes we can write in the device*/
 			todo = min3((u32)(end - i) / 4, rx_cnt, (u32)in_r / 4);
 			writesl(ss->base + SS_RXFIFO, mi.addr + in_i, todo);
@@ -334,8 +334,8 @@ static int sun4i_hash(struct ahash_reque
 	if ((areq->nbytes - i) < 64) {
 		while (i < areq->nbytes && in_i < mi.length && op->len < 64) {
 			/* how many bytes we can read from current SG */
-			in_r = min3(mi.length - in_i, areq->nbytes - i,
-				    64 - op->len);
+			in_r = min(areq->nbytes - i, 64 - op->len);
+			in_r = min_t(size_t, mi.length - in_i, in_r);
 			memcpy(op->buf + op->len, mi.addr + in_i, in_r);
 			op->len += in_r;
 			i += in_r;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/crypto/vmx/Makefile linux-libre-4.9.208-gnu/drivers/crypto/vmx/Makefile
--- linux-libre-4.9.207-gnu/drivers/crypto/vmx/Makefile	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/crypto/vmx/Makefile	2020-01-04 07:41:15.000000000 -0500
@@ -2,13 +2,13 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) +=
 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
 
 ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
-TARGET := linux-ppc64le
+override flavour := linux-ppc64le
 else
-TARGET := linux-ppc64
+override flavour := linux-ppc64
 endif
 
 quiet_cmd_perl = PERL $@
-      cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
+      cmd_perl = $(PERL) $(<) $(flavour) > $(@)
 
 $(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
 	$(call cmd,perl)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/edac/ghes_edac.c linux-libre-4.9.208-gnu/drivers/edac/ghes_edac.c
--- linux-libre-4.9.207-gnu/drivers/edac/ghes_edac.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/edac/ghes_edac.c	2020-01-04 07:41:15.000000000 -0500
@@ -189,6 +189,7 @@ void ghes_edac_report_mem_error(struct g
 	/* Cleans the error report buffer */
 	memset(e, 0, sizeof (*e));
 	e->error_count = 1;
+	e->grain = 1;
 	strcpy(e->label, "unknown label");
 	e->msg = pvt->msg;
 	e->other_detail = pvt->other_detail;
@@ -284,7 +285,7 @@ void ghes_edac_report_mem_error(struct g
 
 	/* Error grain */
 	if (mem_err->validation_bits & CPER_MEM_VALID_PA_MASK)
-		e->grain = ~(mem_err->physical_addr_mask & ~PAGE_MASK);
+		e->grain = ~mem_err->physical_addr_mask + 1;
 
 	/* Memory error location, mapped on e->location */
 	p = e->location;
@@ -391,8 +392,13 @@ void ghes_edac_report_mem_error(struct g
 	if (p > pvt->other_detail)
 		*(p - 1) = '\0';
 
+	/* Sanity-check driver-supplied grain value. */
+	if (WARN_ON_ONCE(!e->grain))
+		e->grain = 1;
+
+	grain_bits = fls_long(e->grain - 1);
+
 	/* Generate the trace event */
-	grain_bits = fls_long(e->grain);
 	snprintf(pvt->detail_location, sizeof(pvt->detail_location),
 		 "APEI location: %s %s", e->location, e->other_detail);
 	trace_mc_event(type, e->msg, e->label, e->error_count,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/extcon/extcon-sm5502.c linux-libre-4.9.208-gnu/drivers/extcon/extcon-sm5502.c
--- linux-libre-4.9.207-gnu/drivers/extcon/extcon-sm5502.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/extcon/extcon-sm5502.c	2020-01-04 07:41:15.000000000 -0500
@@ -69,6 +69,10 @@ struct sm5502_muic_info {
 /* Default value of SM5502 register to bring up MUIC device. */
 static struct reg_data sm5502_reg_data[] = {
 	{
+		.reg = SM5502_REG_RESET,
+		.val = SM5502_REG_RESET_MASK,
+		.invert = true,
+	}, {
 		.reg = SM5502_REG_CONTROL,
 		.val = SM5502_REG_CONTROL_MASK_INT_MASK,
 		.invert = false,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/extcon/extcon-sm5502.h linux-libre-4.9.208-gnu/drivers/extcon/extcon-sm5502.h
--- linux-libre-4.9.207-gnu/drivers/extcon/extcon-sm5502.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/extcon/extcon-sm5502.h	2020-01-04 07:41:15.000000000 -0500
@@ -241,6 +241,8 @@ enum sm5502_reg {
 #define DM_DP_SWITCH_UART			((DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DP_SHIFT) \
 						| (DM_DP_CON_SWITCH_UART <<SM5502_REG_MANUAL_SW1_DM_SHIFT))
 
+#define SM5502_REG_RESET_MASK			(0x1)
+
 /* SM5502 Interrupts */
 enum sm5502_irq {
 	/* INT1 */
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/gpio/gpio-mpc8xxx.c linux-libre-4.9.208-gnu/drivers/gpio/gpio-mpc8xxx.c
--- linux-libre-4.9.207-gnu/drivers/gpio/gpio-mpc8xxx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/gpio/gpio-mpc8xxx.c	2020-01-04 07:41:15.000000000 -0500
@@ -337,7 +337,8 @@ static int mpc8xxx_probe(struct platform
 	 * It's assumed that only a single type of gpio controller is available
 	 * on the current machine, so overwriting global data is fine.
 	 */
-	mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type;
+	if (devtype->irq_set_type)
+		mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type;
 
 	if (devtype->gpio_dir_out)
 		gc->direction_output = devtype->gpio_dir_out;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/gpu/drm/bridge/analogix-anx78xx.c linux-libre-4.9.208-gnu/drivers/gpu/drm/bridge/analogix-anx78xx.c
--- linux-libre-4.9.207-gnu/drivers/gpu/drm/bridge/analogix-anx78xx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/gpu/drm/bridge/analogix-anx78xx.c	2020-01-04 07:41:15.000000000 -0500
@@ -725,7 +725,9 @@ static int anx78xx_init_pdata(struct anx
 	/* 1.0V digital core power regulator  */
 	pdata->dvdd10 = devm_regulator_get(dev, "dvdd10");
 	if (IS_ERR(pdata->dvdd10)) {
-		DRM_ERROR("DVDD10 regulator not found\n");
+		if (PTR_ERR(pdata->dvdd10) != -EPROBE_DEFER)
+			DRM_ERROR("DVDD10 regulator not found\n");
+
 		return PTR_ERR(pdata->dvdd10);
 	}
 
@@ -1344,7 +1346,9 @@ static int anx78xx_i2c_probe(struct i2c_
 
 	err = anx78xx_init_pdata(anx78xx);
 	if (err) {
-		DRM_ERROR("Failed to initialize pdata: %d\n", err);
+		if (err != -EPROBE_DEFER)
+			DRM_ERROR("Failed to initialize pdata: %d\n", err);
+
 		return err;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/gpu/drm/gma500/oaktrail_crtc.c linux-libre-4.9.208-gnu/drivers/gpu/drm/gma500/oaktrail_crtc.c
--- linux-libre-4.9.207-gnu/drivers/gpu/drm/gma500/oaktrail_crtc.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/gpu/drm/gma500/oaktrail_crtc.c	2020-01-04 07:41:15.000000000 -0500
@@ -139,6 +139,7 @@ static bool mrst_sdvo_find_best_pll(cons
 	s32 freq_error, min_error = 100000;
 
 	memset(best_clock, 0, sizeof(*best_clock));
+	memset(&clock, 0, sizeof(clock));
 
 	for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
 		for (clock.n = limit->n.min; clock.n <= limit->n.max;
@@ -195,6 +196,7 @@ static bool mrst_lvds_find_best_pll(cons
 	int err = target;
 
 	memset(best_clock, 0, sizeof(*best_clock));
+	memset(&clock, 0, sizeof(clock));
 
 	for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
 		for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/hid/hid-core.c linux-libre-4.9.208-gnu/drivers/hid/hid-core.c
--- linux-libre-4.9.207-gnu/drivers/hid/hid-core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/hid/hid-core.c	2020-01-04 07:41:15.000000000 -0500
@@ -761,6 +761,10 @@ static void hid_scan_feature_usage(struc
 	if (usage == 0xff0000c5 && parser->global.report_count == 256 &&
 	    parser->global.report_size == 8)
 		parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8;
+
+	if (usage == 0xff0000c6 && parser->global.report_count == 1 &&
+	    parser->global.report_size == 8)
+		parser->scan_flags |= HID_SCAN_FLAG_MT_WIN_8;
 }
 
 static void hid_scan_collection(struct hid_parser *parser, unsigned type)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/iio/adc/max1027.c linux-libre-4.9.208-gnu/drivers/iio/adc/max1027.c
--- linux-libre-4.9.207-gnu/drivers/iio/adc/max1027.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/iio/adc/max1027.c	2020-01-04 07:41:15.000000000 -0500
@@ -471,6 +471,14 @@ static int max1027_probe(struct spi_devi
 		goto fail_dev_register;
 	}
 
+	/* Internal reset */
+	st->reg = MAX1027_RST_REG;
+	ret = spi_write(st->spi, &st->reg, 1);
+	if (ret < 0) {
+		dev_err(&indio_dev->dev, "Failed to reset the ADC\n");
+		return ret;
+	}
+
 	/* Disable averaging */
 	st->reg = MAX1027_AVG_REG;
 	ret = spi_write(st->spi, &st->reg, 1);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/iio/light/bh1750.c linux-libre-4.9.208-gnu/drivers/iio/light/bh1750.c
--- linux-libre-4.9.207-gnu/drivers/iio/light/bh1750.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/iio/light/bh1750.c	2020-01-04 07:41:15.000000000 -0500
@@ -62,9 +62,9 @@ struct bh1750_chip_info {
 
 	u16 int_time_low_mask;
 	u16 int_time_high_mask;
-}
+};
 
-static const bh1750_chip_info_tbl[] = {
+static const struct bh1750_chip_info bh1750_chip_info_tbl[] = {
 	[BH1710] = { 140, 1022, 300, 400,  250000000, 2, 0x001F, 0x03E0 },
 	[BH1721] = { 140, 1020, 300, 400,  250000000, 2, 0x0010, 0x03E0 },
 	[BH1750] = { 31,  254,  69,  1740, 57500000,  1, 0x001F, 0x00E0 },
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/infiniband/ulp/iser/iscsi_iser.c linux-libre-4.9.208-gnu/drivers/infiniband/ulp/iser/iscsi_iser.c
--- linux-libre-4.9.207-gnu/drivers/infiniband/ulp/iser/iscsi_iser.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/infiniband/ulp/iser/iscsi_iser.c	2020-01-04 07:41:15.000000000 -0500
@@ -649,6 +649,7 @@ iscsi_iser_session_create(struct iscsi_e
 		if (ib_conn->pi_support) {
 			u32 sig_caps = ib_conn->device->ib_device->attrs.sig_prot_cap;
 
+			shost->sg_prot_tablesize = shost->sg_tablesize;
 			scsi_host_set_prot(shost, iser_dif_prot_caps(sig_caps));
 			scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP |
 						   SHOST_DIX_GUARD_CRC);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/input/touchscreen/atmel_mxt_ts.c linux-libre-4.9.208-gnu/drivers/input/touchscreen/atmel_mxt_ts.c
--- linux-libre-4.9.207-gnu/drivers/input/touchscreen/atmel_mxt_ts.c	2019-12-22 01:24:36.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/input/touchscreen/atmel_mxt_ts.c	2020-01-04 11:58:14.000000000 -0500
@@ -3205,6 +3205,8 @@ static int __maybe_unused mxt_suspend(st
 
 	mutex_unlock(&input_dev->mutex);
 
+	disable_irq(data->irq);
+
 	return 0;
 }
 
@@ -3217,6 +3219,8 @@ static int __maybe_unused mxt_resume(str
 	if (!input_dev)
 		return 0;
 
+	enable_irq(data->irq);
+
 	mutex_lock(&input_dev->mutex);
 
 	if (input_dev->users)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/iommu/tegra-smmu.c linux-libre-4.9.208-gnu/drivers/iommu/tegra-smmu.c
--- linux-libre-4.9.207-gnu/drivers/iommu/tegra-smmu.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/iommu/tegra-smmu.c	2020-01-04 07:41:15.000000000 -0500
@@ -153,9 +153,9 @@ static bool smmu_dma_addr_valid(struct t
 	return (addr & smmu->pfn_mask) == addr;
 }
 
-static dma_addr_t smmu_pde_to_dma(u32 pde)
+static dma_addr_t smmu_pde_to_dma(struct tegra_smmu *smmu, u32 pde)
 {
-	return pde << 12;
+	return (dma_addr_t)(pde & smmu->pfn_mask) << 12;
 }
 
 static void smmu_flush_ptc_all(struct tegra_smmu *smmu)
@@ -540,6 +540,7 @@ static u32 *tegra_smmu_pte_lookup(struct
 				  dma_addr_t *dmap)
 {
 	unsigned int pd_index = iova_pd_index(iova);
+	struct tegra_smmu *smmu = as->smmu;
 	struct page *pt_page;
 	u32 *pd;
 
@@ -548,7 +549,7 @@ static u32 *tegra_smmu_pte_lookup(struct
 		return NULL;
 
 	pd = page_address(as->pd);
-	*dmap = smmu_pde_to_dma(pd[pd_index]);
+	*dmap = smmu_pde_to_dma(smmu, pd[pd_index]);
 
 	return tegra_smmu_pte_offset(pt_page, iova);
 }
@@ -590,7 +591,7 @@ static u32 *as_get_pte(struct tegra_smmu
 	} else {
 		u32 *pd = page_address(as->pd);
 
-		*dmap = smmu_pde_to_dma(pd[pde]);
+		*dmap = smmu_pde_to_dma(smmu, pd[pde]);
 	}
 
 	return tegra_smmu_pte_offset(as->pts[pde], iova);
@@ -615,7 +616,7 @@ static void tegra_smmu_pte_put_use(struc
 	if (--as->count[pde] == 0) {
 		struct tegra_smmu *smmu = as->smmu;
 		u32 *pd = page_address(as->pd);
-		dma_addr_t pte_dma = smmu_pde_to_dma(pd[pde]);
+		dma_addr_t pte_dma = smmu_pde_to_dma(smmu, pd[pde]);
 
 		tegra_smmu_set_pde(as, iova, 0);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/irqchip/irq-bcm7038-l1.c linux-libre-4.9.208-gnu/drivers/irqchip/irq-bcm7038-l1.c
--- linux-libre-4.9.207-gnu/drivers/irqchip/irq-bcm7038-l1.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/irqchip/irq-bcm7038-l1.c	2020-01-04 07:41:15.000000000 -0500
@@ -282,6 +282,10 @@ static int __init bcm7038_l1_init_one(st
 		pr_err("failed to map parent interrupt %d\n", parent_irq);
 		return -EINVAL;
 	}
+
+	if (of_property_read_bool(dn, "brcm,irq-can-wake"))
+		enable_irq_wake(parent_irq);
+
 	irq_set_chained_handler_and_data(parent_irq, bcm7038_l1_irq_handle,
 					 intc);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/irqchip/irq-ingenic.c linux-libre-4.9.208-gnu/drivers/irqchip/irq-ingenic.c
--- linux-libre-4.9.207-gnu/drivers/irqchip/irq-ingenic.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/irqchip/irq-ingenic.c	2020-01-04 07:41:15.000000000 -0500
@@ -117,6 +117,14 @@ static int __init ingenic_intc_of_init(s
 		goto out_unmap_irq;
 	}
 
+	domain = irq_domain_add_legacy(node, num_chips * 32,
+				       JZ4740_IRQ_BASE, 0,
+				       &irq_domain_simple_ops, NULL);
+	if (!domain) {
+		err = -ENOMEM;
+		goto out_unmap_base;
+	}
+
 	for (i = 0; i < num_chips; i++) {
 		/* Mask all irqs */
 		writel(0xffffffff, intc->base + (i * CHIP_SIZE) +
@@ -143,14 +151,11 @@ static int __init ingenic_intc_of_init(s
 				       IRQ_NOPROBE | IRQ_LEVEL);
 	}
 
-	domain = irq_domain_add_legacy(node, num_chips * 32, JZ4740_IRQ_BASE, 0,
-				       &irq_domain_simple_ops, NULL);
-	if (!domain)
-		pr_warn("unable to register IRQ domain\n");
-
 	setup_irq(parent_irq, &intc_cascade_action);
 	return 0;
 
+out_unmap_base:
+	iounmap(intc->base);
 out_unmap_irq:
 	irq_dispose_mapping(parent_irq);
 out_free:
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/md/bcache/btree.c linux-libre-4.9.208-gnu/drivers/md/bcache/btree.c
--- linux-libre-4.9.207-gnu/drivers/md/bcache/btree.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/md/bcache/btree.c	2020-01-04 07:41:15.000000000 -0500
@@ -681,6 +681,8 @@ static unsigned long bch_mca_scan(struct
 	 * IO can always make forward progress:
 	 */
 	nr /= c->btree_pages;
+	if (nr == 0)
+		nr = 1;
 	nr = min_t(unsigned long, nr, mca_can_free(c));
 
 	i = 0;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/i2c/ov2659.c linux-libre-4.9.208-gnu/drivers/media/i2c/ov2659.c
--- linux-libre-4.9.207-gnu/drivers/media/i2c/ov2659.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/i2c/ov2659.c	2020-01-04 07:41:15.000000000 -0500
@@ -419,10 +419,14 @@ static struct sensor_register ov2659_720
 	{ REG_TIMING_YINC, 0x11 },
 	{ REG_TIMING_VERT_FORMAT, 0x80 },
 	{ REG_TIMING_HORIZ_FORMAT, 0x00 },
+	{ 0x370a, 0x12 },
 	{ 0x3a03, 0xe8 },
 	{ 0x3a09, 0x6f },
 	{ 0x3a0b, 0x5d },
 	{ 0x3a15, 0x9a },
+	{ REG_VFIFO_READ_START_H, 0x00 },
+	{ REG_VFIFO_READ_START_L, 0x80 },
+	{ REG_ISP_CTRL02, 0x00 },
 	{ REG_NULL, 0x00 },
 };
 
@@ -1204,11 +1208,15 @@ static int ov2659_s_stream(struct v4l2_s
 		goto unlock;
 	}
 
-	ov2659_set_pixel_clock(ov2659);
-	ov2659_set_frame_size(ov2659);
-	ov2659_set_format(ov2659);
-	ov2659_set_streaming(ov2659, 1);
-	ov2659->streaming = on;
+	ret = ov2659_set_pixel_clock(ov2659);
+	if (!ret)
+		ret = ov2659_set_frame_size(ov2659);
+	if (!ret)
+		ret = ov2659_set_format(ov2659);
+	if (!ret) {
+		ov2659_set_streaming(ov2659, 1);
+		ov2659->streaming = on;
+	}
 
 unlock:
 	mutex_unlock(&ov2659->lock);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/i2c/soc_camera/ov6650.c linux-libre-4.9.208-gnu/drivers/media/i2c/soc_camera/ov6650.c
--- linux-libre-4.9.207-gnu/drivers/media/i2c/soc_camera/ov6650.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/i2c/soc_camera/ov6650.c	2020-01-04 07:41:15.000000000 -0500
@@ -612,7 +612,6 @@ static int ov6650_s_fmt(struct v4l2_subd
 		dev_err(&client->dev, "Pixel format not handled: 0x%x\n", code);
 		return -EINVAL;
 	}
-	priv->code = code;
 
 	if (code == MEDIA_BUS_FMT_Y8_1X8 ||
 			code == MEDIA_BUS_FMT_SBGGR8_1X8) {
@@ -638,7 +637,6 @@ static int ov6650_s_fmt(struct v4l2_subd
 		dev_dbg(&client->dev, "max resolution: CIF\n");
 		coma_mask |= COMA_QCIF;
 	}
-	priv->half_scale = half_scale;
 
 	if (sense) {
 		if (sense->master_clock == 8000000) {
@@ -678,8 +676,13 @@ static int ov6650_s_fmt(struct v4l2_subd
 		ret = ov6650_reg_rmw(client, REG_COMA, coma_set, coma_mask);
 	if (!ret)
 		ret = ov6650_reg_write(client, REG_CLKRC, clkrc);
-	if (!ret)
+	if (!ret) {
+		priv->half_scale = half_scale;
+
 		ret = ov6650_reg_rmw(client, REG_COML, coml_set, coml_mask);
+	}
+	if (!ret)
+		priv->code = code;
 
 	if (!ret) {
 		mf->colorspace	= priv->colorspace;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/platform/am437x/am437x-vpfe.c linux-libre-4.9.208-gnu/drivers/media/platform/am437x/am437x-vpfe.c
--- linux-libre-4.9.207-gnu/drivers/media/platform/am437x/am437x-vpfe.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/platform/am437x/am437x-vpfe.c	2020-01-04 07:41:15.000000000 -0500
@@ -1847,6 +1847,10 @@ static int vpfe_s_std(struct file *file,
 	if (!(sdinfo->inputs[0].capabilities & V4L2_IN_CAP_STD))
 		return -ENODATA;
 
+	/* if trying to set the same std then nothing to do */
+	if (vpfe_standards[vpfe->std_index].std_id == std_id)
+		return 0;
+
 	/* If streaming is started, return error */
 	if (vb2_is_busy(&vpfe->buffer_queue)) {
 		vpfe_err(vpfe, "%s device busy\n", __func__);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/platform/ti-vpe/vpe.c linux-libre-4.9.208-gnu/drivers/media/platform/ti-vpe/vpe.c
--- linux-libre-4.9.207-gnu/drivers/media/platform/ti-vpe/vpe.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/platform/ti-vpe/vpe.c	2020-01-04 07:41:15.000000000 -0500
@@ -330,20 +330,25 @@ enum {
 };
 
 /* find our format description corresponding to the passed v4l2_format */
-static struct vpe_fmt *find_format(struct v4l2_format *f)
+static struct vpe_fmt *__find_format(u32 fourcc)
 {
 	struct vpe_fmt *fmt;
 	unsigned int k;
 
 	for (k = 0; k < ARRAY_SIZE(vpe_formats); k++) {
 		fmt = &vpe_formats[k];
-		if (fmt->fourcc == f->fmt.pix.pixelformat)
+		if (fmt->fourcc == fourcc)
 			return fmt;
 	}
 
 	return NULL;
 }
 
+static struct vpe_fmt *find_format(struct v4l2_format *f)
+{
+	return __find_format(f->fmt.pix.pixelformat);
+}
+
 /*
  * there is one vpe_dev structure in the driver, it is shared by
  * all instances.
@@ -1293,6 +1298,7 @@ static irqreturn_t vpe_irq(int irq_vpe,
 		d_vb->timecode = s_vb->timecode;
 
 	d_vb->sequence = ctx->sequence;
+	s_vb->sequence = ctx->sequence;
 
 	d_q_data = &ctx->q_data[Q_DATA_DST];
 	if (d_q_data->flags & Q_DATA_INTERLACED) {
@@ -1433,9 +1439,9 @@ static int __vpe_try_fmt(struct vpe_ctx
 	int i, depth, depth_bytes;
 
 	if (!fmt || !(fmt->types & type)) {
-		vpe_err(ctx->dev, "Fourcc format (0x%08x) invalid.\n",
+		vpe_dbg(ctx->dev, "Fourcc format (0x%08x) invalid.\n",
 			pix->pixelformat);
-		return -EINVAL;
+		fmt = __find_format(V4L2_PIX_FMT_YUYV);
 	}
 
 	if (pix->field != V4L2_FIELD_NONE && pix->field != V4L2_FIELD_ALTERNATE)
@@ -1992,7 +1998,7 @@ static int vpe_open(struct file *file)
 	v4l2_ctrl_handler_setup(hdl);
 
 	s_q_data = &ctx->q_data[Q_DATA_SRC];
-	s_q_data->fmt = &vpe_formats[2];
+	s_q_data->fmt = __find_format(V4L2_PIX_FMT_YUYV);
 	s_q_data->width = 1920;
 	s_q_data->height = 1080;
 	s_q_data->bytesperline[VPE_LUMA] = (s_q_data->width *
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/radio/si470x/radio-si470x-i2c.c linux-libre-4.9.208-gnu/drivers/media/radio/si470x/radio-si470x-i2c.c
--- linux-libre-4.9.207-gnu/drivers/media/radio/si470x/radio-si470x-i2c.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/radio/si470x/radio-si470x-i2c.c	2020-01-04 07:41:15.000000000 -0500
@@ -460,6 +460,8 @@ static int si470x_i2c_remove(struct i2c_
 	video_unregister_device(&radio->videodev);
 	kfree(radio);
 
+	v4l2_ctrl_handler_free(&radio->hdl);
+	v4l2_device_unregister(&radio->v4l2_dev);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/usb/b2c2/flexcop-usb.c linux-libre-4.9.208-gnu/drivers/media/usb/b2c2/flexcop-usb.c
--- linux-libre-4.9.207-gnu/drivers/media/usb/b2c2/flexcop-usb.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/usb/b2c2/flexcop-usb.c	2020-01-04 07:41:15.000000000 -0500
@@ -504,7 +504,13 @@ urb_error:
 static int flexcop_usb_init(struct flexcop_usb *fc_usb)
 {
 	/* use the alternate setting with the larges buffer */
-	usb_set_interface(fc_usb->udev,0,1);
+	int ret = usb_set_interface(fc_usb->udev, 0, 1);
+
+	if (ret) {
+		err("set interface failed.");
+		return ret;
+	}
+
 	switch (fc_usb->udev->speed) {
 	case USB_SPEED_LOW:
 		err("cannot handle USB speed because it is too slow.");
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c linux-libre-4.9.208-gnu/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
--- linux-libre-4.9.207-gnu/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c	2020-01-04 07:41:15.000000000 -0500
@@ -919,8 +919,12 @@ static void pvr2_v4l2_internal_check(str
 	pvr2_v4l2_dev_disassociate_parent(vp->dev_video);
 	pvr2_v4l2_dev_disassociate_parent(vp->dev_radio);
 	if (!list_empty(&vp->dev_video->devbase.fh_list) ||
-	    !list_empty(&vp->dev_radio->devbase.fh_list))
+	    (vp->dev_radio &&
+	     !list_empty(&vp->dev_radio->devbase.fh_list))) {
+		pvr2_trace(PVR2_TRACE_STRUCT,
+			   "pvr2_v4l2 internal_check exit-empty id=%p", vp);
 		return;
+	}
 	pvr2_v4l2_destroy_no_lock(vp);
 }
 
@@ -994,7 +998,8 @@ static int pvr2_v4l2_release(struct file
 	kfree(fhp);
 	if (vp->channel.mc_head->disconnect_flag &&
 	    list_empty(&vp->dev_video->devbase.fh_list) &&
-	    list_empty(&vp->dev_radio->devbase.fh_list)) {
+	    (!vp->dev_radio ||
+	     list_empty(&vp->dev_radio->devbase.fh_list))) {
 		pvr2_v4l2_destroy_no_lock(vp);
 	}
 	return 0;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/mmc/host/sdhci.c linux-libre-4.9.208-gnu/drivers/mmc/host/sdhci.c
--- linux-libre-4.9.207-gnu/drivers/mmc/host/sdhci.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/mmc/host/sdhci.c	2020-01-04 07:41:15.000000000 -0500
@@ -1557,9 +1557,7 @@ void sdhci_set_uhs_signaling(struct sdhc
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
 	else if (timing == MMC_TIMING_UHS_SDR12)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
-	else if (timing == MMC_TIMING_SD_HS ||
-		 timing == MMC_TIMING_MMC_HS ||
-		 timing == MMC_TIMING_UHS_SDR25)
+	else if (timing == MMC_TIMING_UHS_SDR25)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
 	else if (timing == MMC_TIMING_UHS_SDR50)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
@@ -2100,7 +2098,7 @@ static int sdhci_execute_tuning(struct m
 		spin_lock_irqsave(&host->lock, flags);
 
 		if (!host->tuning_done) {
-			pr_info(DRIVER_NAME ": Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock\n");
+			pr_debug(DRIVER_NAME ": Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock\n");
 			ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 			ctrl &= ~SDHCI_CTRL_TUNED_CLK;
 			ctrl &= ~SDHCI_CTRL_EXEC_TUNING;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/mmc/host/sdhci-of-esdhc.c linux-libre-4.9.208-gnu/drivers/mmc/host/sdhci-of-esdhc.c
--- linux-libre-4.9.207-gnu/drivers/mmc/host/sdhci-of-esdhc.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/mmc/host/sdhci-of-esdhc.c	2020-01-04 07:41:15.000000000 -0500
@@ -637,8 +637,8 @@ static int sdhci_esdhc_probe(struct plat
 		host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ;
 
 	if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) {
-		host->quirks2 |= SDHCI_QUIRK_RESET_AFTER_REQUEST;
-		host->quirks2 |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+		host->quirks |= SDHCI_QUIRK_RESET_AFTER_REQUEST;
+		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 	}
 
 	if (of_device_is_compatible(np, "fsl,p5040-esdhc") ||
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/mmc/host/tmio_mmc_pio.c linux-libre-4.9.208-gnu/drivers/mmc/host/tmio_mmc_pio.c
--- linux-libre-4.9.207-gnu/drivers/mmc/host/tmio_mmc_pio.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/mmc/host/tmio_mmc_pio.c	2020-01-04 07:41:15.000000000 -0500
@@ -1076,7 +1076,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_
 	tmio_mmc_ops.start_signal_voltage_switch = _host->start_signal_voltage_switch;
 	mmc->ops = &tmio_mmc_ops;
 
-	mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
+	mmc->caps |= MMC_CAP_ERASE | MMC_CAP_4_BIT_DATA | pdata->capabilities;
 	mmc->caps2 |= pdata->capabilities2;
 	mmc->max_segs = 32;
 	mmc->max_blk_size = 512;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c linux-libre-4.9.208-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c
--- linux-libre-4.9.207-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c	2020-01-04 07:41:15.000000000 -0500
@@ -1105,8 +1105,8 @@ static int ena_io_poll(struct napi_struc
 	struct ena_ring *tx_ring, *rx_ring;
 	struct ena_eth_io_intr_reg intr_reg;
 
-	u32 tx_work_done;
-	u32 rx_work_done;
+	int tx_work_done;
+	int rx_work_done = 0;
 	int tx_budget;
 	int napi_comp_call = 0;
 	int ret;
@@ -1122,7 +1122,11 @@ static int ena_io_poll(struct napi_struc
 	}
 
 	tx_work_done = ena_clean_tx_irq(tx_ring, tx_budget);
-	rx_work_done = ena_clean_rx_irq(rx_ring, napi, budget);
+	/* On netpoll the budget is zero and the handler should only clean the
+	 * tx completions.
+	 */
+	if (likely(budget))
+		rx_work_done = ena_clean_rx_irq(rx_ring, napi, budget);
 
 	if ((budget > rx_work_done) && (tx_budget > tx_work_done)) {
 		napi_complete_done(napi, rx_work_done);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c linux-libre-4.9.208-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
--- linux-libre-4.9.207-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c	2020-01-04 07:41:15.000000000 -0500
@@ -2376,15 +2376,21 @@ static int bnx2x_set_pf_tx_switching(str
 	/* send the ramrod on all the queues of the PF */
 	for_each_eth_queue(bp, i) {
 		struct bnx2x_fastpath *fp = &bp->fp[i];
+		int tx_idx;
 
 		/* Set the appropriate Queue object */
 		q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj;
 
-		/* Update the Queue state */
-		rc = bnx2x_queue_state_change(bp, &q_params);
-		if (rc) {
-			BNX2X_ERR("Failed to configure Tx switching\n");
-			return rc;
+		for (tx_idx = FIRST_TX_COS_INDEX;
+		     tx_idx < fp->max_cos; tx_idx++) {
+			q_params.params.update.cid_index = tx_idx;
+
+			/* Update the Queue state */
+			rc = bnx2x_queue_state_change(bp, &q_params);
+			if (rc) {
+				BNX2X_ERR("Failed to configure Tx switching\n");
+				return rc;
+			}
 		}
 	}
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/ethernet/hisilicon/hip04_eth.c linux-libre-4.9.208-gnu/drivers/net/ethernet/hisilicon/hip04_eth.c
--- linux-libre-4.9.207-gnu/drivers/net/ethernet/hisilicon/hip04_eth.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/ethernet/hisilicon/hip04_eth.c	2020-01-04 07:41:15.000000000 -0500
@@ -455,9 +455,9 @@ static int hip04_mac_start_xmit(struct s
 	skb_tx_timestamp(skb);
 
 	hip04_set_xmit_desc(priv, phys);
-	priv->tx_head = TX_NEXT(tx_head);
 	count++;
 	netdev_sent_queue(ndev, skb->len);
+	priv->tx_head = TX_NEXT(tx_head);
 
 	stats->tx_bytes += skb->len;
 	stats->tx_packets++;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/ethernet/qlogic/qla3xxx.c linux-libre-4.9.208-gnu/drivers/net/ethernet/qlogic/qla3xxx.c
--- linux-libre-4.9.207-gnu/drivers/net/ethernet/qlogic/qla3xxx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/ethernet/qlogic/qla3xxx.c	2020-01-04 07:41:15.000000000 -0500
@@ -2752,6 +2752,9 @@ static int ql_alloc_large_buffers(struct
 	int err;
 
 	for (i = 0; i < qdev->num_large_buffers; i++) {
+		lrg_buf_cb = &qdev->lrg_buf[i];
+		memset(lrg_buf_cb, 0, sizeof(struct ql_rcv_buf_cb));
+
 		skb = netdev_alloc_skb(qdev->ndev,
 				       qdev->lrg_buffer_len);
 		if (unlikely(!skb)) {
@@ -2762,11 +2765,7 @@ static int ql_alloc_large_buffers(struct
 			ql_free_large_buffers(qdev);
 			return -ENOMEM;
 		} else {
-
-			lrg_buf_cb = &qdev->lrg_buf[i];
-			memset(lrg_buf_cb, 0, sizeof(struct ql_rcv_buf_cb));
 			lrg_buf_cb->index = i;
-			lrg_buf_cb->skb = skb;
 			/*
 			 * We save some space to copy the ethhdr from first
 			 * buffer
@@ -2788,6 +2787,7 @@ static int ql_alloc_large_buffers(struct
 				return -ENOMEM;
 			}
 
+			lrg_buf_cb->skb = skb;
 			dma_unmap_addr_set(lrg_buf_cb, mapaddr, map);
 			dma_unmap_len_set(lrg_buf_cb, maplen,
 					  qdev->lrg_buffer_len -
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/fjes/fjes_main.c linux-libre-4.9.208-gnu/drivers/net/fjes/fjes_main.c
--- linux-libre-4.9.207-gnu/drivers/net/fjes/fjes_main.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/fjes/fjes_main.c	2020-01-04 07:41:15.000000000 -0500
@@ -148,6 +148,9 @@ static int fjes_acpi_add(struct acpi_dev
 	/* create platform_device */
 	plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource,
 						   ARRAY_SIZE(fjes_resource));
+	if (IS_ERR(plat_dev))
+		return PTR_ERR(plat_dev);
+
 	device->driver_data = plat_dev;
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/gtp.c linux-libre-4.9.208-gnu/drivers/net/gtp.c
--- linux-libre-4.9.207-gnu/drivers/net/gtp.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/gtp.c	2020-01-04 07:41:15.000000000 -0500
@@ -42,7 +42,6 @@ struct pdp_ctx {
 	struct hlist_node	hlist_addr;
 
 	union {
-		u64		tid;
 		struct {
 			u64	tid;
 			u16	flow;
@@ -678,10 +677,13 @@ static int gtp_newlink(struct net *src_n
 	if (err < 0)
 		goto out_err;
 
-	if (!data[IFLA_GTP_PDP_HASHSIZE])
+	if (!data[IFLA_GTP_PDP_HASHSIZE]) {
 		hashsize = 1024;
-	else
+	} else {
 		hashsize = nla_get_u32(data[IFLA_GTP_PDP_HASHSIZE]);
+		if (!hashsize)
+			hashsize = 1024;
+	}
 
 	err = gtp_hashtable_new(gtp, hashsize);
 	if (err < 0)
@@ -1221,43 +1223,46 @@ static int gtp_genl_dump_pdp(struct sk_b
 				struct netlink_callback *cb)
 {
 	struct gtp_dev *last_gtp = (struct gtp_dev *)cb->args[2], *gtp;
+	int i, j, bucket = cb->args[0], skip = cb->args[1];
 	struct net *net = sock_net(skb->sk);
-	struct gtp_net *gn = net_generic(net, gtp_net_id);
-	unsigned long tid = cb->args[1];
-	int i, k = cb->args[0], ret;
 	struct pdp_ctx *pctx;
+	struct gtp_net *gn;
+
+	gn = net_generic(net, gtp_net_id);
 
 	if (cb->args[4])
 		return 0;
 
+	rcu_read_lock();
 	list_for_each_entry_rcu(gtp, &gn->gtp_dev_list, list) {
 		if (last_gtp && last_gtp != gtp)
 			continue;
 		else
 			last_gtp = NULL;
 
-		for (i = k; i < gtp->hash_size; i++) {
-			hlist_for_each_entry_rcu(pctx, &gtp->tid_hash[i], hlist_tid) {
-				if (tid && tid != pctx->u.tid)
-					continue;
-				else
-					tid = 0;
-
-				ret = gtp_genl_fill_info(skb,
-							 NETLINK_CB(cb->skb).portid,
-							 cb->nlh->nlmsg_seq,
-							 cb->nlh->nlmsg_type, pctx);
-				if (ret < 0) {
+		for (i = bucket; i < gtp->hash_size; i++) {
+			j = 0;
+			hlist_for_each_entry_rcu(pctx, &gtp->tid_hash[i],
+						 hlist_tid) {
+				if (j >= skip &&
+				    gtp_genl_fill_info(skb,
+					    NETLINK_CB(cb->skb).portid,
+					    cb->nlh->nlmsg_seq,
+					    cb->nlh->nlmsg_type, pctx)) {
 					cb->args[0] = i;
-					cb->args[1] = pctx->u.tid;
+					cb->args[1] = j;
 					cb->args[2] = (unsigned long)gtp;
 					goto out;
 				}
+				j++;
 			}
+			skip = 0;
 		}
+		bucket = 0;
 	}
 	cb->args[4] = 1;
 out:
+	rcu_read_unlock();
 	return skb->len;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/hamradio/6pack.c linux-libre-4.9.208-gnu/drivers/net/hamradio/6pack.c
--- linux-libre-4.9.207-gnu/drivers/net/hamradio/6pack.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/hamradio/6pack.c	2020-01-04 07:41:15.000000000 -0500
@@ -665,10 +665,10 @@ static void sixpack_close(struct tty_str
 {
 	struct sixpack *sp;
 
-	write_lock_bh(&disc_data_lock);
+	write_lock_irq(&disc_data_lock);
 	sp = tty->disc_data;
 	tty->disc_data = NULL;
-	write_unlock_bh(&disc_data_lock);
+	write_unlock_irq(&disc_data_lock);
 	if (!sp)
 		return;
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/hamradio/mkiss.c linux-libre-4.9.208-gnu/drivers/net/hamradio/mkiss.c
--- linux-libre-4.9.207-gnu/drivers/net/hamradio/mkiss.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/hamradio/mkiss.c	2020-01-04 07:41:15.000000000 -0500
@@ -783,10 +783,10 @@ static void mkiss_close(struct tty_struc
 {
 	struct mkiss *ax;
 
-	write_lock_bh(&disc_data_lock);
+	write_lock_irq(&disc_data_lock);
 	ax = tty->disc_data;
 	tty->disc_data = NULL;
-	write_unlock_bh(&disc_data_lock);
+	write_unlock_irq(&disc_data_lock);
 
 	if (!ax)
 		return;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/phy/phy_device.c linux-libre-4.9.208-gnu/drivers/net/phy/phy_device.c
--- linux-libre-4.9.207-gnu/drivers/net/phy/phy_device.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/phy/phy_device.c	2020-01-04 07:41:15.000000000 -0500
@@ -324,8 +324,8 @@ struct phy_device *phy_device_create(str
 	mdiodev->device_free = phy_mdio_device_free;
 	mdiodev->device_remove = phy_mdio_device_remove;
 
-	dev->speed = 0;
-	dev->duplex = -1;
+	dev->speed = SPEED_UNKNOWN;
+	dev->duplex = DUPLEX_UNKNOWN;
 	dev->pause = 0;
 	dev->asym_pause = 0;
 	dev->link = 1;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/usb/lan78xx.c linux-libre-4.9.208-gnu/drivers/net/usb/lan78xx.c
--- linux-libre-4.9.207-gnu/drivers/net/usb/lan78xx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/usb/lan78xx.c	2020-01-04 07:41:15.000000000 -0500
@@ -1763,6 +1763,7 @@ static int lan78xx_mdio_init(struct lan7
 	dev->mdiobus->read = lan78xx_mdiobus_read;
 	dev->mdiobus->write = lan78xx_mdiobus_write;
 	dev->mdiobus->name = "lan78xx-mdiobus";
+	dev->mdiobus->parent = &dev->udev->dev;
 
 	snprintf(dev->mdiobus->id, MII_BUS_ID_SIZE, "usb-%03d:%03d",
 		 dev->udev->bus->busnum, dev->udev->devnum);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/ath/ath10k/txrx.c linux-libre-4.9.208-gnu/drivers/net/wireless/ath/ath10k/txrx.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/ath/ath10k/txrx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/ath/ath10k/txrx.c	2020-01-04 07:41:15.000000000 -0500
@@ -99,6 +99,8 @@ int ath10k_txrx_tx_unref(struct ath10k_h
 
 	info = IEEE80211_SKB_CB(msdu);
 	memset(&info->status, 0, sizeof(info->status));
+	info->status.rates[0].idx = -1;
+
 	trace_ath10k_txrx_tx_unref(ar, tx_done->msdu_id);
 
 	if (tx_done->status == HTT_TX_COMPL_STATE_DISCARD) {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/dvm/led.c linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/dvm/led.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/dvm/led.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/dvm/led.c	2020-01-04 07:41:15.000000000 -0500
@@ -185,6 +185,9 @@ void iwl_leds_init(struct iwl_priv *priv
 
 	priv->led.name = kasprintf(GFP_KERNEL, "%s-led",
 				   wiphy_name(priv->hw->wiphy));
+	if (!priv->led.name)
+		return;
+
 	priv->led.brightness_set = iwl_led_brightness_set;
 	priv->led.blink_set = iwl_led_blink_set;
 	priv->led.max_brightness = 1;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/mvm/led.c linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/mvm/led.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/mvm/led.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/mvm/led.c	2020-01-04 07:41:15.000000000 -0500
@@ -109,6 +109,9 @@ int iwl_mvm_leds_init(struct iwl_mvm *mv
 
 	mvm->led.name = kasprintf(GFP_KERNEL, "%s-led",
 				   wiphy_name(mvm->hw->wiphy));
+	if (!mvm->led.name)
+		return -ENOMEM;
+
 	mvm->led.brightness_set = iwl_led_brightness_set;
 	mvm->led.max_brightness = 1;
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rx.c linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rx.c	2020-01-04 07:41:15.000000000 -0500
@@ -62,6 +62,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
+#include <asm/unaligned.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include "iwl-trans.h"
@@ -289,7 +290,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *
 	rx_res = (struct iwl_rx_mpdu_res_start *)pkt->data;
 	hdr = (struct ieee80211_hdr *)(pkt->data + sizeof(*rx_res));
 	len = le16_to_cpu(rx_res->byte_count);
-	rx_pkt_status = le32_to_cpup((__le32 *)
+	rx_pkt_status = get_unaligned_le32((__le32 *)
 		(pkt->data + sizeof(*rx_res) + len));
 
 	/* Dont use dev_alloc_skb(), we'll have enough headroom once
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/marvell/libertas/if_sdio.c linux-libre-4.9.208-gnu/drivers/net/wireless/marvell/libertas/if_sdio.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/marvell/libertas/if_sdio.c	2019-12-22 01:19:31.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/marvell/libertas/if_sdio.c	2020-01-04 11:51:54.000000000 -0500
@@ -1216,6 +1216,10 @@ static int if_sdio_probe(struct sdio_fun
 
 	spin_lock_init(&card->lock);
 	card->workqueue = alloc_workqueue("libertas_sdio", WQ_MEM_RECLAIM, 0);
+	if (unlikely(!card->workqueue)) {
+		ret = -ENOMEM;
+		goto err_queue;
+	}
 	INIT_WORK(&card->packet_worker, if_sdio_host_to_card_worker);
 	init_waitqueue_head(&card->pwron_waitq);
 
@@ -1269,6 +1273,7 @@ err_activate_card:
 	lbs_remove_card(priv);
 free:
 	destroy_workqueue(card->workqueue);
+err_queue:
 	while (card->packets) {
 		packet = card->packets;
 		card->packets = card->packets->next;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/marvell/mwifiex/pcie.c linux-libre-4.9.208-gnu/drivers/net/wireless/marvell/mwifiex/pcie.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/marvell/mwifiex/pcie.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/marvell/mwifiex/pcie.c	2020-01-04 07:41:15.000000000 -0500
@@ -632,8 +632,11 @@ static int mwifiex_pcie_init_evt_ring(st
 		skb_put(skb, MAX_EVENT_SIZE);
 
 		if (mwifiex_map_pci_memory(adapter, skb, MAX_EVENT_SIZE,
-					   PCI_DMA_FROMDEVICE))
+					   PCI_DMA_FROMDEVICE)) {
+			kfree_skb(skb);
+			kfree(card->evtbd_ring_vbase);
 			return -1;
+		}
 
 		buf_pa = MWIFIEX_SKB_DMA_ADDR(skb);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c	2019-12-22 01:21:55.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c	2020-01-04 11:55:27.000000000 -0500
@@ -1673,6 +1673,7 @@ struct rtl8xxxu_fileops rtl8723bu_fops =
 	.has_s0s1 = 1,
 	.has_tx_report = 1,
 	.gen2_thermal_meter = 1,
+	.needs_full_init = 1,
 	.adda_1t_init = 0x01c00014,
 	.adda_1t_path_on = 0x01c00014,
 	.adda_2t_path_on_a = 0x01c00014,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c	2019-12-22 01:21:45.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c	2020-01-04 11:55:10.000000000 -0500
@@ -3897,6 +3897,9 @@ static int rtl8xxxu_init_device(struct i
 	else
 		macpower = true;
 
+	if (fops->needs_full_init)
+		macpower = false;
+
 	ret = fops->power_on(priv);
 	if (ret < 0) {
 		dev_warn(dev, "%s: Failed power on\n", __func__);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
--- linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h	2020-01-04 07:41:15.000000000 -0500
@@ -1348,6 +1348,7 @@ struct rtl8xxxu_fileops {
 	u8 has_s0s1:1;
 	u8 has_tx_report:1;
 	u8 gen2_thermal_meter:1;
+	u8 needs_full_init:1;
 	u32 adda_1t_init;
 	u32 adda_1t_path_on;
 	u32 adda_2t_path_on_a;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c	2020-01-04 07:41:15.000000000 -0500
@@ -1576,6 +1576,8 @@ static bool usb_cmd_send_packet(struct i
    * This is maybe necessary:
    * rtlpriv->cfg->ops->fill_tx_cmddesc(hw, buffer, 1, 1, skb);
    */
+	dev_kfree_skb(skb);
+
 	return true;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtlwifi/usb.c linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtlwifi/usb.c
--- linux-libre-4.9.207-gnu/drivers/net/wireless/realtek/rtlwifi/usb.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/net/wireless/realtek/rtlwifi/usb.c	2020-01-04 07:41:15.000000000 -0500
@@ -1088,8 +1088,10 @@ int rtl_usb_probe(struct usb_interface *
 	rtlpriv->hw = hw;
 	rtlpriv->usb_data = kzalloc(RTL_USB_MAX_RX_COUNT * sizeof(u32),
 				    GFP_KERNEL);
-	if (!rtlpriv->usb_data)
+	if (!rtlpriv->usb_data) {
+		ieee80211_free_hw(hw);
 		return -ENOMEM;
+	}
 
 	/* this spin lock must be initialized early */
 	spin_lock_init(&rtlpriv->locks.usb_lock);
@@ -1152,6 +1154,7 @@ error_out:
 	_rtl_usb_io_handler_release(hw);
 	usb_put_dev(udev);
 	complete(&rtlpriv->firmware_loading_complete);
+	kfree(rtlpriv->usb_data);
 	return -ENODEV;
 }
 EXPORT_SYMBOL(rtl_usb_probe);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/parport/share.c linux-libre-4.9.208-gnu/drivers/parport/share.c
--- linux-libre-4.9.207-gnu/drivers/parport/share.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/parport/share.c	2020-01-04 07:41:15.000000000 -0500
@@ -230,6 +230,18 @@ static int port_check(struct device *dev
 	return 0;
 }
 
+/*
+ * Iterates through all the devices connected to the bus and return 1
+ * if the device is a parallel port.
+ */
+
+static int port_detect(struct device *dev, void *dev_drv)
+{
+	if (is_parport(dev))
+		return 1;
+	return 0;
+}
+
 /**
  *	parport_register_driver - register a parallel port device driver
  *	@drv: structure describing the driver
@@ -282,6 +294,15 @@ int __parport_register_driver(struct par
 		if (ret)
 			return ret;
 
+		/*
+		 * check if bus has any parallel port registered, if
+		 * none is found then load the lowlevel driver.
+		 */
+		ret = bus_for_each_dev(&parport_bus_type, NULL, NULL,
+				       port_detect);
+		if (!ret)
+			get_lowlevel_driver();
+
 		mutex_lock(&registration_lock);
 		if (drv->match_port)
 			bus_for_each_dev(&parport_bus_type, NULL, drv,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/pinctrl/intel/pinctrl-baytrail.c linux-libre-4.9.208-gnu/drivers/pinctrl/intel/pinctrl-baytrail.c
--- linux-libre-4.9.207-gnu/drivers/pinctrl/intel/pinctrl-baytrail.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/pinctrl/intel/pinctrl-baytrail.c	2020-01-04 07:41:15.000000000 -0500
@@ -204,7 +204,6 @@ struct byt_gpio {
 	struct platform_device *pdev;
 	struct pinctrl_dev *pctl_dev;
 	struct pinctrl_desc pctl_desc;
-	raw_spinlock_t lock;
 	const struct byt_pinctrl_soc_data *soc_data;
 	struct byt_community *communities_copy;
 	struct byt_gpio_pin_context *saved_context;
@@ -715,6 +714,8 @@ static const struct byt_pinctrl_soc_data
 	NULL,
 };
 
+static DEFINE_RAW_SPINLOCK(byt_lock);
+
 static struct byt_community *byt_get_community(struct byt_gpio *vg,
 					       unsigned int pin)
 {
@@ -856,7 +857,7 @@ static void byt_set_group_simple_mux(str
 	unsigned long flags;
 	int i;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 
 	for (i = 0; i < group.npins; i++) {
 		void __iomem *padcfg0;
@@ -876,7 +877,7 @@ static void byt_set_group_simple_mux(str
 		writel(value, padcfg0);
 	}
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 }
 
 static void byt_set_group_mixed_mux(struct byt_gpio *vg,
@@ -886,7 +887,7 @@ static void byt_set_group_mixed_mux(stru
 	unsigned long flags;
 	int i;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 
 	for (i = 0; i < group.npins; i++) {
 		void __iomem *padcfg0;
@@ -906,7 +907,7 @@ static void byt_set_group_mixed_mux(stru
 		writel(value, padcfg0);
 	}
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 }
 
 static int byt_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector,
@@ -955,11 +956,11 @@ static void byt_gpio_clear_triggering(st
 	unsigned long flags;
 	u32 value;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	value = readl(reg);
 	value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
 	writel(value, reg);
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 }
 
 static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev,
@@ -971,7 +972,7 @@ static int byt_gpio_request_enable(struc
 	u32 value, gpio_mux;
 	unsigned long flags;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 
 	/*
 	 * In most cases, func pin mux 000 means GPIO function.
@@ -993,7 +994,7 @@ static int byt_gpio_request_enable(struc
 			 "pin %u forcibly re-configured as GPIO\n", offset);
 	}
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	pm_runtime_get(&vg->pdev->dev);
 
@@ -1021,7 +1022,7 @@ static int byt_gpio_set_direction(struct
 	unsigned long flags;
 	u32 value;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 
 	value = readl(val_reg);
 	value &= ~BYT_DIR_MASK;
@@ -1038,7 +1039,7 @@ static int byt_gpio_set_direction(struct
 		     "Potential Error: Setting GPIO with direct_irq_en to output");
 	writel(value, val_reg);
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	return 0;
 }
@@ -1107,11 +1108,11 @@ static int byt_pin_config_get(struct pin
 	u32 conf, pull, val, debounce;
 	u16 arg = 0;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	conf = readl(conf_reg);
 	pull = conf & BYT_PULL_ASSIGN_MASK;
 	val = readl(val_reg);
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	switch (param) {
 	case PIN_CONFIG_BIAS_DISABLE:
@@ -1138,9 +1139,9 @@ static int byt_pin_config_get(struct pin
 		if (!(conf & BYT_DEBOUNCE_EN))
 			return -EINVAL;
 
-		raw_spin_lock_irqsave(&vg->lock, flags);
+		raw_spin_lock_irqsave(&byt_lock, flags);
 		debounce = readl(db_reg);
-		raw_spin_unlock_irqrestore(&vg->lock, flags);
+		raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 		switch (debounce & BYT_DEBOUNCE_PULSE_MASK) {
 		case BYT_DEBOUNCE_PULSE_375US:
@@ -1192,7 +1193,7 @@ static int byt_pin_config_set(struct pin
 	u32 conf, val, debounce;
 	int i, ret = 0;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 
 	conf = readl(conf_reg);
 	val = readl(val_reg);
@@ -1300,7 +1301,7 @@ static int byt_pin_config_set(struct pin
 	if (!ret)
 		writel(conf, conf_reg);
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	return ret;
 }
@@ -1325,9 +1326,9 @@ static int byt_gpio_get(struct gpio_chip
 	unsigned long flags;
 	u32 val;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	val = readl(reg);
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	return !!(val & BYT_LEVEL);
 }
@@ -1342,13 +1343,13 @@ static void byt_gpio_set(struct gpio_chi
 	if (!reg)
 		return;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	old_val = readl(reg);
 	if (value)
 		writel(old_val | BYT_LEVEL, reg);
 	else
 		writel(old_val & ~BYT_LEVEL, reg);
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 }
 
 static int byt_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
@@ -1361,9 +1362,9 @@ static int byt_gpio_get_direction(struct
 	if (!reg)
 		return -EINVAL;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	value = readl(reg);
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	if (!(value & BYT_OUTPUT_EN))
 		return GPIOF_DIR_OUT;
@@ -1406,14 +1407,14 @@ static void byt_gpio_dbg_show(struct seq
 		const char *label;
 		unsigned int pin;
 
-		raw_spin_lock_irqsave(&vg->lock, flags);
+		raw_spin_lock_irqsave(&byt_lock, flags);
 		pin = vg->soc_data->pins[i].number;
 		reg = byt_gpio_reg(vg, pin, BYT_CONF0_REG);
 		if (!reg) {
 			seq_printf(s,
 				   "Could not retrieve pin %i conf0 reg\n",
 				   pin);
-			raw_spin_unlock_irqrestore(&vg->lock, flags);
+			raw_spin_unlock_irqrestore(&byt_lock, flags);
 			continue;
 		}
 		conf0 = readl(reg);
@@ -1422,11 +1423,11 @@ static void byt_gpio_dbg_show(struct seq
 		if (!reg) {
 			seq_printf(s,
 				   "Could not retrieve pin %i val reg\n", pin);
-			raw_spin_unlock_irqrestore(&vg->lock, flags);
+			raw_spin_unlock_irqrestore(&byt_lock, flags);
 			continue;
 		}
 		val = readl(reg);
-		raw_spin_unlock_irqrestore(&vg->lock, flags);
+		raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 		comm = byt_get_community(vg, pin);
 		if (!comm) {
@@ -1510,9 +1511,9 @@ static void byt_irq_ack(struct irq_data
 	if (!reg)
 		return;
 
-	raw_spin_lock(&vg->lock);
+	raw_spin_lock(&byt_lock);
 	writel(BIT(offset % 32), reg);
-	raw_spin_unlock(&vg->lock);
+	raw_spin_unlock(&byt_lock);
 }
 
 static void byt_irq_mask(struct irq_data *d)
@@ -1536,7 +1537,7 @@ static void byt_irq_unmask(struct irq_da
 	if (!reg)
 		return;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	value = readl(reg);
 
 	switch (irqd_get_trigger_type(d)) {
@@ -1557,7 +1558,7 @@ static void byt_irq_unmask(struct irq_da
 
 	writel(value, reg);
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 }
 
 static int byt_irq_type(struct irq_data *d, unsigned int type)
@@ -1571,7 +1572,7 @@ static int byt_irq_type(struct irq_data
 	if (!reg || offset >= vg->chip.ngpio)
 		return -EINVAL;
 
-	raw_spin_lock_irqsave(&vg->lock, flags);
+	raw_spin_lock_irqsave(&byt_lock, flags);
 	value = readl(reg);
 
 	WARN(value & BYT_DIRECT_IRQ_EN,
@@ -1593,7 +1594,7 @@ static int byt_irq_type(struct irq_data
 	else if (type & IRQ_TYPE_LEVEL_MASK)
 		irq_set_handler_locked(d, handle_level_irq);
 
-	raw_spin_unlock_irqrestore(&vg->lock, flags);
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 
 	return 0;
 }
@@ -1629,9 +1630,9 @@ static void byt_gpio_irq_handler(struct
 			continue;
 		}
 
-		raw_spin_lock(&vg->lock);
+		raw_spin_lock(&byt_lock);
 		pending = readl(reg);
-		raw_spin_unlock(&vg->lock);
+		raw_spin_unlock(&byt_lock);
 		for_each_set_bit(pin, &pending, 32) {
 			virq = irq_find_mapping(vg->chip.irqdomain, base + pin);
 			generic_handle_irq(virq);
@@ -1833,8 +1834,6 @@ static int byt_pinctrl_probe(struct plat
 		return PTR_ERR(vg->pctl_dev);
 	}
 
-	raw_spin_lock_init(&vg->lock);
-
 	ret = byt_gpio_probe(vg);
 	if (ret) {
 		pinctrl_unregister(vg->pctl_dev);
@@ -1852,8 +1851,11 @@ static int byt_gpio_suspend(struct devic
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct byt_gpio *vg = platform_get_drvdata(pdev);
+	unsigned long flags;
 	int i;
 
+	raw_spin_lock_irqsave(&byt_lock, flags);
+
 	for (i = 0; i < vg->soc_data->npins; i++) {
 		void __iomem *reg;
 		u32 value;
@@ -1874,6 +1876,7 @@ static int byt_gpio_suspend(struct devic
 		vg->saved_context[i].val = value;
 	}
 
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 	return 0;
 }
 
@@ -1881,8 +1884,11 @@ static int byt_gpio_resume(struct device
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct byt_gpio *vg = platform_get_drvdata(pdev);
+	unsigned long flags;
 	int i;
 
+	raw_spin_lock_irqsave(&byt_lock, flags);
+
 	for (i = 0; i < vg->soc_data->npins; i++) {
 		void __iomem *reg;
 		u32 value;
@@ -1920,6 +1926,7 @@ static int byt_gpio_resume(struct device
 		}
 	}
 
+	raw_spin_unlock_irqrestore(&byt_lock, flags);
 	return 0;
 }
 #endif
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c linux-libre-4.9.208-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c
--- linux-libre-4.9.207-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c	2020-01-04 07:41:15.000000000 -0500
@@ -1453,7 +1453,7 @@ static const struct pinmux_func pinmux_f
 	GPIO_FN(ET0_ETXD2_A),
 	GPIO_FN(EX_CS5), GPIO_FN(SD1_CMD_A), GPIO_FN(ATADIR), GPIO_FN(QSSL_B),
 	GPIO_FN(ET0_ETXD3_A),
-	GPIO_FN(RD_WR), GPIO_FN(TCLK1_B),
+	GPIO_FN(RD_WR), GPIO_FN(TCLK0), GPIO_FN(CAN_CLK_B), GPIO_FN(ET0_ETXD4),
 	GPIO_FN(EX_WAIT0), GPIO_FN(TCLK1_B),
 	GPIO_FN(EX_WAIT1), GPIO_FN(SD1_DAT0_A), GPIO_FN(DREQ2),
 		GPIO_FN(CAN1_TX_C), GPIO_FN(ET0_LINK_C), GPIO_FN(ET0_ETXD5_A),
@@ -1949,7 +1949,7 @@ static const struct pinmux_cfg_reg pinmu
 	    /* IP3_20 [1] */
 		FN_EX_WAIT0, FN_TCLK1_B,
 	    /* IP3_19_18 [2] */
-		FN_RD_WR, FN_TCLK1_B, 0, 0,
+		FN_RD_WR, FN_TCLK0, FN_CAN_CLK_B, FN_ET0_ETXD4,
 	    /* IP3_17_15 [3] */
 		FN_EX_CS5, FN_SD1_CMD_A, FN_ATADIR, FN_QSSL_B,
 		FN_ET0_ETXD3_A, 0, 0, 0,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/platform/x86/hp-wmi.c linux-libre-4.9.208-gnu/drivers/platform/x86/hp-wmi.c
--- linux-libre-4.9.207-gnu/drivers/platform/x86/hp-wmi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/platform/x86/hp-wmi.c	2020-01-04 07:41:15.000000000 -0500
@@ -308,7 +308,7 @@ static int __init hp_wmi_bios_2008_later
 
 static int __init hp_wmi_bios_2009_later(void)
 {
-	int state = 0;
+	u8 state[128];
 	int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, 0, &state,
 				       sizeof(state), sizeof(state));
 	if (!ret)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/regulator/max8907-regulator.c linux-libre-4.9.208-gnu/drivers/regulator/max8907-regulator.c
--- linux-libre-4.9.207-gnu/drivers/regulator/max8907-regulator.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/regulator/max8907-regulator.c	2020-01-04 07:41:15.000000000 -0500
@@ -299,7 +299,10 @@ static int max8907_regulator_probe(struc
 	memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));
 
 	/* Backwards compatibility with MAX8907B; SD1 uses different voltages */
-	regmap_read(max8907->regmap_gen, MAX8907_REG_II2RR, &val);
+	ret = regmap_read(max8907->regmap_gen, MAX8907_REG_II2RR, &val);
+	if (ret)
+		return ret;
+
 	if ((val & MAX8907_II2RR_VERSION_MASK) ==
 	    MAX8907_II2RR_VERSION_REV_B) {
 		pmic->desc[MAX8907_SD1].min_uV = 637500;
@@ -336,14 +339,20 @@ static int max8907_regulator_probe(struc
 		}
 
 		if (pmic->desc[i].ops == &max8907_ldo_ops) {
-			regmap_read(config.regmap, pmic->desc[i].enable_reg,
+			ret = regmap_read(config.regmap, pmic->desc[i].enable_reg,
 				    &val);
+			if (ret)
+				return ret;
+
 			if ((val & MAX8907_MASK_LDO_SEQ) !=
 			    MAX8907_MASK_LDO_SEQ)
 				pmic->desc[i].ops = &max8907_ldo_hwctl_ops;
 		} else if (pmic->desc[i].ops == &max8907_out5v_ops) {
-			regmap_read(config.regmap, pmic->desc[i].enable_reg,
+			ret = regmap_read(config.regmap, pmic->desc[i].enable_reg,
 				    &val);
+			if (ret)
+				return ret;
+
 			if ((val & (MAX8907_MASK_OUT5V_VINEN |
 						MAX8907_MASK_OUT5V_ENSRC)) !=
 			    MAX8907_MASK_OUT5V_ENSRC)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/atari_scsi.c linux-libre-4.9.208-gnu/drivers/scsi/atari_scsi.c
--- linux-libre-4.9.207-gnu/drivers/scsi/atari_scsi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/atari_scsi.c	2020-01-04 07:41:15.000000000 -0500
@@ -753,7 +753,7 @@ static int __init atari_scsi_probe(struc
 		atari_scsi_template.sg_tablesize = SG_ALL;
 	} else {
 		atari_scsi_template.can_queue    = 1;
-		atari_scsi_template.sg_tablesize = SG_NONE;
+		atari_scsi_template.sg_tablesize = 1;
 	}
 
 	if (setup_can_queue > 0)
@@ -762,8 +762,8 @@ static int __init atari_scsi_probe(struc
 	if (setup_cmd_per_lun > 0)
 		atari_scsi_template.cmd_per_lun = setup_cmd_per_lun;
 
-	/* Leave sg_tablesize at 0 on a Falcon! */
-	if (ATARIHW_PRESENT(TT_SCSI) && setup_sg_tablesize >= 0)
+	/* Don't increase sg_tablesize on Falcon! */
+	if (ATARIHW_PRESENT(TT_SCSI) && setup_sg_tablesize > 0)
 		atari_scsi_template.sg_tablesize = setup_sg_tablesize;
 
 	if (setup_hostid >= 0) {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/csiostor/csio_lnode.c linux-libre-4.9.208-gnu/drivers/scsi/csiostor/csio_lnode.c
--- linux-libre-4.9.207-gnu/drivers/scsi/csiostor/csio_lnode.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/csiostor/csio_lnode.c	2020-01-04 07:41:15.000000000 -0500
@@ -301,6 +301,7 @@ csio_ln_fdmi_rhba_cbfn(struct csio_hw *h
 	struct fc_fdmi_port_name *port_name;
 	uint8_t buf[64];
 	uint8_t *fc4_type;
+	unsigned long flags;
 
 	if (fdmi_req->wr_status != FW_SUCCESS) {
 		csio_ln_dbg(ln, "WR error:%x in processing fdmi rhba cmd\n",
@@ -377,13 +378,13 @@ csio_ln_fdmi_rhba_cbfn(struct csio_hw *h
 	len = (uint32_t)(pld - (uint8_t *)cmd);
 
 	/* Submit FDMI RPA request */
-	spin_lock_irq(&hw->lock);
+	spin_lock_irqsave(&hw->lock, flags);
 	if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_done,
 				FCOE_CT, &fdmi_req->dma_buf, len)) {
 		CSIO_INC_STATS(ln, n_fdmi_err);
 		csio_ln_dbg(ln, "Failed to issue fdmi rpa req\n");
 	}
-	spin_unlock_irq(&hw->lock);
+	spin_unlock_irqrestore(&hw->lock, flags);
 }
 
 /*
@@ -404,6 +405,7 @@ csio_ln_fdmi_dprt_cbfn(struct csio_hw *h
 	struct fc_fdmi_rpl *reg_pl;
 	struct fs_fdmi_attrs *attrib_blk;
 	uint8_t buf[64];
+	unsigned long flags;
 
 	if (fdmi_req->wr_status != FW_SUCCESS) {
 		csio_ln_dbg(ln, "WR error:%x in processing fdmi dprt cmd\n",
@@ -483,13 +485,13 @@ csio_ln_fdmi_dprt_cbfn(struct csio_hw *h
 	attrib_blk->numattrs = htonl(numattrs);
 
 	/* Submit FDMI RHBA request */
-	spin_lock_irq(&hw->lock);
+	spin_lock_irqsave(&hw->lock, flags);
 	if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_rhba_cbfn,
 				FCOE_CT, &fdmi_req->dma_buf, len)) {
 		CSIO_INC_STATS(ln, n_fdmi_err);
 		csio_ln_dbg(ln, "Failed to issue fdmi rhba req\n");
 	}
-	spin_unlock_irq(&hw->lock);
+	spin_unlock_irqrestore(&hw->lock, flags);
 }
 
 /*
@@ -504,6 +506,7 @@ csio_ln_fdmi_dhba_cbfn(struct csio_hw *h
 	void *cmd;
 	struct fc_fdmi_port_name *port_name;
 	uint32_t len;
+	unsigned long flags;
 
 	if (fdmi_req->wr_status != FW_SUCCESS) {
 		csio_ln_dbg(ln, "WR error:%x in processing fdmi dhba cmd\n",
@@ -534,13 +537,13 @@ csio_ln_fdmi_dhba_cbfn(struct csio_hw *h
 	len += sizeof(*port_name);
 
 	/* Submit FDMI request */
-	spin_lock_irq(&hw->lock);
+	spin_lock_irqsave(&hw->lock, flags);
 	if (csio_ln_mgmt_submit_req(fdmi_req, csio_ln_fdmi_dprt_cbfn,
 				FCOE_CT, &fdmi_req->dma_buf, len)) {
 		CSIO_INC_STATS(ln, n_fdmi_err);
 		csio_ln_dbg(ln, "Failed to issue fdmi dprt req\n");
 	}
-	spin_unlock_irq(&hw->lock);
+	spin_unlock_irqrestore(&hw->lock, flags);
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_els.c linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_els.c
--- linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_els.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_els.c	2020-01-04 07:41:15.000000000 -0500
@@ -3863,7 +3863,7 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba,
 		mempool_free(mbox, phba->mbox_mem_pool);
 	}
 out:
-	if (ndlp && NLP_CHK_NODE_ACT(ndlp)) {
+	if (ndlp && NLP_CHK_NODE_ACT(ndlp) && shost) {
 		spin_lock_irq(shost->host_lock);
 		ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN | NLP_RM_DFLT_RPI);
 		spin_unlock_irq(shost->host_lock);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c
--- linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c	2020-01-04 07:41:15.000000000 -0500
@@ -454,8 +454,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport,
 	 * single discovery thread, this will cause a huge delay in
 	 * discovery. Also this will cause multiple state machines
 	 * running in parallel for this node.
+	 * This only applies to a fabric environment.
 	 */
-	if (ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) {
+	if ((ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) &&
+	    (vport->fc_flag & FC_FABRIC)) {
 		/* software abort outstanding PLOGI */
 		lpfc_els_abort(phba, ndlp);
 	}
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_sli.c linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_sli.c
--- linux-libre-4.9.207-gnu/drivers/scsi/lpfc/lpfc_sli.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/lpfc/lpfc_sli.c	2020-01-04 07:41:15.000000000 -0500
@@ -11962,13 +11962,19 @@ send_current_mbox:
 	phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
 	/* Setting active mailbox pointer need to be in sync to flag clear */
 	phba->sli.mbox_active = NULL;
+	if (bf_get(lpfc_trailer_consumed, mcqe))
+		lpfc_sli4_mq_release(phba->sli4_hba.mbx_wq);
 	spin_unlock_irqrestore(&phba->hbalock, iflags);
 	/* Wake up worker thread to post the next pending mailbox command */
 	lpfc_worker_wake_up(phba);
+	return workposted;
+
 out_no_mqe_complete:
+	spin_lock_irqsave(&phba->hbalock, iflags);
 	if (bf_get(lpfc_trailer_consumed, mcqe))
 		lpfc_sli4_mq_release(phba->sli4_hba.mbx_wq);
-	return workposted;
+	spin_unlock_irqrestore(&phba->hbalock, iflags);
+	return false;
 }
 
 /**
@@ -15989,6 +15995,13 @@ lpfc_sli4_alloc_rpi(struct lpfc_hba *phb
 static void
 __lpfc_sli4_free_rpi(struct lpfc_hba *phba, int rpi)
 {
+	/*
+	 * if the rpi value indicates a prior unreg has already
+	 * been done, skip the unreg.
+	 */
+	if (rpi == LPFC_RPI_ALLOC_ERROR)
+		return;
+
 	if (test_and_clear_bit(rpi, phba->sli4_hba.rpi_bmask)) {
 		phba->sli4_hba.rpi_count--;
 		phba->sli4_hba.max_cfg_param.rpi_used--;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/mac_scsi.c linux-libre-4.9.208-gnu/drivers/scsi/mac_scsi.c
--- linux-libre-4.9.207-gnu/drivers/scsi/mac_scsi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/mac_scsi.c	2020-01-04 07:41:15.000000000 -0500
@@ -378,7 +378,7 @@ static int __init mac_scsi_probe(struct
 		mac_scsi_template.can_queue = setup_can_queue;
 	if (setup_cmd_per_lun > 0)
 		mac_scsi_template.cmd_per_lun = setup_cmd_per_lun;
-	if (setup_sg_tablesize >= 0)
+	if (setup_sg_tablesize > 0)
 		mac_scsi_template.sg_tablesize = setup_sg_tablesize;
 	if (setup_hostid >= 0)
 		mac_scsi_template.this_id = setup_hostid & 7;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/mpt3sas/mpt3sas_ctl.c linux-libre-4.9.208-gnu/drivers/scsi/mpt3sas/mpt3sas_ctl.c
--- linux-libre-4.9.207-gnu/drivers/scsi/mpt3sas/mpt3sas_ctl.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/mpt3sas/mpt3sas_ctl.c	2020-01-04 07:41:15.000000000 -0500
@@ -1465,7 +1465,8 @@ _ctl_diag_register_2(struct MPT3SAS_ADAP
 			    " for diag buffers, requested size(%d)\n",
 			    ioc->name, __func__, request_data_sz);
 			mpt3sas_base_free_smid(ioc, smid);
-			return -ENOMEM;
+			rc = -ENOMEM;
+			goto out;
 		}
 		ioc->diag_buffer[buffer_type] = request_data;
 		ioc->diag_buffer_sz[buffer_type] = request_data_sz;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/pm8001/pm80xx_hwi.c linux-libre-4.9.208-gnu/drivers/scsi/pm8001/pm80xx_hwi.c
--- linux-libre-4.9.207-gnu/drivers/scsi/pm8001/pm80xx_hwi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/pm8001/pm80xx_hwi.c	2020-01-04 07:41:15.000000000 -0500
@@ -2368,6 +2368,8 @@ mpi_sata_completion(struct pm8001_hba_in
 			pm8001_printk("task 0x%p done with io_status 0x%x"
 			" resp 0x%x stat 0x%x but aborted by upper layer!\n",
 			t, status, ts->resp, ts->stat));
+		if (t->slow_task)
+			complete(&t->slow_task->completion);
 		pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
 	} else {
 		spin_unlock_irqrestore(&t->task_state_lock, flags);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/scsi_debug.c linux-libre-4.9.208-gnu/drivers/scsi/scsi_debug.c
--- linux-libre-4.9.207-gnu/drivers/scsi/scsi_debug.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/scsi_debug.c	2020-01-04 07:41:15.000000000 -0500
@@ -4953,6 +4953,11 @@ static int __init scsi_debug_init(void)
 		return -EINVAL;
 	}
 
+	if (sdebug_num_tgts < 0) {
+		pr_err("num_tgts must be >= 0\n");
+		return -EINVAL;
+	}
+
 	if (sdebug_guard > 1) {
 		pr_err("guard must be 0 or 1\n");
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/scsi_trace.c linux-libre-4.9.208-gnu/drivers/scsi/scsi_trace.c
--- linux-libre-4.9.207-gnu/drivers/scsi/scsi_trace.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/scsi_trace.c	2020-01-04 07:41:15.000000000 -0500
@@ -30,15 +30,18 @@ static const char *
 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len)
 {
 	const char *ret = trace_seq_buffer_ptr(p);
-	sector_t lba = 0, txlen = 0;
+	u32 lba = 0, txlen;
 
 	lba |= ((cdb[1] & 0x1F) << 16);
 	lba |=  (cdb[2] << 8);
 	lba |=   cdb[3];
-	txlen = cdb[4];
+	/*
+	 * From SBC-2: a TRANSFER LENGTH field set to zero specifies that 256
+	 * logical blocks shall be read (READ(6)) or written (WRITE(6)).
+	 */
+	txlen = cdb[4] ? cdb[4] : 256;
 
-	trace_seq_printf(p, "lba=%llu txlen=%llu",
-			 (unsigned long long)lba, (unsigned long long)txlen);
+	trace_seq_printf(p, "lba=%u txlen=%u", lba, txlen);
 	trace_seq_putc(p, 0);
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/sun3_scsi.c linux-libre-4.9.208-gnu/drivers/scsi/sun3_scsi.c
--- linux-libre-4.9.207-gnu/drivers/scsi/sun3_scsi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/sun3_scsi.c	2020-01-04 07:41:15.000000000 -0500
@@ -419,7 +419,7 @@ static struct scsi_host_template sun3_sc
 	.eh_bus_reset_handler	= sun3scsi_bus_reset,
 	.can_queue		= 16,
 	.this_id		= 7,
-	.sg_tablesize		= SG_NONE,
+	.sg_tablesize		= 1,
 	.cmd_per_lun		= 2,
 	.use_clustering		= DISABLE_CLUSTERING,
 	.cmd_size		= NCR5380_CMD_SIZE,
@@ -440,7 +440,7 @@ static int __init sun3_scsi_probe(struct
 		sun3_scsi_template.can_queue = setup_can_queue;
 	if (setup_cmd_per_lun > 0)
 		sun3_scsi_template.cmd_per_lun = setup_cmd_per_lun;
-	if (setup_sg_tablesize >= 0)
+	if (setup_sg_tablesize > 0)
 		sun3_scsi_template.sg_tablesize = setup_sg_tablesize;
 	if (setup_hostid >= 0)
 		sun3_scsi_template.this_id = setup_hostid & 7;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/scsi/ufs/ufshcd.c linux-libre-4.9.208-gnu/drivers/scsi/ufs/ufshcd.c
--- linux-libre-4.9.207-gnu/drivers/scsi/ufs/ufshcd.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/scsi/ufs/ufshcd.c	2020-01-04 07:41:15.000000000 -0500
@@ -2006,10 +2006,10 @@ static int __ufshcd_query_descriptor(str
 		goto out_unlock;
 	}
 
-	hba->dev_cmd.query.descriptor = NULL;
 	*buf_len = be16_to_cpu(response->upiu_res.length);
 
 out_unlock:
+	hba->dev_cmd.query.descriptor = NULL;
 	mutex_unlock(&hba->dev_cmd.lock);
 out:
 	ufshcd_release(hba);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/spi/spidev.c linux-libre-4.9.208-gnu/drivers/spi/spidev.c
--- linux-libre-4.9.207-gnu/drivers/spi/spidev.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/spi/spidev.c	2020-01-04 07:41:15.000000000 -0500
@@ -663,6 +663,9 @@ static int spidev_release(struct inode *
 		if (dofree)
 			kfree(spidev);
 	}
+#ifdef CONFIG_SPI_SLAVE
+	spi_slave_abort(spidev->spi);
+#endif
 	mutex_unlock(&device_list_lock);
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/spi/spi-img-spfi.c linux-libre-4.9.208-gnu/drivers/spi/spi-img-spfi.c
--- linux-libre-4.9.207-gnu/drivers/spi/spi-img-spfi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/spi/spi-img-spfi.c	2020-01-04 07:41:15.000000000 -0500
@@ -673,6 +673,8 @@ static int img_spfi_probe(struct platfor
 			dma_release_channel(spfi->tx_ch);
 		if (spfi->rx_ch)
 			dma_release_channel(spfi->rx_ch);
+		spfi->tx_ch = NULL;
+		spfi->rx_ch = NULL;
 		dev_warn(spfi->dev, "Failed to get DMA channels, falling back to PIO mode\n");
 	} else {
 		master->dma_tx = spfi->tx_ch;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/spi/spi-pxa2xx.c linux-libre-4.9.208-gnu/drivers/spi/spi-pxa2xx.c
--- linux-libre-4.9.207-gnu/drivers/spi/spi-pxa2xx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/spi/spi-pxa2xx.c	2020-01-04 07:41:15.000000000 -0500
@@ -1529,7 +1529,13 @@ pxa2xx_spi_init_pdata(struct platform_de
 	}
 
 	ssp->clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(ssp->clk))
+		return NULL;
+
 	ssp->irq = platform_get_irq(pdev, 0);
+	if (ssp->irq < 0)
+		return NULL;
+
 	ssp->type = type;
 	ssp->pdev = pdev;
 	ssp->port_id = pxa2xx_spi_get_port_id(adev);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/spi/spi-st-ssc4.c linux-libre-4.9.208-gnu/drivers/spi/spi-st-ssc4.c
--- linux-libre-4.9.207-gnu/drivers/spi/spi-st-ssc4.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/spi/spi-st-ssc4.c	2020-01-04 07:41:15.000000000 -0500
@@ -385,6 +385,7 @@ static int spi_st_probe(struct platform_
 	return 0;
 
 clk_disable:
+	pm_runtime_disable(&pdev->dev);
 	clk_disable_unprepare(spi_st->clk);
 put_master:
 	spi_master_put(master);
@@ -396,6 +397,8 @@ static int spi_st_remove(struct platform
 	struct spi_master *master = platform_get_drvdata(pdev);
 	struct spi_st *spi_st = spi_master_get_devdata(master);
 
+	pm_runtime_disable(&pdev->dev);
+
 	clk_disable_unprepare(spi_st->clk);
 
 	pinctrl_pm_select_sleep_state(&pdev->dev);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/spi/spi-tegra20-slink.c linux-libre-4.9.208-gnu/drivers/spi/spi-tegra20-slink.c
--- linux-libre-4.9.207-gnu/drivers/spi/spi-tegra20-slink.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/spi/spi-tegra20-slink.c	2020-01-04 07:41:15.000000000 -0500
@@ -1078,7 +1078,7 @@ static int tegra_slink_probe(struct plat
 	ret = clk_enable(tspi->clk);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Clock enable failed %d\n", ret);
-		goto exit_free_master;
+		goto exit_clk_unprepare;
 	}
 
 	spi_irq = platform_get_irq(pdev, 0);
@@ -1151,6 +1151,8 @@ exit_free_irq:
 	free_irq(spi_irq, tspi);
 exit_clk_disable:
 	clk_disable(tspi->clk);
+exit_clk_unprepare:
+	clk_unprepare(tspi->clk);
 exit_free_master:
 	spi_master_put(master);
 	return ret;
@@ -1164,6 +1166,7 @@ static int tegra_slink_remove(struct pla
 	free_irq(tspi->irq, tspi);
 
 	clk_disable(tspi->clk);
+	clk_unprepare(tspi->clk);
 
 	if (tspi->tx_dma_chan)
 		tegra_slink_deinit_dma_param(tspi, false);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/staging/comedi/drivers/gsc_hpdi.c linux-libre-4.9.208-gnu/drivers/staging/comedi/drivers/gsc_hpdi.c
--- linux-libre-4.9.207-gnu/drivers/staging/comedi/drivers/gsc_hpdi.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/staging/comedi/drivers/gsc_hpdi.c	2020-01-04 07:41:15.000000000 -0500
@@ -632,6 +632,11 @@ static int gsc_hpdi_auto_attach(struct c
 		    dma_alloc_coherent(&pcidev->dev, DMA_BUFFER_SIZE,
 				       &devpriv->dio_buffer_phys_addr[i],
 				       GFP_KERNEL);
+		if (!devpriv->dio_buffer[i]) {
+			dev_warn(dev->class_dev,
+				 "failed to allocate DMA buffer\n");
+			return -ENOMEM;
+		}
 	}
 	/* allocate dma descriptors */
 	devpriv->dma_desc = dma_alloc_coherent(&pcidev->dev,
@@ -639,6 +644,11 @@ static int gsc_hpdi_auto_attach(struct c
 					       NUM_DMA_DESCRIPTORS,
 					       &devpriv->dma_desc_phys_addr,
 					       GFP_KERNEL);
+	if (!devpriv->dma_desc) {
+		dev_warn(dev->class_dev,
+			 "failed to allocate DMA descriptors\n");
+		return -ENOMEM;
+	}
 	if (devpriv->dma_desc_phys_addr & 0xf) {
 		dev_warn(dev->class_dev,
 			 " dma descriptors not quad-word aligned (bug)\n");
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/staging/fbtft/fbtft-core.c linux-libre-4.9.208-gnu/drivers/staging/fbtft/fbtft-core.c
--- linux-libre-4.9.207-gnu/drivers/staging/fbtft/fbtft-core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/staging/fbtft/fbtft-core.c	2020-01-04 07:41:15.000000000 -0500
@@ -766,7 +766,7 @@ struct fb_info *fbtft_framebuffer_alloc(
 	fbdefio->deferred_io =     fbtft_deferred_io;
 	fb_deferred_io_init(info);
 
-	strncpy(info->fix.id, dev->driver->name, 16);
+	snprintf(info->fix.id, sizeof(info->fix.id), "%s", dev->driver->name);
 	info->fix.type =           FB_TYPE_PACKED_PIXELS;
 	info->fix.visual =         FB_VISUAL_TRUECOLOR;
 	info->fix.xpanstep =	   0;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/staging/rtl8188eu/core/rtw_xmit.c linux-libre-4.9.208-gnu/drivers/staging/rtl8188eu/core/rtw_xmit.c
--- linux-libre-4.9.207-gnu/drivers/staging/rtl8188eu/core/rtw_xmit.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/staging/rtl8188eu/core/rtw_xmit.c	2020-01-04 07:41:15.000000000 -0500
@@ -805,7 +805,7 @@ s32 rtw_make_wlanhdr(struct adapter *pad
 			memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
 			memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
 
-			if (psta->qos_option)
+			if (psta && psta->qos_option)
 				qos_option = true;
 		} else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ||
 			   check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
@@ -813,7 +813,7 @@ s32 rtw_make_wlanhdr(struct adapter *pad
 			memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
 			memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
 
-			if (psta->qos_option)
+			if (psta && psta->qos_option)
 				qos_option = true;
 		} else {
 			RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("fw_state:%x is not allowed to xmit frame\n", get_fwstate(pmlmepriv)));
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/staging/rtl8192u/r8192U_core.c linux-libre-4.9.208-gnu/drivers/staging/rtl8192u/r8192U_core.c
--- linux-libre-4.9.207-gnu/drivers/staging/rtl8192u/r8192U_core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/staging/rtl8192u/r8192U_core.c	2020-01-04 07:41:15.000000000 -0500
@@ -1509,7 +1509,7 @@ short rtl8192_tx(struct net_device *dev,
 		(tx_fwinfo_819x_usb *)(skb->data + USB_HWDESC_HEADER_LEN);
 	struct usb_device *udev = priv->udev;
 	int pend;
-	int status;
+	int status, rt = -1;
 	struct urb *tx_urb = NULL, *tx_urb_zero = NULL;
 	unsigned int idx_pipe;
 
@@ -1653,8 +1653,10 @@ short rtl8192_tx(struct net_device *dev,
 		}
 		if (bSend0Byte) {
 			tx_urb_zero = usb_alloc_urb(0, GFP_ATOMIC);
-			if (!tx_urb_zero)
-				return -ENOMEM;
+			if (!tx_urb_zero) {
+				rt = -ENOMEM;
+				goto error;
+			}
 			usb_fill_bulk_urb(tx_urb_zero, udev,
 					  usb_sndbulkpipe(udev, idx_pipe),
 					  &zero, 0, tx_zero_isr, dev);
@@ -1664,7 +1666,7 @@ short rtl8192_tx(struct net_device *dev,
 					 "Error TX URB for zero byte %d, error %d",
 					 atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
 					 status);
-				return -1;
+				goto error;
 			}
 		}
 		netif_trans_update(dev);
@@ -1675,7 +1677,12 @@ short rtl8192_tx(struct net_device *dev,
 	RT_TRACE(COMP_ERR, "Error TX URB %d, error %d",
 		 atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
 		 status);
-	return -1;
+
+error:
+	dev_kfree_skb_any(skb);
+	usb_free_urb(tx_urb);
+	usb_free_urb(tx_urb_zero);
+	return rt;
 }
 
 static short rtl8192_usb_initendpoints(struct net_device *dev)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/target/iscsi/iscsi_target_auth.c linux-libre-4.9.208-gnu/drivers/target/iscsi/iscsi_target_auth.c
--- linux-libre-4.9.207-gnu/drivers/target/iscsi/iscsi_target_auth.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/target/iscsi/iscsi_target_auth.c	2020-01-04 07:41:15.000000000 -0500
@@ -74,7 +74,7 @@ static int chap_check_algorithm(const ch
 		if (!token)
 			goto out;
 
-		if (!strncmp(token, "5", 1)) {
+		if (!strcmp(token, "5")) {
 			pr_debug("Selected MD5 Algorithm\n");
 			kfree(orig);
 			return CHAP_DIGEST_MD5;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/target/iscsi/iscsi_target.c linux-libre-4.9.208-gnu/drivers/target/iscsi/iscsi_target.c
--- linux-libre-4.9.207-gnu/drivers/target/iscsi/iscsi_target.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/target/iscsi/iscsi_target.c	2020-01-04 07:41:15.000000000 -0500
@@ -1168,7 +1168,9 @@ int iscsit_setup_scsi_cmd(struct iscsi_c
 		hdr->cmdsn, be32_to_cpu(hdr->data_length), payload_length,
 		conn->cid);
 
-	target_get_sess_cmd(&cmd->se_cmd, true);
+	if (target_get_sess_cmd(&cmd->se_cmd, true) < 0)
+		return iscsit_add_reject_cmd(cmd,
+				ISCSI_REASON_WAITING_FOR_LOGOUT, buf);
 
 	cmd->sense_reason = transport_lookup_cmd_lun(&cmd->se_cmd,
 						     scsilun_to_int(&hdr->lun));
@@ -1986,7 +1988,9 @@ iscsit_handle_task_mgt_cmd(struct iscsi_
 			      conn->sess->se_sess, 0, DMA_NONE,
 			      TCM_SIMPLE_TAG, cmd->sense_buffer + 2);
 
-	target_get_sess_cmd(&cmd->se_cmd, true);
+	if (target_get_sess_cmd(&cmd->se_cmd, true) < 0)
+		return iscsit_add_reject_cmd(cmd,
+				ISCSI_REASON_WAITING_FOR_LOGOUT, buf);
 
 	/*
 	 * TASK_REASSIGN for ERL=2 / connection stays inside of
@@ -4243,6 +4247,8 @@ int iscsit_close_connection(
 	 * must wait until they have completed.
 	 */
 	iscsit_check_conn_usage_count(conn);
+	target_sess_cmd_list_set_waiting(sess->se_sess);
+	target_wait_for_sess_cmds(sess->se_sess);
 
 	ahash_request_free(conn->conn_tx_hash);
 	if (conn->conn_rx_hash) {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/tty/serial/atmel_serial.c linux-libre-4.9.208-gnu/drivers/tty/serial/atmel_serial.c
--- linux-libre-4.9.207-gnu/drivers/tty/serial/atmel_serial.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/tty/serial/atmel_serial.c	2020-01-04 07:41:15.000000000 -0500
@@ -2200,27 +2200,6 @@ static void atmel_set_termios(struct uar
 		mode |= ATMEL_US_USMODE_NORMAL;
 	}
 
-	/* set the mode, clock divisor, parity, stop bits and data size */
-	atmel_uart_writel(port, ATMEL_US_MR, mode);
-
-	/*
-	 * when switching the mode, set the RTS line state according to the
-	 * new mode, otherwise keep the former state
-	 */
-	if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
-		unsigned int rts_state;
-
-		if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
-			/* let the hardware control the RTS line */
-			rts_state = ATMEL_US_RTSDIS;
-		} else {
-			/* force RTS line to low level */
-			rts_state = ATMEL_US_RTSEN;
-		}
-
-		atmel_uart_writel(port, ATMEL_US_CR, rts_state);
-	}
-
 	/*
 	 * Set the baud rate:
 	 * Fractional baudrate allows to setup output frequency more
@@ -2247,6 +2226,28 @@ static void atmel_set_termios(struct uar
 	quot = cd | fp << ATMEL_US_FP_OFFSET;
 
 	atmel_uart_writel(port, ATMEL_US_BRGR, quot);
+
+	/* set the mode, clock divisor, parity, stop bits and data size */
+	atmel_uart_writel(port, ATMEL_US_MR, mode);
+
+	/*
+	 * when switching the mode, set the RTS line state according to the
+	 * new mode, otherwise keep the former state
+	 */
+	if ((old_mode & ATMEL_US_USMODE) != (mode & ATMEL_US_USMODE)) {
+		unsigned int rts_state;
+
+		if ((mode & ATMEL_US_USMODE) == ATMEL_US_USMODE_HWHS) {
+			/* let the hardware control the RTS line */
+			rts_state = ATMEL_US_RTSDIS;
+		} else {
+			/* force RTS line to low level */
+			rts_state = ATMEL_US_RTSEN;
+		}
+
+		atmel_uart_writel(port, ATMEL_US_CR, rts_state);
+	}
+
 	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/core/devio.c linux-libre-4.9.208-gnu/drivers/usb/core/devio.c
--- linux-libre-4.9.207-gnu/drivers/usb/core/devio.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/core/devio.c	2020-01-04 07:41:15.000000000 -0500
@@ -754,8 +754,15 @@ static int claimintf(struct usb_dev_stat
 	intf = usb_ifnum_to_if(dev, ifnum);
 	if (!intf)
 		err = -ENOENT;
-	else
+	else {
+		unsigned int old_suppress;
+
+		/* suppress uevents while claiming interface */
+		old_suppress = dev_get_uevent_suppress(&intf->dev);
+		dev_set_uevent_suppress(&intf->dev, 1);
 		err = usb_driver_claim_interface(&usbfs_driver, intf, ps);
+		dev_set_uevent_suppress(&intf->dev, old_suppress);
+	}
 	if (err == 0)
 		set_bit(ifnum, &ps->ifclaimed);
 	return err;
@@ -775,7 +782,13 @@ static int releaseintf(struct usb_dev_st
 	if (!intf)
 		err = -ENOENT;
 	else if (test_and_clear_bit(ifnum, &ps->ifclaimed)) {
+		unsigned int old_suppress;
+
+		/* suppress uevents while releasing interface */
+		old_suppress = dev_get_uevent_suppress(&intf->dev);
+		dev_set_uevent_suppress(&intf->dev, 1);
 		usb_driver_release_interface(&usbfs_driver, intf);
+		dev_set_uevent_suppress(&intf->dev, old_suppress);
 		err = 0;
 	}
 	return err;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/host/ehci-q.c linux-libre-4.9.208-gnu/drivers/usb/host/ehci-q.c
--- linux-libre-4.9.207-gnu/drivers/usb/host/ehci-q.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/host/ehci-q.c	2020-01-04 07:41:15.000000000 -0500
@@ -40,6 +40,10 @@
 
 /*-------------------------------------------------------------------------*/
 
+/* PID Codes that are used here, from EHCI specification, Table 3-16. */
+#define PID_CODE_IN    1
+#define PID_CODE_SETUP 2
+
 /* fill a qtd, returning how much of the buffer we were able to queue up */
 
 static int
@@ -203,7 +207,7 @@ static int qtd_copy_status (
 	int	status = -EINPROGRESS;
 
 	/* count IN/OUT bytes, not SETUP (even short packets) */
-	if (likely (QTD_PID (token) != 2))
+	if (likely(QTD_PID(token) != PID_CODE_SETUP))
 		urb->actual_length += length - QTD_LENGTH (token);
 
 	/* don't modify error codes */
@@ -219,6 +223,13 @@ static int qtd_copy_status (
 		if (token & QTD_STS_BABBLE) {
 			/* FIXME "must" disable babbling device's port too */
 			status = -EOVERFLOW;
+		/*
+		 * When MMF is active and PID Code is IN, queue is halted.
+		 * EHCI Specification, Table 4-13.
+		 */
+		} else if ((token & QTD_STS_MMF) &&
+					(QTD_PID(token) == PID_CODE_IN)) {
+			status = -EPROTO;
 		/* CERR nonzero + halt --> stall */
 		} else if (QTD_CERR(token)) {
 			status = -EPIPE;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/host/xhci-pci.c linux-libre-4.9.208-gnu/drivers/usb/host/xhci-pci.c
--- linux-libre-4.9.207-gnu/drivers/usb/host/xhci-pci.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/host/xhci-pci.c	2020-01-04 07:41:15.000000000 -0500
@@ -468,7 +468,6 @@ static int xhci_pci_resume(struct usb_hc
 	retval = xhci_resume(xhci, hibernated);
 	return retval;
 }
-#endif /* CONFIG_PM */
 
 static void xhci_pci_shutdown(struct usb_hcd *hcd)
 {
@@ -481,6 +480,7 @@ static void xhci_pci_shutdown(struct usb
 	if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
 		pci_set_power_state(pdev, PCI_D3hot);
 }
+#endif /* CONFIG_PM */
 
 /*-------------------------------------------------------------------------*/
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/renesas_usbhs/common.h linux-libre-4.9.208-gnu/drivers/usb/renesas_usbhs/common.h
--- linux-libre-4.9.207-gnu/drivers/usb/renesas_usbhs/common.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/renesas_usbhs/common.h	2020-01-04 07:41:15.000000000 -0500
@@ -163,11 +163,12 @@ struct usbhs_priv;
 #define VBSTS	(1 << 7)	/* VBUS_0 and VBUSIN_0 Input Status */
 #define VALID	(1 << 3)	/* USB Request Receive */
 
-#define DVSQ_MASK		(0x3 << 4)	/* Device State */
+#define DVSQ_MASK		(0x7 << 4)	/* Device State */
 #define  POWER_STATE		(0 << 4)
 #define  DEFAULT_STATE		(1 << 4)
 #define  ADDRESS_STATE		(2 << 4)
 #define  CONFIGURATION_STATE	(3 << 4)
+#define  SUSPENDED_STATE	(4 << 4)
 
 #define CTSQ_MASK		(0x7)	/* Control Transfer Stage */
 #define  IDLE_SETUP_STAGE	0	/* Idle stage or setup stage */
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/renesas_usbhs/mod_gadget.c linux-libre-4.9.208-gnu/drivers/usb/renesas_usbhs/mod_gadget.c
--- linux-libre-4.9.207-gnu/drivers/usb/renesas_usbhs/mod_gadget.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/renesas_usbhs/mod_gadget.c	2020-01-04 07:41:15.000000000 -0500
@@ -465,12 +465,18 @@ static int usbhsg_irq_dev_state(struct u
 {
 	struct usbhsg_gpriv *gpriv = usbhsg_priv_to_gpriv(priv);
 	struct device *dev = usbhsg_gpriv_to_dev(gpriv);
+	int state = usbhs_status_get_device_state(irq_state);
 
 	gpriv->gadget.speed = usbhs_bus_get_speed(priv);
 
-	dev_dbg(dev, "state = %x : speed : %d\n",
-		usbhs_status_get_device_state(irq_state),
-		gpriv->gadget.speed);
+	dev_dbg(dev, "state = %x : speed : %d\n", state, gpriv->gadget.speed);
+
+	if (gpriv->gadget.speed != USB_SPEED_UNKNOWN &&
+	    (state & SUSPENDED_STATE)) {
+		if (gpriv->driver && gpriv->driver->suspend)
+			gpriv->driver->suspend(&gpriv->gadget);
+		usb_gadget_set_state(&gpriv->gadget, USB_STATE_SUSPENDED);
+	}
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/usb/usbip/vhci_rx.c linux-libre-4.9.208-gnu/drivers/usb/usbip/vhci_rx.c
--- linux-libre-4.9.207-gnu/drivers/usb/usbip/vhci_rx.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/usb/usbip/vhci_rx.c	2020-01-04 07:41:15.000000000 -0500
@@ -90,16 +90,21 @@ static void vhci_recv_ret_submit(struct
 	usbip_pack_pdu(pdu, urb, USBIP_RET_SUBMIT, 0);
 
 	/* recv transfer buffer */
-	if (usbip_recv_xbuff(ud, urb) < 0)
-		return;
+	if (usbip_recv_xbuff(ud, urb) < 0) {
+		urb->status = -EPROTO;
+		goto error;
+	}
 
 	/* recv iso_packet_descriptor */
-	if (usbip_recv_iso(ud, urb) < 0)
-		return;
+	if (usbip_recv_iso(ud, urb) < 0) {
+		urb->status = -EPROTO;
+		goto error;
+	}
 
 	/* restore the padding in iso packets */
 	usbip_pad_iso(ud, urb);
 
+error:
 	if (usbip_dbg_flag_vhci_rx)
 		usbip_dump_urb(urb);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/drivers/vhost/vsock.c linux-libre-4.9.208-gnu/drivers/vhost/vsock.c
--- linux-libre-4.9.207-gnu/drivers/vhost/vsock.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/drivers/vhost/vsock.c	2020-01-04 07:41:15.000000000 -0500
@@ -399,7 +399,9 @@ static void vhost_vsock_handle_tx_kick(s
 		len = pkt->len;
 
 		/* Only accept correctly addressed packets */
-		if (le64_to_cpu(pkt->hdr.src_cid) == vsock->guest_cid)
+		if (le64_to_cpu(pkt->hdr.src_cid) == vsock->guest_cid &&
+		    le64_to_cpu(pkt->hdr.dst_cid) ==
+		    vhost_transport_get_local_cid())
 			virtio_transport_recv_pkt(pkt);
 		else
 			virtio_transport_free_pkt(pkt);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/async-thread.c linux-libre-4.9.208-gnu/fs/btrfs/async-thread.c
--- linux-libre-4.9.207-gnu/fs/btrfs/async-thread.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/async-thread.c	2020-01-04 07:41:15.000000000 -0500
@@ -265,16 +265,17 @@ out:
 	}
 }
 
-static void run_ordered_work(struct __btrfs_workqueue *wq)
+static void run_ordered_work(struct __btrfs_workqueue *wq,
+			     struct btrfs_work *self)
 {
 	struct list_head *list = &wq->ordered_list;
 	struct btrfs_work *work;
 	spinlock_t *lock = &wq->list_lock;
 	unsigned long flags;
+	void *wtag;
+	bool free_self = false;
 
 	while (1) {
-		void *wtag;
-
 		spin_lock_irqsave(lock, flags);
 		if (list_empty(list))
 			break;
@@ -300,16 +301,47 @@ static void run_ordered_work(struct __bt
 		list_del(&work->ordered_list);
 		spin_unlock_irqrestore(lock, flags);
 
-		/*
-		 * We don't want to call the ordered free functions with the
-		 * lock held though. Save the work as tag for the trace event,
-		 * because the callback could free the structure.
-		 */
-		wtag = work;
-		work->ordered_free(work);
-		trace_btrfs_all_work_done(wq->fs_info, wtag);
+		if (work == self) {
+			/*
+			 * This is the work item that the worker is currently
+			 * executing.
+			 *
+			 * The kernel workqueue code guarantees non-reentrancy
+			 * of work items. I.e., if a work item with the same
+			 * address and work function is queued twice, the second
+			 * execution is blocked until the first one finishes. A
+			 * work item may be freed and recycled with the same
+			 * work function; the workqueue code assumes that the
+			 * original work item cannot depend on the recycled work
+			 * item in that case (see find_worker_executing_work()).
+			 *
+			 * Note that the work of one Btrfs filesystem may depend
+			 * on the work of another Btrfs filesystem via, e.g., a
+			 * loop device. Therefore, we must not allow the current
+			 * work item to be recycled until we are really done,
+			 * otherwise we break the above assumption and can
+			 * deadlock.
+			 */
+			free_self = true;
+		} else {
+			/*
+			 * We don't want to call the ordered free functions with
+			 * the lock held though. Save the work as tag for the
+			 * trace event, because the callback could free the
+			 * structure.
+			 */
+			wtag = work;
+			work->ordered_free(work);
+			trace_btrfs_all_work_done(wq->fs_info, wtag);
+		}
 	}
 	spin_unlock_irqrestore(lock, flags);
+
+	if (free_self) {
+		wtag = self;
+		self->ordered_free(self);
+		trace_btrfs_all_work_done(wq->fs_info, wtag);
+	}
 }
 
 static void normal_work_helper(struct btrfs_work *work)
@@ -337,7 +369,7 @@ static void normal_work_helper(struct bt
 	work->func(work);
 	if (need_order) {
 		set_bit(WORK_DONE_BIT, &work->flags);
-		run_ordered_work(wq);
+		run_ordered_work(wq, work);
 	}
 	if (!need_order)
 		trace_btrfs_all_work_done(wq->fs_info, wtag);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/ctree.c linux-libre-4.9.208-gnu/fs/btrfs/ctree.c
--- linux-libre-4.9.207-gnu/fs/btrfs/ctree.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/ctree.c	2020-01-04 07:41:15.000000000 -0500
@@ -424,7 +424,7 @@ void btrfs_put_tree_mod_seq(struct btrfs
 	for (node = rb_first(tm_root); node; node = next) {
 		next = rb_next(node);
 		tm = container_of(node, struct tree_mod_elem, node);
-		if (tm->seq > min_seq)
+		if (tm->seq >= min_seq)
 			continue;
 		rb_erase(node, tm_root);
 		kfree(tm);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/disk-io.c linux-libre-4.9.208-gnu/fs/btrfs/disk-io.c
--- linux-libre-4.9.207-gnu/fs/btrfs/disk-io.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/disk-io.c	2020-01-04 07:41:15.000000000 -0500
@@ -1712,8 +1712,8 @@ static void end_workqueue_fn(struct btrf
 	bio->bi_error = end_io_wq->error;
 	bio->bi_private = end_io_wq->private;
 	bio->bi_end_io = end_io_wq->end_io;
-	kmem_cache_free(btrfs_end_io_wq_cache, end_io_wq);
 	bio_endio(bio);
+	kmem_cache_free(btrfs_end_io_wq_cache, end_io_wq);
 }
 
 static int cleaner_kthread(void *arg)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/extent_io.c linux-libre-4.9.208-gnu/fs/btrfs/extent_io.c
--- linux-libre-4.9.207-gnu/fs/btrfs/extent_io.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/extent_io.c	2020-01-04 07:41:15.000000000 -0500
@@ -4994,12 +4994,14 @@ struct extent_buffer *alloc_test_extent_
 		return eb;
 	eb = alloc_dummy_extent_buffer(fs_info, start, nodesize);
 	if (!eb)
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 	eb->fs_info = fs_info;
 again:
 	ret = radix_tree_preload(GFP_NOFS);
-	if (ret)
+	if (ret) {
+		exists = ERR_PTR(ret);
 		goto free_eb;
+	}
 	spin_lock(&fs_info->buffer_lock);
 	ret = radix_tree_insert(&fs_info->buffer_radix,
 				start >> PAGE_SHIFT, eb);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/inode.c linux-libre-4.9.208-gnu/fs/btrfs/inode.c
--- linux-libre-4.9.207-gnu/fs/btrfs/inode.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/inode.c	2020-01-04 07:41:15.000000000 -0500
@@ -5576,7 +5576,6 @@ static void inode_tree_del(struct inode
 	spin_unlock(&root->inode_lock);
 
 	if (empty && btrfs_root_refs(&root->root_item) == 0) {
-		synchronize_srcu(&root->fs_info->subvol_srcu);
 		spin_lock(&root->inode_lock);
 		empty = RB_EMPTY_ROOT(&root->inode_tree);
 		spin_unlock(&root->inode_lock);
@@ -9597,9 +9596,8 @@ static int btrfs_rename_exchange(struct
 		return -EXDEV;
 
 	/* close the race window with snapshot create/destroy ioctl */
-	if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
-		down_read(&root->fs_info->subvol_sem);
-	if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
+	if (old_ino == BTRFS_FIRST_FREE_OBJECTID ||
+	    new_ino == BTRFS_FIRST_FREE_OBJECTID)
 		down_read(&dest->fs_info->subvol_sem);
 
 	/*
@@ -9785,9 +9783,8 @@ out_fail:
 	ret2 = btrfs_end_transaction(trans, root);
 	ret = ret ? ret : ret2;
 out_notrans:
-	if (new_ino == BTRFS_FIRST_FREE_OBJECTID)
-		up_read(&dest->fs_info->subvol_sem);
-	if (old_ino == BTRFS_FIRST_FREE_OBJECTID)
+	if (new_ino == BTRFS_FIRST_FREE_OBJECTID ||
+	    old_ino == BTRFS_FIRST_FREE_OBJECTID)
 		up_read(&root->fs_info->subvol_sem);
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/ioctl.c linux-libre-4.9.208-gnu/fs/btrfs/ioctl.c
--- linux-libre-4.9.207-gnu/fs/btrfs/ioctl.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/ioctl.c	2020-01-04 07:41:15.000000000 -0500
@@ -610,12 +610,18 @@ static noinline int create_subvol(struct
 
 	btrfs_i_size_write(dir, dir->i_size + namelen * 2);
 	ret = btrfs_update_inode(trans, root, dir);
-	BUG_ON(ret);
+	if (ret) {
+		btrfs_abort_transaction(trans, ret);
+		goto fail;
+	}
 
 	ret = btrfs_add_root_ref(trans, root->fs_info->tree_root,
 				 objectid, root->root_key.objectid,
 				 btrfs_ino(dir), index, name, namelen);
-	BUG_ON(ret);
+	if (ret) {
+		btrfs_abort_transaction(trans, ret);
+		goto fail;
+	}
 
 	ret = btrfs_uuid_tree_add(trans, root->fs_info->uuid_root,
 				  root_item->uuid, BTRFS_UUID_KEY_SUBVOL,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/reada.c linux-libre-4.9.208-gnu/fs/btrfs/reada.c
--- linux-libre-4.9.207-gnu/fs/btrfs/reada.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/reada.c	2020-01-04 07:41:15.000000000 -0500
@@ -734,21 +734,19 @@ static int reada_start_machine_dev(struc
 static void reada_start_machine_worker(struct btrfs_work *work)
 {
 	struct reada_machine_work *rmw;
-	struct btrfs_fs_info *fs_info;
 	int old_ioprio;
 
 	rmw = container_of(work, struct reada_machine_work, work);
-	fs_info = rmw->fs_info;
-
-	kfree(rmw);
 
 	old_ioprio = IOPRIO_PRIO_VALUE(task_nice_ioclass(current),
 				       task_nice_ioprio(current));
 	set_task_ioprio(current, BTRFS_IOPRIO_READA);
-	__reada_start_machine(fs_info);
+	__reada_start_machine(rmw->fs_info);
 	set_task_ioprio(current, old_ioprio);
 
-	atomic_dec(&fs_info->reada_works_cnt);
+	atomic_dec(&rmw->fs_info->reada_works_cnt);
+
+	kfree(rmw);
 }
 
 static void __reada_start_machine(struct btrfs_fs_info *fs_info)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/relocation.c linux-libre-4.9.208-gnu/fs/btrfs/relocation.c
--- linux-libre-4.9.207-gnu/fs/btrfs/relocation.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/relocation.c	2020-01-04 07:41:15.000000000 -0500
@@ -4587,6 +4587,7 @@ int btrfs_recover_relocation(struct btrf
 				       reloc_root->root_key.offset);
 		if (IS_ERR(fs_root)) {
 			err = PTR_ERR(fs_root);
+			list_add_tail(&reloc_root->root_list, &reloc_roots);
 			goto out_free;
 		}
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/tests/free-space-tree-tests.c linux-libre-4.9.208-gnu/fs/btrfs/tests/free-space-tree-tests.c
--- linux-libre-4.9.207-gnu/fs/btrfs/tests/free-space-tree-tests.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/tests/free-space-tree-tests.c	2020-01-04 07:41:15.000000000 -0500
@@ -476,9 +476,9 @@ static int run_test(test_func_t test_fun
 
 	root->node = alloc_test_extent_buffer(root->fs_info,
 		nodesize, nodesize);
-	if (!root->node) {
-		test_msg("Couldn't allocate dummy buffer\n");
-		ret = -ENOMEM;
+	if (IS_ERR(root->node)) {
+		test_msg("couldn't allocate dummy buffer\n");
+		ret = PTR_ERR(root->node);
 		goto out;
 	}
 	btrfs_set_header_level(root->node, 0);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/tests/qgroup-tests.c linux-libre-4.9.208-gnu/fs/btrfs/tests/qgroup-tests.c
--- linux-libre-4.9.207-gnu/fs/btrfs/tests/qgroup-tests.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/tests/qgroup-tests.c	2020-01-04 07:41:15.000000000 -0500
@@ -488,9 +488,9 @@ int btrfs_test_qgroups(u32 sectorsize, u
 	 */
 	root->node = alloc_test_extent_buffer(root->fs_info, nodesize,
 					nodesize);
-	if (!root->node) {
+	if (IS_ERR(root->node)) {
 		test_msg("Couldn't allocate dummy buffer\n");
-		ret = -ENOMEM;
+		ret = PTR_ERR(root->node);
 		goto out;
 	}
 	btrfs_set_header_level(root->node, 0);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/tree-log.c linux-libre-4.9.208-gnu/fs/btrfs/tree-log.c
--- linux-libre-4.9.207-gnu/fs/btrfs/tree-log.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/tree-log.c	2020-01-04 07:41:15.000000000 -0500
@@ -5702,9 +5702,28 @@ again:
 		wc.replay_dest = btrfs_read_fs_root_no_name(fs_info, &tmp_key);
 		if (IS_ERR(wc.replay_dest)) {
 			ret = PTR_ERR(wc.replay_dest);
+
+			/*
+			 * We didn't find the subvol, likely because it was
+			 * deleted.  This is ok, simply skip this log and go to
+			 * the next one.
+			 *
+			 * We need to exclude the root because we can't have
+			 * other log replays overwriting this log as we'll read
+			 * it back in a few more times.  This will keep our
+			 * block from being modified, and we'll just bail for
+			 * each subsequent pass.
+			 */
+			if (ret == -ENOENT)
+				ret = btrfs_pin_extent_for_log_replay(fs_info->extent_root,
+							log->node->start,
+							log->node->len);
 			free_extent_buffer(log->node);
 			free_extent_buffer(log->commit_root);
 			kfree(log);
+
+			if (!ret)
+				goto next;
 			btrfs_handle_fs_error(fs_info, ret,
 				"Couldn't read target root for tree log recovery.");
 			goto error;
@@ -5736,7 +5755,6 @@ again:
 						  &root->highest_objectid);
 		}
 
-		key.offset = found_key.offset - 1;
 		wc.replay_dest->log_root = NULL;
 		free_extent_buffer(log->node);
 		free_extent_buffer(log->commit_root);
@@ -5744,9 +5762,10 @@ again:
 
 		if (ret)
 			goto error;
-
+next:
 		if (found_key.offset == 0)
 			break;
+		key.offset = found_key.offset - 1;
 	}
 	btrfs_release_path(path);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/btrfs/uuid-tree.c linux-libre-4.9.208-gnu/fs/btrfs/uuid-tree.c
--- linux-libre-4.9.207-gnu/fs/btrfs/uuid-tree.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/btrfs/uuid-tree.c	2020-01-04 07:41:15.000000000 -0500
@@ -335,6 +335,8 @@ again_search_slot:
 				}
 				if (ret < 0 && ret != -ENOENT)
 					goto out;
+				key.offset++;
+				goto again_search_slot;
 			}
 			item_size -= sizeof(subid_le);
 			offset += sizeof(subid_le);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/ext4/dir.c linux-libre-4.9.208-gnu/fs/ext4/dir.c
--- linux-libre-4.9.207-gnu/fs/ext4/dir.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/ext4/dir.c	2020-01-04 07:41:15.000000000 -0500
@@ -75,6 +75,11 @@ int __ext4_check_dir_entry(const char *f
 		error_msg = "rec_len is too small for name_len";
 	else if (unlikely(((char *) de - buf) + rlen > size))
 		error_msg = "directory entry overrun";
+	else if (unlikely(((char *) de - buf) + rlen >
+			  size - EXT4_DIR_REC_LEN(1) &&
+			  ((char *) de - buf) + rlen != size)) {
+		error_msg = "directory entry too close to block end";
+	}
 	else if (unlikely(le32_to_cpu(de->inode) >
 			le32_to_cpu(EXT4_SB(dir->i_sb)->s_es->s_inodes_count)))
 		error_msg = "inode out of bounds";
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/ext4/namei.c linux-libre-4.9.208-gnu/fs/ext4/namei.c
--- linux-libre-4.9.207-gnu/fs/ext4/namei.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/ext4/namei.c	2020-01-04 07:41:15.000000000 -0500
@@ -2721,7 +2721,7 @@ bool ext4_empty_dir(struct inode *inode)
 {
 	unsigned int offset;
 	struct buffer_head *bh;
-	struct ext4_dir_entry_2 *de, *de1;
+	struct ext4_dir_entry_2 *de;
 	struct super_block *sb;
 
 	if (ext4_has_inline_data(inode)) {
@@ -2746,19 +2746,25 @@ bool ext4_empty_dir(struct inode *inode)
 		return true;
 
 	de = (struct ext4_dir_entry_2 *) bh->b_data;
-	de1 = ext4_next_entry(de, sb->s_blocksize);
-	if (le32_to_cpu(de->inode) != inode->i_ino ||
-			le32_to_cpu(de1->inode) == 0 ||
-			strcmp(".", de->name) || strcmp("..", de1->name)) {
-		ext4_warning_inode(inode, "directory missing '.' and/or '..'");
+	if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data, bh->b_size,
+				 0) ||
+	    le32_to_cpu(de->inode) != inode->i_ino || strcmp(".", de->name)) {
+		ext4_warning_inode(inode, "directory missing '.'");
 		brelse(bh);
 		return true;
 	}
-	offset = ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize) +
-		 ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize);
-	de = ext4_next_entry(de1, sb->s_blocksize);
+	offset = ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize);
+	de = ext4_next_entry(de, sb->s_blocksize);
+	if (ext4_check_dir_entry(inode, NULL, de, bh, bh->b_data, bh->b_size,
+				 offset) ||
+	    le32_to_cpu(de->inode) == 0 || strcmp("..", de->name)) {
+		ext4_warning_inode(inode, "directory missing '..'");
+		brelse(bh);
+		return true;
+	}
+	offset += ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize);
 	while (offset < inode->i_size) {
-		if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
+		if (!(offset & (sb->s_blocksize - 1))) {
 			unsigned int lblock;
 			brelse(bh);
 			lblock = offset >> EXT4_BLOCK_SIZE_BITS(sb);
@@ -2769,12 +2775,11 @@ bool ext4_empty_dir(struct inode *inode)
 			}
 			if (IS_ERR(bh))
 				return true;
-			de = (struct ext4_dir_entry_2 *) bh->b_data;
 		}
+		de = (struct ext4_dir_entry_2 *) (bh->b_data +
+					(offset & (sb->s_blocksize - 1)));
 		if (ext4_check_dir_entry(inode, NULL, de, bh,
 					 bh->b_data, bh->b_size, offset)) {
-			de = (struct ext4_dir_entry_2 *)(bh->b_data +
-							 sb->s_blocksize);
 			offset = (offset | (sb->s_blocksize - 1)) + 1;
 			continue;
 		}
@@ -2783,7 +2788,6 @@ bool ext4_empty_dir(struct inode *inode)
 			return false;
 		}
 		offset += ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize);
-		de = ext4_next_entry(de, sb->s_blocksize);
 	}
 	brelse(bh);
 	return true;
@@ -3078,18 +3082,17 @@ static int ext4_unlink(struct inode *dir
 	if (IS_DIRSYNC(dir))
 		ext4_handle_sync(handle);
 
-	if (inode->i_nlink == 0) {
-		ext4_warning_inode(inode, "Deleting file '%.*s' with no links",
-				   dentry->d_name.len, dentry->d_name.name);
-		set_nlink(inode, 1);
-	}
 	retval = ext4_delete_entry(handle, dir, de, bh);
 	if (retval)
 		goto end_unlink;
 	dir->i_ctime = dir->i_mtime = ext4_current_time(dir);
 	ext4_update_dx_flag(dir);
 	ext4_mark_inode_dirty(handle, dir);
-	drop_nlink(inode);
+	if (inode->i_nlink == 0)
+		ext4_warning_inode(inode, "Deleting file '%.*s' with no links",
+				   dentry->d_name.len, dentry->d_name.name);
+	else
+		drop_nlink(inode);
 	if (!inode->i_nlink)
 		ext4_orphan_add(handle, inode);
 	inode->i_ctime = ext4_current_time(inode);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/jbd2/commit.c linux-libre-4.9.208-gnu/fs/jbd2/commit.c
--- linux-libre-4.9.207-gnu/fs/jbd2/commit.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/jbd2/commit.c	2020-01-04 07:41:15.000000000 -0500
@@ -722,7 +722,6 @@ start_journal_io:
 				submit_bh(REQ_OP_WRITE, WRITE_SYNC, bh);
 			}
 			cond_resched();
-			stats.run.rs_blocks_logged += bufs;
 
 			/* Force a new descriptor to be generated next
                            time round the loop. */
@@ -809,6 +808,7 @@ start_journal_io:
 		if (unlikely(!buffer_uptodate(bh)))
 			err = -EIO;
 		jbd2_unfile_log_bh(bh);
+		stats.run.rs_blocks_logged++;
 
 		/*
 		 * The list contains temporary buffer heads created by
@@ -854,6 +854,7 @@ start_journal_io:
 		BUFFER_TRACE(bh, "ph5: control buffer writeout done: unfile");
 		clear_buffer_jwrite(bh);
 		jbd2_unfile_log_bh(bh);
+		stats.run.rs_blocks_logged++;
 		__brelse(bh);		/* One for getblk */
 		/* AKPM: bforget here */
 	}
@@ -875,6 +876,7 @@ start_journal_io:
 	}
 	if (cbh)
 		err = journal_wait_on_commit_record(journal, cbh);
+	stats.run.rs_blocks_logged++;
 	if (jbd2_has_feature_async_commit(journal) &&
 	    journal->j_flags & JBD2_BARRIER) {
 		blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/ocfs2/acl.c linux-libre-4.9.208-gnu/fs/ocfs2/acl.c
--- linux-libre-4.9.207-gnu/fs/ocfs2/acl.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/ocfs2/acl.c	2020-01-04 07:41:15.000000000 -0500
@@ -338,8 +338,8 @@ int ocfs2_acl_chmod(struct inode *inode,
 	down_read(&OCFS2_I(inode)->ip_xattr_sem);
 	acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh);
 	up_read(&OCFS2_I(inode)->ip_xattr_sem);
-	if (IS_ERR(acl) || !acl)
-		return PTR_ERR(acl);
+	if (IS_ERR_OR_NULL(acl))
+		return PTR_ERR_OR_ZERO(acl);
 	ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
 	if (ret)
 		return ret;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/quota/dquot.c linux-libre-4.9.208-gnu/fs/quota/dquot.c
--- linux-libre-4.9.207-gnu/fs/quota/dquot.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/quota/dquot.c	2020-01-04 07:41:15.000000000 -0500
@@ -2849,68 +2849,73 @@ EXPORT_SYMBOL(dquot_quotactl_sysfile_ops
 static int do_proc_dqstats(struct ctl_table *table, int write,
 		     void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-	unsigned int type = (int *)table->data - dqstats.stat;
+	unsigned int type = (unsigned long *)table->data - dqstats.stat;
+	s64 value = percpu_counter_sum(&dqstats.counter[type]);
+
+	/* Filter negative values for non-monotonic counters */
+	if (value < 0 && (type == DQST_ALLOC_DQUOTS ||
+			  type == DQST_FREE_DQUOTS))
+		value = 0;
 
 	/* Update global table */
-	dqstats.stat[type] =
-			percpu_counter_sum_positive(&dqstats.counter[type]);
-	return proc_dointvec(table, write, buffer, lenp, ppos);
+	dqstats.stat[type] = value;
+	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 }
 
 static struct ctl_table fs_dqstats_table[] = {
 	{
 		.procname	= "lookups",
 		.data		= &dqstats.stat[DQST_LOOKUPS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "drops",
 		.data		= &dqstats.stat[DQST_DROPS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "reads",
 		.data		= &dqstats.stat[DQST_READS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "writes",
 		.data		= &dqstats.stat[DQST_WRITES],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "cache_hits",
 		.data		= &dqstats.stat[DQST_CACHE_HITS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "allocated_dquots",
 		.data		= &dqstats.stat[DQST_ALLOC_DQUOTS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "free_dquots",
 		.data		= &dqstats.stat[DQST_FREE_DQUOTS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
 	{
 		.procname	= "syncs",
 		.data		= &dqstats.stat[DQST_SYNCS],
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0444,
 		.proc_handler	= do_proc_dqstats,
 	},
diff -druNp --no-dereference linux-libre-4.9.207-gnu/fs/readdir.c linux-libre-4.9.208-gnu/fs/readdir.c
--- linux-libre-4.9.207-gnu/fs/readdir.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/fs/readdir.c	2020-01-04 07:41:15.000000000 -0500
@@ -64,6 +64,40 @@ out:
 EXPORT_SYMBOL(iterate_dir);
 
 /*
+ * POSIX says that a dirent name cannot contain NULL or a '/'.
+ *
+ * It's not 100% clear what we should really do in this case.
+ * The filesystem is clearly corrupted, but returning a hard
+ * error means that you now don't see any of the other names
+ * either, so that isn't a perfect alternative.
+ *
+ * And if you return an error, what error do you use? Several
+ * filesystems seem to have decided on EUCLEAN being the error
+ * code for EFSCORRUPTED, and that may be the error to use. Or
+ * just EIO, which is perhaps more obvious to users.
+ *
+ * In order to see the other file names in the directory, the
+ * caller might want to make this a "soft" error: skip the
+ * entry, and return the error at the end instead.
+ *
+ * Note that this should likely do a "memchr(name, 0, len)"
+ * check too, since that would be filesystem corruption as
+ * well. However, that case can't actually confuse user space,
+ * which has to do a strlen() on the name anyway to find the
+ * filename length, and the above "soft error" worry means
+ * that it's probably better left alone until we have that
+ * issue clarified.
+ */
+static int verify_dirent_name(const char *name, int len)
+{
+	if (!len)
+		return -EIO;
+	if (memchr(name, '/', len))
+		return -EIO;
+	return 0;
+}
+
+/*
  * Traditional linux readdir() handling..
  *
  * "count=1" is a special case, meaning that the buffer is one
@@ -172,6 +206,9 @@ static int filldir(struct dir_context *c
 	int reclen = ALIGN(offsetof(struct linux_dirent, d_name) + namlen + 2,
 		sizeof(long));
 
+	buf->error = verify_dirent_name(name, namlen);
+	if (unlikely(buf->error))
+		return buf->error;
 	buf->error = -EINVAL;	/* only used if we fail.. */
 	if (reclen > buf->count)
 		return -EINVAL;
@@ -258,6 +295,9 @@ static int filldir64(struct dir_context
 	int reclen = ALIGN(offsetof(struct linux_dirent64, d_name) + namlen + 1,
 		sizeof(u64));
 
+	buf->error = verify_dirent_name(name, namlen);
+	if (unlikely(buf->error))
+		return buf->error;
 	buf->error = -EINVAL;	/* only used if we fail.. */
 	if (reclen > buf->count)
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/drm/drm_dp_mst_helper.h linux-libre-4.9.208-gnu/include/drm/drm_dp_mst_helper.h
--- linux-libre-4.9.207-gnu/include/drm/drm_dp_mst_helper.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/drm/drm_dp_mst_helper.h	2020-01-04 07:41:15.000000000 -0500
@@ -312,7 +312,7 @@ struct drm_dp_resource_status_notify {
 
 struct drm_dp_query_payload_ack_reply {
 	u8 port_number;
-	u8 allocated_pbn;
+	u16 allocated_pbn;
 };
 
 struct drm_dp_sideband_msg_req_body {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/cec-funcs.h linux-libre-4.9.208-gnu/include/linux/cec-funcs.h
--- linux-libre-4.9.207-gnu/include/linux/cec-funcs.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/cec-funcs.h	2020-01-04 07:41:15.000000000 -0500
@@ -956,7 +956,8 @@ static inline void cec_msg_give_deck_sta
 	msg->len = 3;
 	msg->msg[1] = CEC_MSG_GIVE_DECK_STATUS;
 	msg->msg[2] = status_req;
-	msg->reply = reply ? CEC_MSG_DECK_STATUS : 0;
+	msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ?
+				CEC_MSG_DECK_STATUS : 0;
 }
 
 static inline void cec_ops_give_deck_status(const struct cec_msg *msg,
@@ -1060,7 +1061,8 @@ static inline void cec_msg_give_tuner_de
 	msg->len = 3;
 	msg->msg[1] = CEC_MSG_GIVE_TUNER_DEVICE_STATUS;
 	msg->msg[2] = status_req;
-	msg->reply = reply ? CEC_MSG_TUNER_DEVICE_STATUS : 0;
+	msg->reply = (reply && status_req != CEC_OP_STATUS_REQ_OFF) ?
+				CEC_MSG_TUNER_DEVICE_STATUS : 0;
 }
 
 static inline void cec_ops_give_tuner_device_status(const struct cec_msg *msg,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/hrtimer.h linux-libre-4.9.208-gnu/include/linux/hrtimer.h
--- linux-libre-4.9.207-gnu/include/linux/hrtimer.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/hrtimer.h	2020-01-04 07:41:15.000000000 -0500
@@ -424,12 +424,18 @@ extern u64 hrtimer_get_next_event(void);
 
 extern bool hrtimer_active(const struct hrtimer *timer);
 
-/*
- * Helper function to check, whether the timer is on one of the queues
+/**
+ * hrtimer_is_queued = check, whether the timer is on one of the queues
+ * @timer:	Timer to check
+ *
+ * Returns: True if the timer is queued, false otherwise
+ *
+ * The function can be used lockless, but it gives only a current snapshot.
  */
-static inline int hrtimer_is_queued(struct hrtimer *timer)
+static inline bool hrtimer_is_queued(struct hrtimer *timer)
 {
-	return timer->state & HRTIMER_STATE_ENQUEUED;
+	/* The READ_ONCE pairs with the update functions of timer->state */
+	return !!(READ_ONCE(timer->state) & HRTIMER_STATE_ENQUEUED);
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/libfdt_env.h linux-libre-4.9.208-gnu/include/linux/libfdt_env.h
--- linux-libre-4.9.207-gnu/include/linux/libfdt_env.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/libfdt_env.h	2020-01-04 07:41:15.000000000 -0500
@@ -6,6 +6,9 @@
 
 #include <asm/byteorder.h>
 
+#define INT32_MAX	S32_MAX
+#define UINT32_MAX	U32_MAX
+
 typedef __be16 fdt16_t;
 typedef __be32 fdt32_t;
 typedef __be64 fdt64_t;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/mod_devicetable.h linux-libre-4.9.208-gnu/include/linux/mod_devicetable.h
--- linux-libre-4.9.207-gnu/include/linux/mod_devicetable.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/mod_devicetable.h	2020-01-04 07:41:15.000000000 -0500
@@ -502,9 +502,9 @@ struct platform_device_id {
 
 #define MDIO_MODULE_PREFIX	"mdio:"
 
-#define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"
+#define MDIO_ID_FMT "%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u%u"
 #define MDIO_ID_ARGS(_id) \
-	(_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1,	\
+	((_id)>>31) & 1, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \
 	((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \
 	((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \
 	((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/quota.h linux-libre-4.9.208-gnu/include/linux/quota.h
--- linux-libre-4.9.207-gnu/include/linux/quota.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/quota.h	2020-01-04 07:41:15.000000000 -0500
@@ -263,7 +263,7 @@ enum {
 };
 
 struct dqstats {
-	int stat[_DQST_DQSTAT_LAST];
+	unsigned long stat[_DQST_DQSTAT_LAST];
 	struct percpu_counter counter[_DQST_DQSTAT_LAST];
 };
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/linux/rculist_nulls.h linux-libre-4.9.208-gnu/include/linux/rculist_nulls.h
--- linux-libre-4.9.207-gnu/include/linux/rculist_nulls.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/linux/rculist_nulls.h	2020-01-04 07:41:15.000000000 -0500
@@ -100,6 +100,43 @@ static inline void hlist_nulls_add_head_
 }
 
 /**
+ * hlist_nulls_add_tail_rcu
+ * @n: the element to add to the hash list.
+ * @h: the list to add to.
+ *
+ * Description:
+ * Adds the specified element to the specified hlist_nulls,
+ * while permitting racing traversals.
+ *
+ * The caller must take whatever precautions are necessary
+ * (such as holding appropriate locks) to avoid racing
+ * with another list-mutation primitive, such as hlist_nulls_add_head_rcu()
+ * or hlist_nulls_del_rcu(), running on this same list.
+ * However, it is perfectly legal to run concurrently with
+ * the _rcu list-traversal primitives, such as
+ * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency
+ * problems on Alpha CPUs.  Regardless of the type of CPU, the
+ * list-traversal primitive must be guarded by rcu_read_lock().
+ */
+static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
+					    struct hlist_nulls_head *h)
+{
+	struct hlist_nulls_node *i, *last = NULL;
+
+	/* Note: write side code, so rcu accessors are not needed. */
+	for (i = h->first; !is_a_nulls(i); i = i->next)
+		last = i;
+
+	if (last) {
+		n->next = last->next;
+		n->pprev = &last->next;
+		rcu_assign_pointer(hlist_next_rcu(last), n);
+	} else {
+		hlist_nulls_add_head_rcu(n, h);
+	}
+}
+
+/**
  * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
  * @tpos:	the type * to use as a loop cursor.
  * @pos:	the &struct hlist_nulls_node to use as a loop cursor.
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/net/dst.h linux-libre-4.9.208-gnu/include/net/dst.h
--- linux-libre-4.9.207-gnu/include/net/dst.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/net/dst.h	2020-01-04 07:41:15.000000000 -0500
@@ -110,7 +110,7 @@ struct dst_entry {
 struct dst_metrics {
 	u32		metrics[RTAX_MAX];
 	atomic_t	refcnt;
-};
+} __aligned(4);		/* Low pointer bits contain DST_METRICS_FLAGS */
 extern const struct dst_metrics dst_default_metrics;
 
 u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/net/inet_hashtables.h linux-libre-4.9.208-gnu/include/net/inet_hashtables.h
--- linux-libre-4.9.207-gnu/include/net/inet_hashtables.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/net/inet_hashtables.h	2020-01-04 07:41:15.000000000 -0500
@@ -98,12 +98,18 @@ struct inet_bind_hashbucket {
 	struct hlist_head	chain;
 };
 
-/*
- * Sockets can be hashed in established or listening table
+/* Sockets can be hashed in established or listening table.
+ * We must use different 'nulls' end-of-chain value for all hash buckets :
+ * A socket might transition from ESTABLISH to LISTEN state without
+ * RCU grace period. A lookup in ehash table needs to handle this case.
  */
+#define LISTENING_NULLS_BASE (1U << 29)
 struct inet_listen_hashbucket {
 	spinlock_t		lock;
-	struct hlist_head	head;
+	union {
+		struct hlist_head	head;
+		struct hlist_nulls_head	nulls_head;
+	};
 };
 
 /* This is for listening sockets, thus all sockets which possess wildcards. */
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/net/sock.h linux-libre-4.9.208-gnu/include/net/sock.h
--- linux-libre-4.9.207-gnu/include/net/sock.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/net/sock.h	2020-01-04 07:41:15.000000000 -0500
@@ -661,6 +661,11 @@ static inline void __sk_nulls_add_node_r
 	hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);
 }
 
+static inline void __sk_nulls_add_node_tail_rcu(struct sock *sk, struct hlist_nulls_head *list)
+{
+	hlist_nulls_add_tail_rcu(&sk->sk_nulls_node, list);
+}
+
 static inline void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
 {
 	sock_hold(sk);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/include/scsi/iscsi_proto.h linux-libre-4.9.208-gnu/include/scsi/iscsi_proto.h
--- linux-libre-4.9.207-gnu/include/scsi/iscsi_proto.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/include/scsi/iscsi_proto.h	2020-01-04 07:41:15.000000000 -0500
@@ -638,6 +638,7 @@ struct iscsi_reject {
 #define ISCSI_REASON_BOOKMARK_INVALID	9
 #define ISCSI_REASON_BOOKMARK_NO_RESOURCES	10
 #define ISCSI_REASON_NEGOTIATION_RESET	11
+#define ISCSI_REASON_WAITING_FOR_LOGOUT	12
 
 /* Max. number of Key=Value pairs in a text message */
 #define MAX_KEY_VALUE_PAIRS	8192
diff -druNp --no-dereference linux-libre-4.9.207-gnu/kernel/sysctl.c linux-libre-4.9.208-gnu/kernel/sysctl.c
--- linux-libre-4.9.207-gnu/kernel/sysctl.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/kernel/sysctl.c	2020-01-04 07:41:15.000000000 -0500
@@ -1398,7 +1398,7 @@ static struct ctl_table vm_table[] = {
 		.procname	= "drop_caches",
 		.data		= &sysctl_drop_caches,
 		.maxlen		= sizeof(int),
-		.mode		= 0644,
+		.mode		= 0200,
 		.proc_handler	= drop_caches_sysctl_handler,
 		.extra1		= &one,
 		.extra2		= &four,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/kernel/time/hrtimer.c linux-libre-4.9.208-gnu/kernel/time/hrtimer.c
--- linux-libre-4.9.207-gnu/kernel/time/hrtimer.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/kernel/time/hrtimer.c	2020-01-04 07:41:15.000000000 -0500
@@ -870,7 +870,8 @@ static int enqueue_hrtimer(struct hrtime
 
 	base->cpu_base->active_bases |= 1 << base->index;
 
-	timer->state = HRTIMER_STATE_ENQUEUED;
+	/* Pairs with the lockless read in hrtimer_is_queued() */
+	WRITE_ONCE(timer->state, HRTIMER_STATE_ENQUEUED);
 
 	return timerqueue_add(&base->active, &timer->node);
 }
@@ -892,7 +893,8 @@ static void __remove_hrtimer(struct hrti
 	struct hrtimer_cpu_base *cpu_base = base->cpu_base;
 	u8 state = timer->state;
 
-	timer->state = newstate;
+	/* Pairs with the lockless read in hrtimer_is_queued() */
+	WRITE_ONCE(timer->state, newstate);
 	if (!(state & HRTIMER_STATE_ENQUEUED))
 		return;
 
@@ -919,8 +921,9 @@ static void __remove_hrtimer(struct hrti
 static inline int
 remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, bool restart)
 {
-	if (hrtimer_is_queued(timer)) {
-		u8 state = timer->state;
+	u8 state = timer->state;
+
+	if (state & HRTIMER_STATE_ENQUEUED) {
 		int reprogram;
 
 		/*
diff -druNp --no-dereference linux-libre-4.9.207-gnu/lib/dma-debug.c linux-libre-4.9.208-gnu/lib/dma-debug.c
--- linux-libre-4.9.207-gnu/lib/dma-debug.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/lib/dma-debug.c	2020-01-04 07:41:15.000000000 -0500
@@ -435,6 +435,7 @@ void debug_dma_dump_mappings(struct devi
 		}
 
 		spin_unlock_irqrestore(&bucket->lock, flags);
+		cond_resched();
 	}
 }
 EXPORT_SYMBOL(debug_dma_dump_mappings);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/Makefile linux-libre-4.9.208-gnu/Makefile
--- linux-libre-4.9.207-gnu/Makefile	2019-12-22 01:00:47.000000000 -0500
+++ linux-libre-4.9.208-gnu/Makefile	2020-01-04 11:31:08.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 207
+SUBLEVEL = 208
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/bluetooth/hci_core.c linux-libre-4.9.208-gnu/net/bluetooth/hci_core.c
--- linux-libre-4.9.207-gnu/net/bluetooth/hci_core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/bluetooth/hci_core.c	2020-01-04 07:41:15.000000000 -0500
@@ -4180,7 +4180,14 @@ static void hci_rx_work(struct work_stru
 			hci_send_to_sock(hdev, skb);
 		}
 
-		if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL)) {
+		/* If the device has been opened in HCI_USER_CHANNEL,
+		 * the userspace has exclusive access to device.
+		 * When device is HCI_INIT, we still need to process
+		 * the data packets to the driver in order
+		 * to complete its setup().
+		 */
+		if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
+		    !test_bit(HCI_INIT, &hdev->flags)) {
 			kfree_skb(skb);
 			continue;
 		}
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/bluetooth/hci_request.c linux-libre-4.9.208-gnu/net/bluetooth/hci_request.c
--- linux-libre-4.9.207-gnu/net/bluetooth/hci_request.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/bluetooth/hci_request.c	2020-01-04 07:41:15.000000000 -0500
@@ -1093,6 +1093,14 @@ static u8 create_instance_adv_data(struc
 
 	instance_flags = get_adv_instance_flags(hdev, instance);
 
+	/* If instance already has the flags set skip adding it once
+	 * again.
+	 */
+	if (adv_instance && eir_get_data(adv_instance->adv_data,
+					 adv_instance->adv_data_len, EIR_FLAGS,
+					 NULL))
+		goto skip_flags;
+
 	/* The Add Advertising command allows userspace to set both the general
 	 * and limited discoverable flags.
 	 */
@@ -1125,6 +1133,7 @@ static u8 create_instance_adv_data(struc
 		}
 	}
 
+skip_flags:
 	if (adv_instance) {
 		memcpy(ptr, adv_instance->adv_data,
 		       adv_instance->adv_data_len);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/bridge/br_netfilter_hooks.c linux-libre-4.9.208-gnu/net/bridge/br_netfilter_hooks.c
--- linux-libre-4.9.207-gnu/net/bridge/br_netfilter_hooks.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/bridge/br_netfilter_hooks.c	2020-01-04 07:41:15.000000000 -0500
@@ -643,6 +643,9 @@ static unsigned int br_nf_forward_arp(vo
 		nf_bridge_pull_encap_header(skb);
 	}
 
+	if (unlikely(!pskb_may_pull(skb, sizeof(struct arphdr))))
+		return NF_DROP;
+
 	if (arp_hdr(skb)->ar_pln != 4) {
 		if (IS_VLAN_ARP(skb))
 			nf_bridge_push_encap_header(skb);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/bridge/netfilter/ebtables.c linux-libre-4.9.208-gnu/net/bridge/netfilter/ebtables.c
--- linux-libre-4.9.207-gnu/net/bridge/netfilter/ebtables.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/bridge/netfilter/ebtables.c	2020-01-04 07:41:15.000000000 -0500
@@ -1894,7 +1894,7 @@ static int ebt_buf_count(struct ebt_entr
 }
 
 static int ebt_buf_add(struct ebt_entries_buf_state *state,
-		       void *data, unsigned int sz)
+		       const void *data, unsigned int sz)
 {
 	if (state->buf_kern_start == NULL)
 		goto count_only;
@@ -1928,7 +1928,7 @@ enum compat_mwt {
 	EBT_COMPAT_TARGET,
 };
 
-static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
+static int compat_mtw_from_user(const struct compat_ebt_entry_mwt *mwt,
 				enum compat_mwt compat_mwt,
 				struct ebt_entries_buf_state *state,
 				const unsigned char *base)
@@ -2004,22 +2004,23 @@ static int compat_mtw_from_user(struct c
 /* return size of all matches, watchers or target, including necessary
  * alignment and padding.
  */
-static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32,
+static int ebt_size_mwt(const struct compat_ebt_entry_mwt *match32,
 			unsigned int size_left, enum compat_mwt type,
 			struct ebt_entries_buf_state *state, const void *base)
 {
+	const char *buf = (const char *)match32;
 	int growth = 0;
-	char *buf;
 
 	if (size_left == 0)
 		return 0;
 
-	buf = (char *) match32;
-
-	while (size_left >= sizeof(*match32)) {
+	do {
 		struct ebt_entry_match *match_kern;
 		int ret;
 
+		if (size_left < sizeof(*match32))
+			return -EINVAL;
+
 		match_kern = (struct ebt_entry_match *) state->buf_kern_start;
 		if (match_kern) {
 			char *tmp;
@@ -2056,22 +2057,18 @@ static int ebt_size_mwt(struct compat_eb
 		if (match_kern)
 			match_kern->match_size = ret;
 
-		/* rule should have no remaining data after target */
-		if (type == EBT_COMPAT_TARGET && size_left)
-			return -EINVAL;
-
 		match32 = (struct compat_ebt_entry_mwt *) buf;
-	}
+	} while (size_left);
 
 	return growth;
 }
 
 /* called for all ebt_entry structures. */
-static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
+static int size_entry_mwt(const struct ebt_entry *entry, const unsigned char *base,
 			  unsigned int *total,
 			  struct ebt_entries_buf_state *state)
 {
-	unsigned int i, j, startoff, new_offset = 0;
+	unsigned int i, j, startoff, next_expected_off, new_offset = 0;
 	/* stores match/watchers/targets & offset of next struct ebt_entry: */
 	unsigned int offsets[4];
 	unsigned int *offsets_update = NULL;
@@ -2158,11 +2155,13 @@ static int size_entry_mwt(struct ebt_ent
 			return ret;
 	}
 
-	startoff = state->buf_user_offset - startoff;
+	next_expected_off = state->buf_user_offset - startoff;
+	if (next_expected_off != entry->next_offset)
+		return -EINVAL;
 
-	if (WARN_ON(*total < startoff))
+	if (*total < entry->next_offset)
 		return -EINVAL;
-	*total -= startoff;
+	*total -= entry->next_offset;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/core/sysctl_net_core.c linux-libre-4.9.208-gnu/net/core/sysctl_net_core.c
--- linux-libre-4.9.207-gnu/net/core/sysctl_net_core.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/core/sysctl_net_core.c	2020-01-04 07:41:15.000000000 -0500
@@ -255,6 +255,7 @@ static int proc_dointvec_minmax_bpf_enab
 	return ret;
 }
 
+# ifdef CONFIG_HAVE_EBPF_JIT
 static int
 proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write,
 				    void __user *buffer, size_t *lenp,
@@ -265,6 +266,7 @@ proc_dointvec_minmax_bpf_restricted(stru
 
 	return proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 }
+# endif /* CONFIG_HAVE_EBPF_JIT */
 
 static int
 proc_dolongvec_minmax_bpf_restricted(struct ctl_table *table, int write,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv4/icmp.c linux-libre-4.9.208-gnu/net/ipv4/icmp.c
--- linux-libre-4.9.207-gnu/net/ipv4/icmp.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv4/icmp.c	2020-01-04 07:41:15.000000000 -0500
@@ -256,10 +256,11 @@ bool icmp_global_allow(void)
 	bool rc = false;
 
 	/* Check if token bucket is empty and cannot be refilled
-	 * without taking the spinlock.
+	 * without taking the spinlock. The READ_ONCE() are paired
+	 * with the following WRITE_ONCE() in this same function.
 	 */
-	if (!icmp_global.credit) {
-		delta = min_t(u32, now - icmp_global.stamp, HZ);
+	if (!READ_ONCE(icmp_global.credit)) {
+		delta = min_t(u32, now - READ_ONCE(icmp_global.stamp), HZ);
 		if (delta < HZ / 50)
 			return false;
 	}
@@ -269,14 +270,14 @@ bool icmp_global_allow(void)
 	if (delta >= HZ / 50) {
 		incr = sysctl_icmp_msgs_per_sec * delta / HZ ;
 		if (incr)
-			icmp_global.stamp = now;
+			WRITE_ONCE(icmp_global.stamp, now);
 	}
 	credit = min_t(u32, icmp_global.credit + incr, sysctl_icmp_msgs_burst);
 	if (credit) {
 		credit--;
 		rc = true;
 	}
-	icmp_global.credit = credit;
+	WRITE_ONCE(icmp_global.credit, credit);
 	spin_unlock(&icmp_global.lock);
 	return rc;
 }
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv4/inet_diag.c linux-libre-4.9.208-gnu/net/ipv4/inet_diag.c
--- linux-libre-4.9.207-gnu/net/ipv4/inet_diag.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv4/inet_diag.c	2020-01-04 07:41:15.000000000 -0500
@@ -868,12 +868,13 @@ void inet_diag_dump_icsk(struct inet_has
 
 		for (i = s_i; i < INET_LHTABLE_SIZE; i++) {
 			struct inet_listen_hashbucket *ilb;
+			struct hlist_nulls_node *node;
 			struct sock *sk;
 
 			num = 0;
 			ilb = &hashinfo->listening_hash[i];
 			spin_lock_bh(&ilb->lock);
-			sk_for_each(sk, &ilb->head) {
+			sk_nulls_for_each(sk, node, &ilb->nulls_head) {
 				struct inet_sock *inet = inet_sk(sk);
 
 				if (!net_eq(sock_net(sk), net))
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv4/inet_hashtables.c linux-libre-4.9.208-gnu/net/ipv4/inet_hashtables.c
--- linux-libre-4.9.207-gnu/net/ipv4/inet_hashtables.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv4/inet_hashtables.c	2020-01-04 07:41:15.000000000 -0500
@@ -218,9 +218,10 @@ struct sock *__inet_lookup_listener(stru
 	int score, hiscore = 0, matches = 0, reuseport = 0;
 	bool exact_dif = inet_exact_dif_match(net, skb);
 	struct sock *sk, *result = NULL;
+	struct hlist_nulls_node *node;
 	u32 phash = 0;
 
-	sk_for_each_rcu(sk, &ilb->head) {
+	sk_nulls_for_each_rcu(sk, node, &ilb->nulls_head) {
 		score = compute_score(sk, net, hnum, daddr, dif, exact_dif);
 		if (score > hiscore) {
 			reuseport = sk->sk_reuseport;
@@ -441,10 +442,11 @@ static int inet_reuseport_add_sock(struc
 						     bool match_wildcard))
 {
 	struct inet_bind_bucket *tb = inet_csk(sk)->icsk_bind_hash;
+	const struct hlist_nulls_node *node;
 	struct sock *sk2;
 	kuid_t uid = sock_i_uid(sk);
 
-	sk_for_each_rcu(sk2, &ilb->head) {
+	sk_nulls_for_each_rcu(sk2, node, &ilb->nulls_head) {
 		if (sk2 != sk &&
 		    sk2->sk_family == sk->sk_family &&
 		    ipv6_only_sock(sk2) == ipv6_only_sock(sk) &&
@@ -482,9 +484,9 @@ int __inet_hash(struct sock *sk, struct
 	}
 	if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
 		sk->sk_family == AF_INET6)
-		hlist_add_tail_rcu(&sk->sk_node, &ilb->head);
+		__sk_nulls_add_node_tail_rcu(sk, &ilb->nulls_head);
 	else
-		hlist_add_head_rcu(&sk->sk_node, &ilb->head);
+		__sk_nulls_add_node_rcu(sk, &ilb->nulls_head);
 	sock_set_flag(sk, SOCK_RCU_FREE);
 	sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
 unlock:
@@ -527,10 +529,7 @@ void inet_unhash(struct sock *sk)
 	spin_lock_bh(lock);
 	if (rcu_access_pointer(sk->sk_reuseport_cb))
 		reuseport_detach_sock(sk);
-	if (listener)
-		done = __sk_del_node_init(sk);
-	else
-		done = __sk_nulls_del_node_init_rcu(sk);
+	done = __sk_nulls_del_node_init_rcu(sk);
 	if (done)
 		sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
 	spin_unlock_bh(lock);
@@ -666,7 +665,8 @@ void inet_hashinfo_init(struct inet_hash
 
 	for (i = 0; i < INET_LHTABLE_SIZE; i++) {
 		spin_lock_init(&h->listening_hash[i].lock);
-		INIT_HLIST_HEAD(&h->listening_hash[i].head);
+		INIT_HLIST_NULLS_HEAD(&h->listening_hash[i].nulls_head,
+				      i + LISTENING_NULLS_BASE);
 	}
 }
 EXPORT_SYMBOL_GPL(inet_hashinfo_init);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv4/tcp_ipv4.c linux-libre-4.9.208-gnu/net/ipv4/tcp_ipv4.c
--- linux-libre-4.9.207-gnu/net/ipv4/tcp_ipv4.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv4/tcp_ipv4.c	2020-01-04 07:41:15.000000000 -0500
@@ -1917,13 +1917,14 @@ static void *listening_get_next(struct s
 	struct tcp_iter_state *st = seq->private;
 	struct net *net = seq_file_net(seq);
 	struct inet_listen_hashbucket *ilb;
+	struct hlist_nulls_node *node;
 	struct sock *sk = cur;
 
 	if (!sk) {
 get_head:
 		ilb = &tcp_hashinfo.listening_hash[st->bucket];
 		spin_lock_bh(&ilb->lock);
-		sk = sk_head(&ilb->head);
+		sk = sk_nulls_head(&ilb->nulls_head);
 		st->offset = 0;
 		goto get_sk;
 	}
@@ -1931,9 +1932,9 @@ get_head:
 	++st->num;
 	++st->offset;
 
-	sk = sk_next(sk);
+	sk = sk_nulls_next(sk);
 get_sk:
-	sk_for_each_from(sk) {
+	sk_nulls_for_each_from(sk, node) {
 		if (!net_eq(sock_net(sk), net))
 			continue;
 		if (sk->sk_family == st->family)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv4/tcp_output.c linux-libre-4.9.208-gnu/net/ipv4/tcp_output.c
--- linux-libre-4.9.207-gnu/net/ipv4/tcp_output.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv4/tcp_output.c	2020-01-04 07:41:15.000000000 -0500
@@ -2233,6 +2233,14 @@ static bool tcp_write_xmit(struct sock *
 		if (tcp_small_queue_check(sk, skb, 0))
 			break;
 
+		/* Argh, we hit an empty skb(), presumably a thread
+		 * is sleeping in sendmsg()/sk_stream_wait_memory().
+		 * We do not want to send a pure-ack packet and have
+		 * a strange looking rtx queue with empty packet(s).
+		 */
+		if (TCP_SKB_CB(skb)->end_seq == TCP_SKB_CB(skb)->seq)
+			break;
+
 		if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp)))
 			break;
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/ipv6/inet6_hashtables.c linux-libre-4.9.208-gnu/net/ipv6/inet6_hashtables.c
--- linux-libre-4.9.207-gnu/net/ipv6/inet6_hashtables.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/ipv6/inet6_hashtables.c	2020-01-04 07:41:15.000000000 -0500
@@ -133,9 +133,10 @@ struct sock *inet6_lookup_listener(struc
 	int score, hiscore = 0, matches = 0, reuseport = 0;
 	bool exact_dif = inet6_exact_dif_match(net, skb);
 	struct sock *sk, *result = NULL;
+	struct hlist_nulls_node *node;
 	u32 phash = 0;
 
-	sk_for_each(sk, &ilb->head) {
+	sk_nulls_for_each(sk, node, &ilb->nulls_head) {
 		score = compute_score(sk, net, hnum, daddr, dif, exact_dif);
 		if (score > hiscore) {
 			reuseport = sk->sk_reuseport;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/nfc/nci/uart.c linux-libre-4.9.208-gnu/net/nfc/nci/uart.c
--- linux-libre-4.9.207-gnu/net/nfc/nci/uart.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/nfc/nci/uart.c	2020-01-04 07:41:15.000000000 -0500
@@ -348,7 +348,7 @@ static int nci_uart_default_recv_buf(str
 			nu->rx_packet_len = -1;
 			nu->rx_skb = nci_skb_alloc(nu->ndev,
 						   NCI_MAX_PACKET_SIZE,
-						   GFP_KERNEL);
+						   GFP_ATOMIC);
 			if (!nu->rx_skb)
 				return -ENOMEM;
 		}
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/packet/af_packet.c linux-libre-4.9.208-gnu/net/packet/af_packet.c
--- linux-libre-4.9.207-gnu/net/packet/af_packet.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/packet/af_packet.c	2020-01-04 07:41:15.000000000 -0500
@@ -587,7 +587,8 @@ static int prb_calc_retire_blk_tmo(struc
 			msec = 1;
 			div = ecmd.base.speed / 1000;
 		}
-	}
+	} else
+		return DEFAULT_PRB_RETIRE_TOV;
 
 	mbits = (blk_size_in_bytes * 8) / (1024 * 1024);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/net/sctp/protocol.c linux-libre-4.9.208-gnu/net/sctp/protocol.c
--- linux-libre-4.9.207-gnu/net/sctp/protocol.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/net/sctp/protocol.c	2020-01-04 07:41:15.000000000 -0500
@@ -257,6 +257,7 @@ static void sctp_v4_from_sk(union sctp_a
 	addr->v4.sin_family = AF_INET;
 	addr->v4.sin_port = 0;
 	addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr;
+	memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
 }
 
 /* Initialize sk->sk_rcv_saddr from sctp_addr. */
@@ -279,6 +280,7 @@ static void sctp_v4_from_addr_param(unio
 	addr->v4.sin_family = AF_INET;
 	addr->v4.sin_port = port;
 	addr->v4.sin_addr.s_addr = param->v4.addr.s_addr;
+	memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
 }
 
 /* Initialize an address parameter from a sctp_addr and return the length
@@ -303,6 +305,7 @@ static void sctp_v4_dst_saddr(union sctp
 	saddr->v4.sin_family = AF_INET;
 	saddr->v4.sin_port = port;
 	saddr->v4.sin_addr.s_addr = fl4->saddr;
+	memset(saddr->v4.sin_zero, 0, sizeof(saddr->v4.sin_zero));
 }
 
 /* Compare two addresses exactly. */
@@ -325,6 +328,7 @@ static void sctp_v4_inaddr_any(union sct
 	addr->v4.sin_family = AF_INET;
 	addr->v4.sin_addr.s_addr = htonl(INADDR_ANY);
 	addr->v4.sin_port = port;
+	memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
 }
 
 /* Is this a wildcard address? */
diff -druNp --no-dereference linux-libre-4.9.207-gnu/samples/pktgen/functions.sh linux-libre-4.9.208-gnu/samples/pktgen/functions.sh
--- linux-libre-4.9.207-gnu/samples/pktgen/functions.sh	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/samples/pktgen/functions.sh	2020-01-04 07:41:15.000000000 -0500
@@ -5,6 +5,8 @@
 # Author: Jesper Dangaaard Brouer
 # License: GPL
 
+set -o errexit
+
 ## -- General shell logging cmds --
 function err() {
     local exitcode=$1
@@ -58,6 +60,7 @@ function pg_set() {
 function proc_cmd() {
     local result
     local proc_file=$1
+    local status=0
     # after shift, the remaining args are contained in $@
     shift
     local proc_ctrl=${PROC_DIR}/$proc_file
@@ -73,13 +76,13 @@ function proc_cmd() {
 	echo "cmd: $@ > $proc_ctrl"
     fi
     # Quoting of "$@" is important for space expansion
-    echo "$@" > "$proc_ctrl"
-    local status=$?
+    echo "$@" > "$proc_ctrl" || status=$?
 
-    result=$(grep "Result: OK:" $proc_ctrl)
-    # Due to pgctrl, cannot use exit code $? from grep
-    if [[ "$result" == "" ]]; then
-	grep "Result:" $proc_ctrl >&2
+    if [[ "$proc_file" != "pgctrl" ]]; then
+        result=$(grep "Result: OK:" $proc_ctrl) || true
+        if [[ "$result" == "" ]]; then
+            grep "Result:" $proc_ctrl >&2
+        fi
     fi
     if (( $status != 0 )); then
 	err 5 "Write error($status) occurred cmd: \"$@ > $proc_ctrl\""
@@ -105,6 +108,8 @@ function pgset() {
     fi
 }
 
+[[ $EUID -eq 0 ]] && trap 'pg_ctrl "reset"' EXIT
+
 ## -- General shell tricks --
 
 function root_check_run_with_sudo() {
diff -druNp --no-dereference linux-libre-4.9.207-gnu/scripts/kallsyms.c linux-libre-4.9.208-gnu/scripts/kallsyms.c
--- linux-libre-4.9.207-gnu/scripts/kallsyms.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/scripts/kallsyms.c	2020-01-04 07:41:15.000000000 -0500
@@ -498,6 +498,8 @@ static void build_initial_tok_table(void
 				table[pos] = table[i];
 			learn_symbol(table[pos].sym, table[pos].len);
 			pos++;
+		} else {
+			free(table[i].sym);
 		}
 	}
 	table_cnt = pos;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/sound/core/pcm_native.c linux-libre-4.9.208-gnu/sound/core/pcm_native.c
--- linux-libre-4.9.207-gnu/sound/core/pcm_native.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/sound/core/pcm_native.c	2020-01-04 07:41:15.000000000 -0500
@@ -587,6 +587,10 @@ static int snd_pcm_hw_params(struct snd_
 	while (runtime->boundary * 2 <= LONG_MAX - runtime->buffer_size)
 		runtime->boundary *= 2;
 
+	/* clear the buffer for avoiding possible kernel info leaks */
+	if (runtime->dma_area)
+		memset(runtime->dma_area, 0, runtime->dma_bytes);
+
 	snd_pcm_timer_resolution_change(substream);
 	snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/sound/core/timer.c linux-libre-4.9.208-gnu/sound/core/timer.c
--- linux-libre-4.9.207-gnu/sound/core/timer.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/sound/core/timer.c	2020-01-04 07:41:15.000000000 -0500
@@ -87,6 +87,9 @@ static LIST_HEAD(snd_timer_slave_list);
 /* lock for slave active lists */
 static DEFINE_SPINLOCK(slave_active_lock);
 
+#define MAX_SLAVE_INSTANCES	1000
+static int num_slaves;
+
 static DEFINE_MUTEX(register_mutex);
 
 static int snd_timer_free(struct snd_timer *timer);
@@ -265,6 +268,10 @@ int snd_timer_open(struct snd_timer_inst
 			err = -EINVAL;
 			goto unlock;
 		}
+		if (num_slaves >= MAX_SLAVE_INSTANCES) {
+			err = -EBUSY;
+			goto unlock;
+		}
 		timeri = snd_timer_instance_new(owner, NULL);
 		if (!timeri) {
 			err = -ENOMEM;
@@ -274,6 +281,7 @@ int snd_timer_open(struct snd_timer_inst
 		timeri->slave_id = tid->device;
 		timeri->flags |= SNDRV_TIMER_IFLG_SLAVE;
 		list_add_tail(&timeri->open_list, &snd_timer_slave_list);
+		num_slaves++;
 		err = snd_timer_check_slave(timeri);
 		if (err < 0) {
 			snd_timer_close_locked(timeri, &card_dev_to_put);
@@ -363,6 +371,8 @@ static int snd_timer_close_locked(struct
 	struct snd_timer_instance *slave, *tmp;
 
 	list_del(&timeri->open_list);
+	if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE)
+		num_slaves--;
 
 	/* force to stop the timer */
 	snd_timer_stop(timeri);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/sound/pci/hda/hda_controller.c linux-libre-4.9.208-gnu/sound/pci/hda/hda_controller.c
--- linux-libre-4.9.207-gnu/sound/pci/hda/hda_controller.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/sound/pci/hda/hda_controller.c	2020-01-04 07:41:15.000000000 -0500
@@ -872,7 +872,7 @@ static int azx_rirb_get_response(struct
 		return -EAGAIN; /* give a chance to retry */
 	}
 
-	dev_WARN(chip->card->dev,
+	dev_err(chip->card->dev,
 		"azx_get_response timeout, switching to single_cmd mode: last cmd=0x%08x\n",
 		bus->last_cmd[addr]);
 	chip->single_cmd = 1;
diff -druNp --no-dereference linux-libre-4.9.207-gnu/sound/pci/hda/patch_ca0132.c linux-libre-4.9.208-gnu/sound/pci/hda/patch_ca0132.c
--- linux-libre-4.9.207-gnu/sound/pci/hda/patch_ca0132.c	2019-12-22 01:29:08.000000000 -0500
+++ linux-libre-4.9.208-gnu/sound/pci/hda/patch_ca0132.c	2020-01-04 12:02:36.000000000 -0500
@@ -1300,13 +1300,14 @@ struct scp_msg {
 
 static void dspio_clear_response_queue(struct hda_codec *codec)
 {
+	unsigned long timeout = jiffies + msecs_to_jiffies(1000);
 	unsigned int dummy = 0;
-	int status = -1;
+	int status;
 
 	/* clear all from the response queue */
 	do {
 		status = dspio_read(codec, &dummy);
-	} while (status == 0);
+	} while (status == 0 && time_before(jiffies, timeout));
 }
 
 static int dspio_get_response_data(struct hda_codec *codec)
@@ -4424,12 +4425,14 @@ static void ca0132_process_dsp_response(
 	struct ca0132_spec *spec = codec->spec;
 
 	codec_dbg(codec, "ca0132_process_dsp_response\n");
+	snd_hda_power_up_pm(codec);
 	if (spec->wait_scp) {
 		if (dspio_get_response_data(codec) >= 0)
 			spec->wait_scp = 0;
 	}
 
 	dspio_clear_response_queue(codec);
+	snd_hda_power_down_pm(codec);
 }
 
 static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
diff -druNp --no-dereference linux-libre-4.9.207-gnu/sound/soc/codecs/rt5677.c linux-libre-4.9.208-gnu/sound/soc/codecs/rt5677.c
--- linux-libre-4.9.207-gnu/sound/soc/codecs/rt5677.c	2019-12-22 01:29:41.000000000 -0500
+++ linux-libre-4.9.208-gnu/sound/soc/codecs/rt5677.c	2020-01-04 12:03:10.000000000 -0500
@@ -305,6 +305,7 @@ static bool rt5677_volatile_register(str
 	case RT5677_I2C_MASTER_CTRL7:
 	case RT5677_I2C_MASTER_CTRL8:
 	case RT5677_HAP_GENE_CTRL2:
+	case RT5677_PWR_ANLG2: /* Modified by DSP firmware */
 	case RT5677_PWR_DSP_ST:
 	case RT5677_PRIV_DATA:
 	case RT5677_ASRC_22:
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/lib/traceevent/parse-filter.c linux-libre-4.9.208-gnu/tools/lib/traceevent/parse-filter.c
--- linux-libre-4.9.207-gnu/tools/lib/traceevent/parse-filter.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/lib/traceevent/parse-filter.c	2020-01-04 07:41:15.000000000 -0500
@@ -1492,8 +1492,10 @@ static int copy_filter_type(struct event
 	if (strcmp(str, "TRUE") == 0 || strcmp(str, "FALSE") == 0) {
 		/* Add trivial event */
 		arg = allocate_arg();
-		if (arg == NULL)
+		if (arg == NULL) {
+			free(str);
 			return -1;
+		}
 
 		arg->type = FILTER_ARG_BOOLEAN;
 		if (strcmp(str, "TRUE") == 0)
@@ -1502,8 +1504,11 @@ static int copy_filter_type(struct event
 			arg->boolean.value = 0;
 
 		filter_type = add_filter_type(filter, event->id);
-		if (filter_type == NULL)
+		if (filter_type == NULL) {
+			free(str);
+			free_arg(arg);
 			return -1;
+		}
 
 		filter_type->filter = arg;
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/objtool/arch/x86/lib/x86-opcode-map.txt linux-libre-4.9.208-gnu/tools/objtool/arch/x86/lib/x86-opcode-map.txt
--- linux-libre-4.9.207-gnu/tools/objtool/arch/x86/lib/x86-opcode-map.txt	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/objtool/arch/x86/lib/x86-opcode-map.txt	2020-01-04 07:41:15.000000000 -0500
@@ -333,7 +333,7 @@ AVXcode: 1
 06: CLTS
 07: SYSRET (o64)
 08: INVD
-09: WBINVD
+09: WBINVD | WBNOINVD (F3)
 0a:
 0b: UD2 (1B)
 0c:
@@ -364,7 +364,7 @@ AVXcode: 1
 # a ModR/M byte.
 1a: BNDCL Gv,Ev (F3) | BNDCU Gv,Ev (F2) | BNDMOV Gv,Ev (66) | BNDLDX Gv,Ev
 1b: BNDCN Gv,Ev (F2) | BNDMOV Ev,Gv (66) | BNDMK Gv,Ev (F3) | BNDSTX Ev,Gv
-1c:
+1c: Grp20 (1A),(1C)
 1d:
 1e:
 1f: NOP Ev
@@ -792,6 +792,8 @@ f3: Grp17 (1A)
 f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v)
 f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v)
 f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v)
+f8: MOVDIR64B Gv,Mdqq (66) | ENQCMD Gv,Mdqq (F2) | ENQCMDS Gv,Mdqq (F3)
+f9: MOVDIRI My,Gy
 EndTable
 
 Table: 3-byte opcode 2 (0x0f 0x3a)
@@ -943,9 +945,9 @@ GrpTable: Grp6
 EndTable
 
 GrpTable: Grp7
-0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B)
-1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B)
-2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B)
+0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B)
+1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B)
+2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B)
 3: LIDT Ms
 4: SMSW Mw/Rv
 5: rdpkru (110),(11B) | wrpkru (111),(11B)
@@ -1011,7 +1013,7 @@ GrpTable: Grp15
 3: vstmxcsr Md (v1) | WRGSBASE Ry (F3),(11B)
 4: XSAVE
 5: XRSTOR | lfence (11B)
-6: XSAVEOPT | clwb (66) | mfence (11B)
+6: XSAVEOPT | clwb (66) | mfence (11B) | TPAUSE Rd (66),(11B) | UMONITOR Rv (F3),(11B) | UMWAIT Rd (F2),(11B)
 7: clflush | clflushopt (66) | sfence (11B)
 EndTable
 
@@ -1042,6 +1044,10 @@ GrpTable: Grp19
 6: vscatterpf1qps/d Wx (66),(ev)
 EndTable
 
+GrpTable: Grp20
+0: cldemote Mb
+EndTable
+
 # AMD's Prefetch Group
 GrpTable: GrpP
 0: PREFETCH
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/builtin-report.c linux-libre-4.9.208-gnu/tools/perf/builtin-report.c
--- linux-libre-4.9.207-gnu/tools/perf/builtin-report.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/builtin-report.c	2020-01-04 07:41:15.000000000 -0500
@@ -292,6 +292,13 @@ static int report__setup_sample_type(str
 				PERF_SAMPLE_BRANCH_ANY))
 		rep->nonany_branch_mode = true;
 
+#ifndef HAVE_LIBUNWIND_SUPPORT
+	if (dwarf_callchain_users) {
+		ui__warning("Please install libunwind development packages "
+			    "during the perf build.\n");
+	}
+#endif
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/tests/task-exit.c linux-libre-4.9.208-gnu/tools/perf/tests/task-exit.c
--- linux-libre-4.9.207-gnu/tools/perf/tests/task-exit.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/tests/task-exit.c	2020-01-04 07:41:15.000000000 -0500
@@ -98,6 +98,7 @@ int test__task_exit(int subtest __maybe_
 	if (perf_evlist__mmap(evlist, 128, true) < 0) {
 		pr_debug("failed to mmap events: %d (%s)\n", errno,
 			 str_error_r(errno, sbuf, sizeof(sbuf)));
+		err = -1;
 		goto out_delete_evlist;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/util/dwarf-aux.c linux-libre-4.9.208-gnu/tools/perf/util/dwarf-aux.c
--- linux-libre-4.9.207-gnu/tools/perf/util/dwarf-aux.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/util/dwarf-aux.c	2020-01-04 07:41:15.000000000 -0500
@@ -318,20 +318,50 @@ bool die_is_func_def(Dwarf_Die *dw_die)
 }
 
 /**
+ * die_entrypc - Returns entry PC (the lowest address) of a DIE
+ * @dw_die: a DIE
+ * @addr: where to store entry PC
+ *
+ * Since dwarf_entrypc() does not return entry PC if the DIE has only address
+ * range, we have to use this to retrieve the lowest address from the address
+ * range attribute.
+ */
+int die_entrypc(Dwarf_Die *dw_die, Dwarf_Addr *addr)
+{
+	Dwarf_Addr base, end;
+
+	if (!addr)
+		return -EINVAL;
+
+	if (dwarf_entrypc(dw_die, addr) == 0)
+		return 0;
+
+	return dwarf_ranges(dw_die, 0, &base, addr, &end) < 0 ? -ENOENT : 0;
+}
+
+/**
  * die_is_func_instance - Ensure that this DIE is an instance of a subprogram
  * @dw_die: a DIE
  *
  * Ensure that this DIE is an instance (which has an entry address).
- * This returns true if @dw_die is a function instance. If not, you need to
- * call die_walk_instances() to find actual instances.
+ * This returns true if @dw_die is a function instance. If not, the @dw_die
+ * must be a prototype. You can use die_walk_instances() to find actual
+ * instances.
  **/
 bool die_is_func_instance(Dwarf_Die *dw_die)
 {
 	Dwarf_Addr tmp;
+	Dwarf_Attribute attr_mem;
+	int tag = dwarf_tag(dw_die);
 
-	/* Actually gcc optimizes non-inline as like as inlined */
-	return !dwarf_func_inline(dw_die) && dwarf_entrypc(dw_die, &tmp) == 0;
+	if (tag != DW_TAG_subprogram &&
+	    tag != DW_TAG_inlined_subroutine)
+		return false;
+
+	return dwarf_entrypc(dw_die, &tmp) == 0 ||
+		dwarf_attr(dw_die, DW_AT_ranges, &attr_mem) != NULL;
 }
+
 /**
  * die_get_data_member_location - Get the data-member offset
  * @mb_die: a DIE of a member of a data structure
@@ -608,6 +638,9 @@ static int __die_walk_instances_cb(Dwarf
 	Dwarf_Die *origin;
 	int tmp;
 
+	if (!die_is_func_instance(inst))
+		return DIE_FIND_CB_CONTINUE;
+
 	attr = dwarf_attr(inst, DW_AT_abstract_origin, &attr_mem);
 	if (attr == NULL)
 		return DIE_FIND_CB_CONTINUE;
@@ -679,15 +712,14 @@ static int __die_walk_funclines_cb(Dwarf
 	if (dwarf_tag(in_die) == DW_TAG_inlined_subroutine) {
 		fname = die_get_call_file(in_die);
 		lineno = die_get_call_lineno(in_die);
-		if (fname && lineno > 0 && dwarf_entrypc(in_die, &addr) == 0) {
+		if (fname && lineno > 0 && die_entrypc(in_die, &addr) == 0) {
 			lw->retval = lw->callback(fname, lineno, addr, lw->data);
 			if (lw->retval != 0)
 				return DIE_FIND_CB_END;
 		}
+		if (!lw->recursive)
+			return DIE_FIND_CB_SIBLING;
 	}
-	if (!lw->recursive)
-		/* Don't need to search recursively */
-		return DIE_FIND_CB_SIBLING;
 
 	if (addr) {
 		fname = dwarf_decl_file(in_die);
@@ -720,7 +752,7 @@ static int __die_walk_funclines(Dwarf_Di
 	/* Handle function declaration line */
 	fname = dwarf_decl_file(sp_die);
 	if (fname && dwarf_decl_line(sp_die, &lineno) == 0 &&
-	    dwarf_entrypc(sp_die, &addr) == 0) {
+	    die_entrypc(sp_die, &addr) == 0) {
 		lw.retval = callback(fname, lineno, addr, data);
 		if (lw.retval != 0)
 			goto done;
@@ -734,6 +766,10 @@ static int __die_walk_culines_cb(Dwarf_D
 {
 	struct __line_walk_param *lw = data;
 
+	/*
+	 * Since inlined function can include another inlined function in
+	 * the same file, we need to walk in it recursively.
+	 */
 	lw->retval = __die_walk_funclines(sp_die, true, lw->callback, lw->data);
 	if (lw->retval != 0)
 		return DWARF_CB_ABORT;
@@ -758,11 +794,12 @@ int die_walk_lines(Dwarf_Die *rt_die, li
 	Dwarf_Lines *lines;
 	Dwarf_Line *line;
 	Dwarf_Addr addr;
-	const char *fname, *decf = NULL;
+	const char *fname, *decf = NULL, *inf = NULL;
 	int lineno, ret = 0;
 	int decl = 0, inl;
 	Dwarf_Die die_mem, *cu_die;
 	size_t nlines, i;
+	bool flag;
 
 	/* Get the CU die */
 	if (dwarf_tag(rt_die) != DW_TAG_compile_unit) {
@@ -793,6 +830,12 @@ int die_walk_lines(Dwarf_Die *rt_die, li
 				  "Possible error in debuginfo.\n");
 			continue;
 		}
+		/* Skip end-of-sequence */
+		if (dwarf_lineendsequence(line, &flag) != 0 || flag)
+			continue;
+		/* Skip Non statement line-info */
+		if (dwarf_linebeginstatement(line, &flag) != 0 || !flag)
+			continue;
 		/* Filter lines based on address */
 		if (rt_die != cu_die) {
 			/*
@@ -802,13 +845,21 @@ int die_walk_lines(Dwarf_Die *rt_die, li
 			 */
 			if (!dwarf_haspc(rt_die, addr))
 				continue;
+
 			if (die_find_inlinefunc(rt_die, addr, &die_mem)) {
+				/* Call-site check */
+				inf = die_get_call_file(&die_mem);
+				if ((inf && !strcmp(inf, decf)) &&
+				    die_get_call_lineno(&die_mem) == lineno)
+					goto found;
+
 				dwarf_decl_line(&die_mem, &inl);
 				if (inl != decl ||
 				    decf != dwarf_decl_file(&die_mem))
 					continue;
 			}
 		}
+found:
 		/* Get source line */
 		fname = dwarf_linesrc(line, NULL, NULL);
 
@@ -823,8 +874,9 @@ int die_walk_lines(Dwarf_Die *rt_die, li
 	 */
 	if (rt_die != cu_die)
 		/*
-		 * Don't need walk functions recursively, because nested
-		 * inlined functions don't have lines of the specified DIE.
+		 * Don't need walk inlined functions recursively, because
+		 * inner inlined functions don't have the lines of the
+		 * specified function.
 		 */
 		ret = __die_walk_funclines(rt_die, false, callback, data);
 	else {
@@ -999,7 +1051,7 @@ static int die_get_var_innermost_scope(D
 	bool first = true;
 	const char *name;
 
-	ret = dwarf_entrypc(sp_die, &entry);
+	ret = die_entrypc(sp_die, &entry);
 	if (ret)
 		return ret;
 
@@ -1062,7 +1114,7 @@ int die_get_var_range(Dwarf_Die *sp_die,
 	bool first = true;
 	const char *name;
 
-	ret = dwarf_entrypc(sp_die, &entry);
+	ret = die_entrypc(sp_die, &entry);
 	if (ret)
 		return ret;
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/util/dwarf-aux.h linux-libre-4.9.208-gnu/tools/perf/util/dwarf-aux.h
--- linux-libre-4.9.207-gnu/tools/perf/util/dwarf-aux.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/util/dwarf-aux.h	2020-01-04 07:41:15.000000000 -0500
@@ -41,6 +41,9 @@ int cu_walk_functions_at(Dwarf_Die *cu_d
 /* Get DW_AT_linkage_name (should be NULL for C binary) */
 const char *die_get_linkage_name(Dwarf_Die *dw_die);
 
+/* Get the lowest PC in DIE (including range list) */
+int die_entrypc(Dwarf_Die *dw_die, Dwarf_Addr *addr);
+
 /* Ensure that this DIE is a subprogram and definition (not declaration) */
 bool die_is_func_def(Dwarf_Die *dw_die);
 
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/util/perf_regs.h linux-libre-4.9.208-gnu/tools/perf/util/perf_regs.h
--- linux-libre-4.9.207-gnu/tools/perf/util/perf_regs.h	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/util/perf_regs.h	2020-01-04 07:41:15.000000000 -0500
@@ -26,7 +26,7 @@ int perf_reg_value(u64 *valp, struct reg
 
 static inline const char *perf_reg_name(int id __maybe_unused)
 {
-	return NULL;
+	return "unknown";
 }
 
 static inline int perf_reg_value(u64 *valp __maybe_unused,
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/util/probe-finder.c linux-libre-4.9.208-gnu/tools/perf/util/probe-finder.c
--- linux-libre-4.9.207-gnu/tools/perf/util/probe-finder.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/util/probe-finder.c	2020-01-04 07:41:15.000000000 -0500
@@ -764,6 +764,16 @@ static int find_best_scope_cb(Dwarf_Die
 	return 0;
 }
 
+/* Return innermost DIE */
+static int find_inner_scope_cb(Dwarf_Die *fn_die, void *data)
+{
+	struct find_scope_param *fsp = data;
+
+	memcpy(fsp->die_mem, fn_die, sizeof(Dwarf_Die));
+	fsp->found = true;
+	return 1;
+}
+
 /* Find an appropriate scope fits to given conditions */
 static Dwarf_Die *find_best_scope(struct probe_finder *pf, Dwarf_Die *die_mem)
 {
@@ -775,8 +785,13 @@ static Dwarf_Die *find_best_scope(struct
 		.die_mem = die_mem,
 		.found = false,
 	};
+	int ret;
 
-	cu_walk_functions_at(&pf->cu_die, pf->addr, find_best_scope_cb, &fsp);
+	ret = cu_walk_functions_at(&pf->cu_die, pf->addr, find_best_scope_cb,
+				   &fsp);
+	if (!ret && !fsp.found)
+		cu_walk_functions_at(&pf->cu_die, pf->addr,
+				     find_inner_scope_cb, &fsp);
 
 	return fsp.found ? die_mem : NULL;
 }
@@ -950,7 +965,7 @@ static int probe_point_inline_cb(Dwarf_D
 		ret = find_probe_point_lazy(in_die, pf);
 	else {
 		/* Get probe address */
-		if (dwarf_entrypc(in_die, &addr) != 0) {
+		if (die_entrypc(in_die, &addr) != 0) {
 			pr_warning("Failed to get entry address of %s.\n",
 				   dwarf_diename(in_die));
 			return -ENOENT;
@@ -1002,7 +1017,7 @@ static int probe_point_search_cb(Dwarf_D
 		param->retval = find_probe_point_by_line(pf);
 	} else if (die_is_func_instance(sp_die)) {
 		/* Instances always have the entry address */
-		dwarf_entrypc(sp_die, &pf->addr);
+		die_entrypc(sp_die, &pf->addr);
 		/* But in some case the entry address is 0 */
 		if (pf->addr == 0) {
 			pr_debug("%s has no entry PC. Skipped\n",
@@ -1414,6 +1429,18 @@ error:
 	return DIE_FIND_CB_END;
 }
 
+static bool available_var_finder_overlap(struct available_var_finder *af)
+{
+	int i;
+
+	for (i = 0; i < af->nvls; i++) {
+		if (af->pf.addr == af->vls[i].point.address)
+			return true;
+	}
+	return false;
+
+}
+
 /* Add a found vars into available variables list */
 static int add_available_vars(Dwarf_Die *sc_die, struct probe_finder *pf)
 {
@@ -1424,6 +1451,14 @@ static int add_available_vars(Dwarf_Die
 	Dwarf_Die die_mem;
 	int ret;
 
+	/*
+	 * For some reason (e.g. different column assigned to same address),
+	 * this callback can be called with the address which already passed.
+	 * Ignore it first.
+	 */
+	if (available_var_finder_overlap(af))
+		return 0;
+
 	/* Check number of tevs */
 	if (af->nvls == af->max_vls) {
 		pr_warning("Too many( > %d) probe point found.\n", af->max_vls);
@@ -1567,7 +1602,7 @@ int debuginfo__find_probe_point(struct d
 		/* Get function entry information */
 		func = basefunc = dwarf_diename(&spdie);
 		if (!func ||
-		    dwarf_entrypc(&spdie, &baseaddr) != 0 ||
+		    die_entrypc(&spdie, &baseaddr) != 0 ||
 		    dwarf_decl_line(&spdie, &baseline) != 0) {
 			lineno = 0;
 			goto post;
@@ -1584,7 +1619,7 @@ int debuginfo__find_probe_point(struct d
 		while (die_find_top_inlinefunc(&spdie, (Dwarf_Addr)addr,
 						&indie)) {
 			/* There is an inline function */
-			if (dwarf_entrypc(&indie, &_addr) == 0 &&
+			if (die_entrypc(&indie, &_addr) == 0 &&
 			    _addr == addr) {
 				/*
 				 * addr is at an inline function entry.
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/perf/util/strbuf.c linux-libre-4.9.208-gnu/tools/perf/util/strbuf.c
--- linux-libre-4.9.207-gnu/tools/perf/util/strbuf.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/perf/util/strbuf.c	2020-01-04 07:41:15.000000000 -0500
@@ -116,7 +116,6 @@ static int strbuf_addv(struct strbuf *sb
 			return ret;
 		}
 		len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap_saved);
-		va_end(ap_saved);
 		if (len > strbuf_avail(sb)) {
 			pr_debug("this should not happen, your vsnprintf is broken");
 			va_end(ap_saved);
diff -druNp --no-dereference linux-libre-4.9.207-gnu/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c linux-libre-4.9.208-gnu/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c
--- linux-libre-4.9.207-gnu/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c	2019-12-21 04:42:35.000000000 -0500
+++ linux-libre-4.9.208-gnu/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c	2020-01-04 07:41:15.000000000 -0500
@@ -40,7 +40,6 @@ static cstate_t hsw_ext_cstates[HSW_EXT_
 	{
 		.name			= "PC9",
 		.desc			= N_("Processor Package C9"),
-		.desc			= N_("Processor Package C2"),
 		.id			= PC9,
 		.range			= RANGE_PACKAGE,
 		.get_count_percent	= hsw_ext_get_count_percent,
