diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/arm/include/asm/kvm_arm.h linux-libre-3.18.88-gnu/arch/arm/include/asm/kvm_arm.h
--- linux-libre-3.18.87-gnu/arch/arm/include/asm/kvm_arm.h	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/arm/include/asm/kvm_arm.h	2017-12-16 04:32:31.000000000 -0500
@@ -161,8 +161,7 @@
 #else
 #define VTTBR_X		(5 - KVM_T0SZ)
 #endif
-#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
-#define VTTBR_BADDR_MASK  (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
+#define VTTBR_BADDR_MASK  (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_X)
 #define VTTBR_VMID_SHIFT  (48LLU)
 #define VTTBR_VMID_MASK	  (0xffLLU << VTTBR_VMID_SHIFT)
 
@@ -208,6 +207,7 @@
 #define HSR_EC_IABT_HYP	(0x21)
 #define HSR_EC_DABT	(0x24)
 #define HSR_EC_DABT_HYP	(0x25)
+#define HSR_EC_MAX	(0x3f)
 
 #define HSR_WFI_IS_WFE		(1U << 0)
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/arm/kvm/handle_exit.c linux-libre-3.18.88-gnu/arch/arm/kvm/handle_exit.c
--- linux-libre-3.18.87-gnu/arch/arm/kvm/handle_exit.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/arm/kvm/handle_exit.c	2017-12-16 04:32:31.000000000 -0500
@@ -98,7 +98,19 @@ static int kvm_handle_wfx(struct kvm_vcp
 	return 1;
 }
 
+static int kvm_handle_unknown_ec(struct kvm_vcpu *vcpu, struct kvm_run *run)
+{
+	u32 hsr = kvm_vcpu_get_hsr(vcpu);
+
+	kvm_pr_unimpl("Unknown exception class: hsr: %#08x\n",
+		      hsr);
+
+	kvm_inject_undefined(vcpu);
+	return 1;
+}
+
 static exit_handle_fn arm_exit_handlers[] = {
+	[0 ... HSR_EC_MAX]	= kvm_handle_unknown_ec,
 	[HSR_EC_WFI]		= kvm_handle_wfx,
 	[HSR_EC_CP15_32]	= kvm_handle_cp15_32,
 	[HSR_EC_CP15_64]	= kvm_handle_cp15_64,
@@ -120,13 +132,6 @@ static exit_handle_fn kvm_get_exit_handl
 {
 	u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu);
 
-	if (hsr_ec >= ARRAY_SIZE(arm_exit_handlers) ||
-	    !arm_exit_handlers[hsr_ec]) {
-		kvm_err("Unknown exception class: hsr: %#08x\n",
-			(unsigned int)kvm_vcpu_get_hsr(vcpu));
-		BUG();
-	}
-
 	return arm_exit_handlers[hsr_ec];
 }
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/arm64/include/asm/kvm_arm.h linux-libre-3.18.88-gnu/arch/arm64/include/asm/kvm_arm.h
--- linux-libre-3.18.87-gnu/arch/arm64/include/asm/kvm_arm.h	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/arm64/include/asm/kvm_arm.h	2017-12-16 04:32:31.000000000 -0500
@@ -160,8 +160,7 @@
 #define VTTBR_X		(37 - VTCR_EL2_T0SZ_40B)
 #endif
 
-#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
-#define VTTBR_BADDR_MASK  (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
+#define VTTBR_BADDR_MASK  (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_X)
 #define VTTBR_VMID_SHIFT  (UL(48))
 #define VTTBR_VMID_MASK	  (UL(0xFF) << VTTBR_VMID_SHIFT)
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/arm64/kernel/process.c linux-libre-3.18.88-gnu/arch/arm64/kernel/process.c
--- linux-libre-3.18.87-gnu/arch/arm64/kernel/process.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/arm64/kernel/process.c	2017-12-16 04:32:31.000000000 -0500
@@ -250,6 +250,15 @@ int copy_thread(unsigned long clone_flag
 
 	memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context));
 
+	/*
+	 * In case p was allocated the same task_struct pointer as some
+	 * other recently-exited task, make sure p is disassociated from
+	 * any cpu that may have run that now-exited task recently.
+	 * Otherwise we could erroneously skip reloading the FPSIMD
+	 * registers for p.
+	 */
+	fpsimd_flush_task_state(p);
+
 	if (likely(!(p->flags & PF_KTHREAD))) {
 		*childregs = *current_pt_regs();
 		childregs->regs[0] = 0;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/powerpc/sysdev/axonram.c linux-libre-3.18.88-gnu/arch/powerpc/sysdev/axonram.c
--- linux-libre-3.18.87-gnu/arch/powerpc/sysdev/axonram.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/powerpc/sysdev/axonram.c	2017-12-16 04:32:31.000000000 -0500
@@ -283,7 +283,9 @@ failed:
 			if (bank->disk->major > 0)
 				unregister_blkdev(bank->disk->major,
 						bank->disk->disk_name);
-			del_gendisk(bank->disk);
+			if (bank->disk->flags & GENHD_FL_UP)
+				del_gendisk(bank->disk);
+			put_disk(bank->disk);
 		}
 		device->dev.platform_data = NULL;
 		if (bank->io_addr != 0)
@@ -308,6 +310,7 @@ axon_ram_remove(struct platform_device *
 	device_remove_file(&device->dev, &dev_attr_ecc);
 	free_irq(bank->irq_id, device);
 	del_gendisk(bank->disk);
+	put_disk(bank->disk);
 	iounmap((void __iomem *) bank->io_addr);
 	kfree(bank);
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/s390/include/asm/asm-prototypes.h linux-libre-3.18.88-gnu/arch/s390/include/asm/asm-prototypes.h
--- linux-libre-3.18.87-gnu/arch/s390/include/asm/asm-prototypes.h	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/s390/include/asm/asm-prototypes.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,8 +0,0 @@
-#ifndef _ASM_S390_PROTOTYPES_H
-
-#include <linux/kvm_host.h>
-#include <linux/ftrace.h>
-#include <asm/fpu/api.h>
-#include <asm-generic/asm-prototypes.h>
-
-#endif /* _ASM_S390_PROTOTYPES_H */
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/sparc/mm/init_64.c linux-libre-3.18.88-gnu/arch/sparc/mm/init_64.c
--- linux-libre-3.18.87-gnu/arch/sparc/mm/init_64.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/sparc/mm/init_64.c	2017-12-16 04:32:31.000000000 -0500
@@ -2215,10 +2215,17 @@ void __init mem_init(void)
 {
 	high_memory = __va(last_valid_pfn << PAGE_SHIFT);
 
-	register_page_bootmem_info();
 	free_all_bootmem();
 
 	/*
+	 * Must be done after boot memory is put on freelist, because here we
+	 * might set fields in deferred struct pages that have not yet been
+	 * initialized, and free_all_bootmem() initializes all the reserved
+	 * deferred pages for us.
+	 */
+	register_page_bootmem_info();
+
+	/*
 	 * Set up the zero page, mark it reserved, so that page count
 	 * is not manipulated when freeing the page from user ptes.
 	 */
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/x86/kvm/vmx.c linux-libre-3.18.88-gnu/arch/x86/kvm/vmx.c
--- linux-libre-3.18.87-gnu/arch/x86/kvm/vmx.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/x86/kvm/vmx.c	2017-12-16 04:32:31.000000000 -0500
@@ -9086,8 +9086,10 @@ static void nested_vmx_vmexit(struct kvm
  */
 static void vmx_leave_nested(struct kvm_vcpu *vcpu)
 {
-	if (is_guest_mode(vcpu))
+	if (is_guest_mode(vcpu)) {
+		to_vmx(vcpu)->nested.nested_run_pending = 0;
 		nested_vmx_vmexit(vcpu, -1, 0, 0);
+	}
 	free_nested(to_vmx(vcpu));
 }
 
@@ -9280,12 +9282,7 @@ static int __init vmx_init(void)
 	memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
 	memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
 
-	/*
-	 * Allow direct access to the PC debug port (it is often used for I/O
-	 * delays, but the vmexits simply slow things down).
-	 */
 	memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
-	clear_bit(0x80, vmx_io_bitmap_a);
 
 	memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/arch/x86/pci/broadcom_bus.c linux-libre-3.18.88-gnu/arch/x86/pci/broadcom_bus.c
--- linux-libre-3.18.87-gnu/arch/x86/pci/broadcom_bus.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/arch/x86/pci/broadcom_bus.c	2017-12-16 04:32:31.000000000 -0500
@@ -97,7 +97,7 @@ static int __init broadcom_postcore_init
 	 * We should get host bridge information from ACPI unless the BIOS
 	 * doesn't support it.
 	 */
-	if (acpi_os_get_root_pointer())
+	if (!acpi_disabled && acpi_os_get_root_pointer())
 		return 0;
 #endif
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/crypto/asymmetric_keys/x509_cert_parser.c linux-libre-3.18.88-gnu/crypto/asymmetric_keys/x509_cert_parser.c
--- linux-libre-3.18.87-gnu/crypto/asymmetric_keys/x509_cert_parser.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/crypto/asymmetric_keys/x509_cert_parser.c	2017-12-16 04:32:31.000000000 -0500
@@ -381,6 +381,8 @@ int x509_extract_key_data(void *context,
 	ctx->cert->pub->pkey_algo = PKEY_ALGO_RSA;
 
 	/* Discard the BIT STRING metadata */
+	if (vlen < 1 || *(const u8 *)value != 0)
+		return -EBADMSG;
 	ctx->key = value + 1;
 	ctx->key_size = vlen - 1;
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/ata/libata-sff.c linux-libre-3.18.88-gnu/drivers/ata/libata-sff.c
--- linux-libre-3.18.87-gnu/drivers/ata/libata-sff.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/ata/libata-sff.c	2017-12-16 04:32:31.000000000 -0500
@@ -1480,7 +1480,6 @@ unsigned int ata_sff_qc_issue(struct ata
 		break;
 
 	default:
-		WARN_ON_ONCE(1);
 		return AC_ERR_SYSTEM;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/atm/horizon.c linux-libre-3.18.88-gnu/drivers/atm/horizon.c
--- linux-libre-3.18.87-gnu/drivers/atm/horizon.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/atm/horizon.c	2017-12-16 04:32:31.000000000 -0500
@@ -2828,7 +2828,7 @@ out:
 	return err;
 
 out_free_irq:
-	free_irq(dev->irq, dev);
+	free_irq(irq, dev);
 out_free:
 	kfree(dev);
 out_release:
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/base/isa.c linux-libre-3.18.88-gnu/drivers/base/isa.c
--- linux-libre-3.18.87-gnu/drivers/base/isa.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/base/isa.c	2017-12-16 04:32:31.000000000 -0500
@@ -39,7 +39,7 @@ static int isa_bus_probe(struct device *
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
-	if (isa_driver->probe)
+	if (isa_driver && isa_driver->probe)
 		return isa_driver->probe(dev, to_isa_dev(dev)->id);
 
 	return 0;
@@ -49,7 +49,7 @@ static int isa_bus_remove(struct device
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
-	if (isa_driver->remove)
+	if (isa_driver && isa_driver->remove)
 		return isa_driver->remove(dev, to_isa_dev(dev)->id);
 
 	return 0;
@@ -59,7 +59,7 @@ static void isa_bus_shutdown(struct devi
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
-	if (isa_driver->shutdown)
+	if (isa_driver && isa_driver->shutdown)
 		isa_driver->shutdown(dev, to_isa_dev(dev)->id);
 }
 
@@ -67,7 +67,7 @@ static int isa_bus_suspend(struct device
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
-	if (isa_driver->suspend)
+	if (isa_driver && isa_driver->suspend)
 		return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
 
 	return 0;
@@ -77,7 +77,7 @@ static int isa_bus_resume(struct device
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
-	if (isa_driver->resume)
+	if (isa_driver && isa_driver->resume)
 		return isa_driver->resume(dev, to_isa_dev(dev)->id);
 
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/crypto/s5p-sss.c linux-libre-3.18.88-gnu/drivers/crypto/s5p-sss.c
--- linux-libre-3.18.87-gnu/drivers/crypto/s5p-sss.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/crypto/s5p-sss.c	2017-12-16 04:32:31.000000000 -0500
@@ -682,8 +682,9 @@ static int s5p_aes_probe(struct platform
 		dev_warn(dev, "feed control interrupt is not available.\n");
 		goto err_irq;
 	}
-	err = devm_request_irq(dev, pdata->irq_fc, s5p_aes_interrupt,
-			       IRQF_SHARED, pdev->name, pdev);
+	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
+					s5p_aes_interrupt, IRQF_ONESHOT,
+					pdev->name, pdev);
 	if (err < 0) {
 		dev_warn(dev, "feed control interrupt is not available.\n");
 		goto err_irq;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/edac/i5000_edac.c linux-libre-3.18.88-gnu/drivers/edac/i5000_edac.c
--- linux-libre-3.18.87-gnu/drivers/edac/i5000_edac.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/edac/i5000_edac.c	2017-12-16 04:32:31.000000000 -0500
@@ -227,7 +227,7 @@
 #define			NREC_RDWR(x)		(((x)>>11) & 1)
 #define			NREC_RANK(x)		(((x)>>8) & 0x7)
 #define		NRECMEMB		0xC0
-#define			NREC_CAS(x)		(((x)>>16) & 0xFFFFFF)
+#define			NREC_CAS(x)		(((x)>>16) & 0xFFF)
 #define			NREC_RAS(x)		((x) & 0x7FFF)
 #define		NRECFGLOG		0xC4
 #define		NREEECFBDA		0xC8
@@ -371,7 +371,7 @@ struct i5000_error_info {
 	/* These registers are input ONLY if there was a
 	 * Non-Recoverable Error */
 	u16 nrecmema;		/* Non-Recoverable Mem log A */
-	u16 nrecmemb;		/* Non-Recoverable Mem log B */
+	u32 nrecmemb;		/* Non-Recoverable Mem log B */
 
 };
 
@@ -407,7 +407,7 @@ static void i5000_get_error_info(struct
 				NERR_FAT_FBD, &info->nerr_fat_fbd);
 		pci_read_config_word(pvt->branchmap_werrors,
 				NRECMEMA, &info->nrecmema);
-		pci_read_config_word(pvt->branchmap_werrors,
+		pci_read_config_dword(pvt->branchmap_werrors,
 				NRECMEMB, &info->nrecmemb);
 
 		/* Clear the error bits, by writing them back */
@@ -1293,7 +1293,7 @@ static int i5000_init_csrows(struct mem_
 			dimm->mtype = MEM_FB_DDR2;
 
 			/* ask what device type on this row */
-			if (MTR_DRAM_WIDTH(mtr))
+			if (MTR_DRAM_WIDTH(mtr) == 8)
 				dimm->dtype = DEV_X8;
 			else
 				dimm->dtype = DEV_X4;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/edac/i5400_edac.c linux-libre-3.18.88-gnu/drivers/edac/i5400_edac.c
--- linux-libre-3.18.87-gnu/drivers/edac/i5400_edac.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/edac/i5400_edac.c	2017-12-16 04:32:31.000000000 -0500
@@ -368,7 +368,7 @@ struct i5400_error_info {
 
 	/* These registers are input ONLY if there was a Non-Rec Error */
 	u16 nrecmema;		/* Non-Recoverable Mem log A */
-	u16 nrecmemb;		/* Non-Recoverable Mem log B */
+	u32 nrecmemb;		/* Non-Recoverable Mem log B */
 
 };
 
@@ -458,7 +458,7 @@ static void i5400_get_error_info(struct
 				NERR_FAT_FBD, &info->nerr_fat_fbd);
 		pci_read_config_word(pvt->branchmap_werrors,
 				NRECMEMA, &info->nrecmema);
-		pci_read_config_word(pvt->branchmap_werrors,
+		pci_read_config_dword(pvt->branchmap_werrors,
 				NRECMEMB, &info->nrecmemb);
 
 		/* Clear the error bits, by writing them back */
@@ -1207,13 +1207,14 @@ static int i5400_init_dimms(struct mem_c
 
 			dimm->nr_pages = size_mb << 8;
 			dimm->grain = 8;
-			dimm->dtype = MTR_DRAM_WIDTH(mtr) ? DEV_X8 : DEV_X4;
+			dimm->dtype = MTR_DRAM_WIDTH(mtr) == 8 ?
+				      DEV_X8 : DEV_X4;
 			dimm->mtype = MEM_FB_DDR2;
 			/*
 			 * The eccc mechanism is SDDC (aka SECC), with
 			 * is similar to Chipkill.
 			 */
-			dimm->edac_mode = MTR_DRAM_WIDTH(mtr) ?
+			dimm->edac_mode = MTR_DRAM_WIDTH(mtr) == 8 ?
 					  EDAC_S8ECD8ED : EDAC_S4ECD4ED;
 			ndimms++;
 		}
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/firmware/efi/efi.c linux-libre-3.18.88-gnu/drivers/firmware/efi/efi.c
--- linux-libre-3.18.87-gnu/drivers/firmware/efi/efi.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/firmware/efi/efi.c	2017-12-16 04:32:31.000000000 -0500
@@ -96,8 +96,7 @@ static ssize_t systab_show(struct kobjec
 	return str - buf;
 }
 
-static struct kobj_attribute efi_attr_systab =
-			__ATTR(systab, 0400, systab_show, NULL);
+static struct kobj_attribute efi_attr_systab = __ATTR_RO_MODE(systab, 0400);
 
 #define EFI_FIELD(var) efi.var
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/firmware/efi/runtime-map.c linux-libre-3.18.88-gnu/drivers/firmware/efi/runtime-map.c
--- linux-libre-3.18.87-gnu/drivers/firmware/efi/runtime-map.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/firmware/efi/runtime-map.c	2017-12-16 04:32:31.000000000 -0500
@@ -67,11 +67,11 @@ static ssize_t map_attr_show(struct kobj
 	return map_attr->show(entry, buf);
 }
 
-static struct map_attribute map_type_attr = __ATTR_RO(type);
-static struct map_attribute map_phys_addr_attr   = __ATTR_RO(phys_addr);
-static struct map_attribute map_virt_addr_attr  = __ATTR_RO(virt_addr);
-static struct map_attribute map_num_pages_attr  = __ATTR_RO(num_pages);
-static struct map_attribute map_attribute_attr  = __ATTR_RO(attribute);
+static struct map_attribute map_type_attr = __ATTR_RO_MODE(type, 0400);
+static struct map_attribute map_phys_addr_attr = __ATTR_RO_MODE(phys_addr, 0400);
+static struct map_attribute map_virt_addr_attr = __ATTR_RO_MODE(virt_addr, 0400);
+static struct map_attribute map_num_pages_attr = __ATTR_RO_MODE(num_pages, 0400);
+static struct map_attribute map_attribute_attr = __ATTR_RO_MODE(attribute, 0400);
 
 /*
  * These are default attributes that are added for every memmap entry.
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/gpu/drm/armada/Makefile linux-libre-3.18.88-gnu/drivers/gpu/drm/armada/Makefile
--- linux-libre-3.18.87-gnu/drivers/gpu/drm/armada/Makefile	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/gpu/drm/armada/Makefile	2017-12-16 04:32:31.000000000 -0500
@@ -5,5 +5,3 @@ armada-y	+= armada_510.o
 armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
 
 obj-$(CONFIG_DRM_ARMADA) := armada.o
-
-CFLAGS_armada_trace.o := -I$(src)
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/i2c/busses/i2c-riic.c linux-libre-3.18.88-gnu/drivers/i2c/busses/i2c-riic.c
--- linux-libre-3.18.87-gnu/drivers/i2c/busses/i2c-riic.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/i2c/busses/i2c-riic.c	2017-12-16 04:32:31.000000000 -0500
@@ -218,8 +218,12 @@ static irqreturn_t riic_tend_isr(int irq
 	}
 
 	if (riic->is_last || riic->err) {
-		riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
+		riic_clear_set_bit(riic, ICIER_TEIE, ICIER_SPIE, RIIC_ICIER);
 		writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
+	} else {
+		/* Transfer is complete, but do not send STOP */
+		riic_clear_set_bit(riic, ICIER_TEIE, 0, RIIC_ICIER);
+		complete(&riic->msg_done);
 	}
 
 	return IRQ_HANDLED;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/infiniband/hw/mlx4/qp.c linux-libre-3.18.88-gnu/drivers/infiniband/hw/mlx4/qp.c
--- linux-libre-3.18.87-gnu/drivers/infiniband/hw/mlx4/qp.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/infiniband/hw/mlx4/qp.c	2017-12-16 04:32:31.000000000 -0500
@@ -1465,7 +1465,7 @@ static int __mlx4_ib_modify_qp(struct ib
 			context->mtu_msgmax = (IB_MTU_4096 << 5) |
 					      ilog2(dev->dev->caps.max_gso_sz);
 		else
-			context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
+			context->mtu_msgmax = (IB_MTU_4096 << 5) | 13;
 	} else if (attr_mask & IB_QP_PATH_MTU) {
 		if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
 			pr_err("path MTU (%u) is invalid\n",
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/infiniband/hw/mlx5/main.c linux-libre-3.18.88-gnu/drivers/infiniband/hw/mlx5/main.c
--- linux-libre-3.18.87-gnu/drivers/infiniband/hw/mlx5/main.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/infiniband/hw/mlx5/main.c	2017-12-16 04:32:31.000000000 -0500
@@ -1099,6 +1099,8 @@ static int create_umr_res(struct mlx5_ib
 	qp->real_qp    = qp;
 	qp->uobject    = NULL;
 	qp->qp_type    = MLX5_IB_QPT_REG_UMR;
+	qp->send_cq    = init_attr->send_cq;
+	qp->recv_cq    = init_attr->recv_cq;
 
 	attr->qp_state = IB_QPS_INIT;
 	attr->port_num = 1;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/iommu/intel-iommu.c linux-libre-3.18.88-gnu/drivers/iommu/intel-iommu.c
--- linux-libre-3.18.87-gnu/drivers/iommu/intel-iommu.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/iommu/intel-iommu.c	2017-12-16 04:32:31.000000000 -0500
@@ -2016,10 +2016,12 @@ static int __domain_mapping(struct dmar_
 		uint64_t tmp;
 
 		if (!sg_res) {
+			unsigned int pgoff = sg->offset & ~PAGE_MASK;
+
 			sg_res = aligned_nrpages(sg->offset, sg->length);
-			sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset;
+			sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff;
 			sg->dma_length = sg->length;
-			pteval = page_to_phys(sg_page(sg)) | prot;
+			pteval = (sg_phys(sg) - pgoff) | prot;
 			phys_pfn = pteval >> VTD_PAGE_SHIFT;
 		}
 
@@ -3326,7 +3328,7 @@ static int intel_nontranslate_map_sg(str
 
 	for_each_sg(sglist, sg, nelems, i) {
 		BUG_ON(!sg_page(sg));
-		sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset;
+		sg->dma_address = sg_phys(sg);
 		sg->dma_length = sg->length;
 	}
 	return nelems;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/irqchip/irq-crossbar.c linux-libre-3.18.88-gnu/drivers/irqchip/irq-crossbar.c
--- linux-libre-3.18.87-gnu/drivers/irqchip/irq-crossbar.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/irqchip/irq-crossbar.c	2017-12-16 04:32:31.000000000 -0500
@@ -176,7 +176,7 @@ static const struct irq_domain_ops routa
 static int __init crossbar_of_init(struct device_node *node)
 {
 	int i, size, reserved = 0;
-	u32 max = 0, entry;
+	u32 max = 0, entry, reg_size;
 	const __be32 *irqsr;
 	int ret = -ENOMEM;
 
@@ -253,9 +253,9 @@ static int __init crossbar_of_init(struc
 	if (!cb->register_offsets)
 		goto err_irq_map;
 
-	of_property_read_u32(node, "ti,reg-size", &size);
+	of_property_read_u32(node, "ti,reg-size", &reg_size);
 
-	switch (size) {
+	switch (reg_size) {
 	case 1:
 		cb->write = crossbar_writeb;
 		break;
@@ -281,7 +281,7 @@ static int __init crossbar_of_init(struc
 			continue;
 
 		cb->register_offsets[i] = reserved;
-		reserved += size;
+		reserved += reg_size;
 	}
 
 	of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/media/usb/dvb-usb/dibusb-common.c linux-libre-3.18.88-gnu/drivers/media/usb/dvb-usb/dibusb-common.c
--- linux-libre-3.18.87-gnu/drivers/media/usb/dvb-usb/dibusb-common.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/media/usb/dvb-usb/dibusb-common.c	2017-12-16 04:32:31.000000000 -0500
@@ -179,8 +179,20 @@ EXPORT_SYMBOL(dibusb_i2c_algo);
 
 int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
 {
-	u8 wbuf[1] = { offs };
-	return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1);
+	u8 *buf;
+	int rc;
+
+	buf = kmalloc(2, GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+
+	buf[0] = offs;
+
+	rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1);
+	*val = buf[1];
+	kfree(buf);
+
+	return rc;
 }
 EXPORT_SYMBOL(dibusb_read_eeprom_byte);
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/can/usb/ems_usb.c linux-libre-3.18.88-gnu/drivers/net/can/usb/ems_usb.c
--- linux-libre-3.18.87-gnu/drivers/net/can/usb/ems_usb.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/can/usb/ems_usb.c	2017-12-16 04:32:31.000000000 -0500
@@ -290,6 +290,8 @@ static void ems_usb_read_interrupt_callb
 
 	case -ECONNRESET: /* unlink */
 	case -ENOENT:
+	case -EPIPE:
+	case -EPROTO:
 	case -ESHUTDOWN:
 		return;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/can/usb/esd_usb2.c linux-libre-3.18.88-gnu/drivers/net/can/usb/esd_usb2.c
--- linux-libre-3.18.87-gnu/drivers/net/can/usb/esd_usb2.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/can/usb/esd_usb2.c	2017-12-16 04:32:31.000000000 -0500
@@ -395,6 +395,8 @@ static void esd_usb2_read_bulk_callback(
 		break;
 
 	case -ENOENT:
+	case -EPIPE:
+	case -EPROTO:
 	case -ESHUTDOWN:
 		return;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/can/usb/kvaser_usb.c linux-libre-3.18.88-gnu/drivers/net/can/usb/kvaser_usb.c
--- linux-libre-3.18.87-gnu/drivers/net/can/usb/kvaser_usb.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/can/usb/kvaser_usb.c	2017-12-16 04:32:31.000000000 -0500
@@ -415,8 +415,8 @@ static int kvaser_usb_wait_msg(const str
 			}
 
 			if (pos + tmp->len > actual_len) {
-				dev_err(dev->udev->dev.parent,
-					"Format error\n");
+				dev_err_ratelimited(dev->udev->dev.parent,
+						    "Format error\n");
 				break;
 			}
 
@@ -602,6 +602,7 @@ static int kvaser_usb_simple_msg_async(s
 	if (err) {
 		netdev_err(netdev, "Error transmitting URB\n");
 		usb_unanchor_urb(urb);
+		kfree(buf);
 		usb_free_urb(urb);
 		kfree(buf);
 		return err;
@@ -980,6 +981,8 @@ static void kvaser_usb_read_bulk_callbac
 	case 0:
 		break;
 	case -ENOENT:
+	case -EPIPE:
+	case -EPROTO:
 	case -ESHUTDOWN:
 		return;
 	default:
@@ -988,7 +991,7 @@ static void kvaser_usb_read_bulk_callbac
 		goto resubmit_urb;
 	}
 
-	while (pos <= urb->actual_length - MSG_HEADER_LEN) {
+	while (pos <= (int)(urb->actual_length - MSG_HEADER_LEN)) {
 		msg = urb->transfer_buffer + pos;
 
 		/* The Kvaser firmware can only read and write messages that
@@ -1006,7 +1009,8 @@ static void kvaser_usb_read_bulk_callbac
 		}
 
 		if (pos + msg->len > urb->actual_length) {
-			dev_err(dev->udev->dev.parent, "Format error\n");
+			dev_err_ratelimited(dev->udev->dev.parent,
+					    "Format error\n");
 			break;
 		}
 
@@ -1385,6 +1389,7 @@ static netdev_tx_t kvaser_usb_start_xmit
 
 		atomic_dec(&priv->active_tx_urbs);
 		usb_unanchor_urb(urb);
+		kfree(buf);
 
 		stats->tx_dropped++;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/can/usb/usb_8dev.c linux-libre-3.18.88-gnu/drivers/net/can/usb/usb_8dev.c
--- linux-libre-3.18.87-gnu/drivers/net/can/usb/usb_8dev.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/can/usb/usb_8dev.c	2017-12-16 04:32:31.000000000 -0500
@@ -527,6 +527,8 @@ static void usb_8dev_read_bulk_callback(
 		break;
 
 	case -ENOENT:
+	case -EPIPE:
+	case -EPROTO:
 	case -ESHUTDOWN:
 		return;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
--- linux-libre-3.18.87-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c	2017-12-16 04:32:31.000000000 -0500
@@ -826,7 +826,7 @@ int bnx2x_vfpf_set_mcast(struct net_devi
 	struct bnx2x *bp = netdev_priv(dev);
 	struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters;
 	struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp;
-	int rc, i = 0;
+	int rc = 0, i = 0;
 	struct netdev_hw_addr *ha;
 
 	if (bp->state != BNX2X_STATE_OPEN) {
@@ -841,6 +841,15 @@ int bnx2x_vfpf_set_mcast(struct net_devi
 	/* Get Rx mode requested */
 	DP(NETIF_MSG_IFUP, "dev->flags = %x\n", dev->flags);
 
+	/* We support PFVF_MAX_MULTICAST_PER_VF mcast addresses tops */
+	if (netdev_mc_count(dev) > PFVF_MAX_MULTICAST_PER_VF) {
+		DP(NETIF_MSG_IFUP,
+		   "VF supports not more than %d multicast MAC addresses\n",
+		   PFVF_MAX_MULTICAST_PER_VF);
+		rc = -EINVAL;
+		goto out;
+	}
+
 	netdev_for_each_mc_addr(ha, dev) {
 		DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n",
 		   bnx2x_mc_addr(ha));
@@ -848,16 +857,6 @@ int bnx2x_vfpf_set_mcast(struct net_devi
 		i++;
 	}
 
-	/* We support four PFVF_MAX_MULTICAST_PER_VF mcast
-	  * addresses tops
-	  */
-	if (i >= PFVF_MAX_MULTICAST_PER_VF) {
-		DP(NETIF_MSG_IFUP,
-		   "VF supports not more than %d multicast MAC addresses\n",
-		   PFVF_MAX_MULTICAST_PER_VF);
-		return -EINVAL;
-	}
-
 	req->n_multicast = i;
 	req->flags |= VFPF_SET_Q_FILTERS_MULTICAST_CHANGED;
 	req->vf_qid = 0;
@@ -882,7 +881,7 @@ int bnx2x_vfpf_set_mcast(struct net_devi
 out:
 	bnx2x_vfpf_finalize(bp, &req->first_tlv);
 
-	return 0;
+	return rc;
 }
 
 int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp)
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/net/phy/spi_ks8995.c linux-libre-3.18.88-gnu/drivers/net/phy/spi_ks8995.c
--- linux-libre-3.18.87-gnu/drivers/net/phy/spi_ks8995.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/net/phy/spi_ks8995.c	2017-12-16 04:32:31.000000000 -0500
@@ -332,6 +332,7 @@ static int ks8995_probe(struct spi_devic
 	if (err)
 		return err;
 
+	sysfs_attr_init(&ks->regs_attr.attr);
 	err = sysfs_create_bin_file(&spi->dev.kobj, &ks->regs_attr);
 	if (err) {
 		dev_err(&spi->dev, "unable to create sysfs file, err=%d\n",
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/scsi/lpfc/lpfc_els.c linux-libre-3.18.88-gnu/drivers/scsi/lpfc/lpfc_els.c
--- linux-libre-3.18.87-gnu/drivers/scsi/lpfc/lpfc_els.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/scsi/lpfc/lpfc_els.c	2017-12-16 04:32:31.000000000 -0500
@@ -7265,11 +7265,17 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba
 			spin_lock_irq(shost->host_lock);
 			vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
 			spin_unlock_irq(shost->host_lock);
-			if (vport->port_type == LPFC_PHYSICAL_PORT
-				&& !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG))
-				lpfc_issue_init_vfi(vport);
-			else
+			if (mb->mbxStatus == MBX_NOT_FINISHED)
+				break;
+			if ((vport->port_type == LPFC_PHYSICAL_PORT) &&
+			    !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG)) {
+				if (phba->sli_rev == LPFC_SLI_REV4)
+					lpfc_issue_init_vfi(vport);
+				else
+					lpfc_initial_flogi(vport);
+			} else {
 				lpfc_initial_fdisc(vport);
+			}
 			break;
 		}
 	} else {
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/usb/gadget/configfs.c linux-libre-3.18.88-gnu/drivers/usb/gadget/configfs.c
--- linux-libre-3.18.87-gnu/drivers/usb/gadget/configfs.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/usb/gadget/configfs.c	2017-12-16 04:32:31.000000000 -0500
@@ -266,6 +266,7 @@ static ssize_t gadget_dev_desc_UDC_store
 		ret = unregister_gadget(gi);
 		if (ret)
 			goto err;
+		kfree(name);
 	} else {
 		if (gi->udc_name) {
 			ret = -EBUSY;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/usb/gadget/function/f_fs.c linux-libre-3.18.88-gnu/drivers/usb/gadget/function/f_fs.c
--- linux-libre-3.18.87-gnu/drivers/usb/gadget/function/f_fs.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/usb/gadget/function/f_fs.c	2017-12-16 04:32:31.000000000 -0500
@@ -816,7 +816,7 @@ static ssize_t ffs_epfile_io(struct file
 		}
 
 		if (io_data->aio) {
-			req = usb_ep_alloc_request(ep->ep, GFP_KERNEL);
+			req = usb_ep_alloc_request(ep->ep, GFP_ATOMIC);
 			if (unlikely(!req))
 				goto error_lock;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/usb/gadget/legacy/inode.c linux-libre-3.18.88-gnu/drivers/usb/gadget/legacy/inode.c
--- linux-libre-3.18.87-gnu/drivers/usb/gadget/legacy/inode.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/usb/gadget/legacy/inode.c	2017-12-16 04:32:31.000000000 -0500
@@ -1921,8 +1921,10 @@ dev_config (struct file *fd, const char
 
 	spin_lock_irq (&dev->lock);
 	value = -EINVAL;
-	if (dev->buf)
+	if (dev->buf) {
+		kfree(kbuf);
 		goto fail;
+	}
 	dev->buf = kbuf;
 
 	/* full or low speed config */
diff -druNp --no-dereference linux-libre-3.18.87-gnu/drivers/virtio/virtio.c linux-libre-3.18.88-gnu/drivers/virtio/virtio.c
--- linux-libre-3.18.87-gnu/drivers/virtio/virtio.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/drivers/virtio/virtio.c	2017-12-16 04:32:31.000000000 -0500
@@ -268,6 +268,8 @@ int register_virtio_device(struct virtio
 	/* device_register() causes the bus infrastructure to look for a
 	 * matching driver. */
 	err = device_register(&dev->dev);
+	if (err)
+		ida_simple_remove(&virtio_index_ida, dev->index);
 out:
 	if (err)
 		add_status(dev, VIRTIO_CONFIG_S_FAILED);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/fs/afs/cmservice.c linux-libre-3.18.88-gnu/fs/afs/cmservice.c
--- linux-libre-3.18.87-gnu/fs/afs/cmservice.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/fs/afs/cmservice.c	2017-12-16 04:32:31.000000000 -0500
@@ -115,6 +115,9 @@ bool afs_cm_incoming_call(struct afs_cal
 	case CBProbe:
 		call->type = &afs_SRXCBProbe;
 		return true;
+	case CBProbeUuid:
+		call->type = &afs_SRXCBProbeUuid;
+		return true;
 	case CBTellMeAboutYourself:
 		call->type = &afs_SRXCBTellMeAboutYourself;
 		return true;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/fs/nfs/dir.c linux-libre-3.18.88-gnu/fs/nfs/dir.c
--- linux-libre-3.18.87-gnu/fs/nfs/dir.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/fs/nfs/dir.c	2017-12-16 04:32:31.000000000 -0500
@@ -2063,7 +2063,7 @@ out:
 		if (new_inode != NULL)
 			nfs_drop_nlink(new_inode);
 		d_move(old_dentry, new_dentry);
-		nfs_set_verifier(new_dentry,
+		nfs_set_verifier(old_dentry,
 					nfs_save_change_attribute(new_dir));
 	} else if (error == -ENOENT)
 		nfs_dentry_handle_enoent(old_dentry);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/include/linux/genalloc.h linux-libre-3.18.88-gnu/include/linux/genalloc.h
--- linux-libre-3.18.87-gnu/include/linux/genalloc.h	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/include/linux/genalloc.h	2017-12-16 04:32:31.000000000 -0500
@@ -31,6 +31,7 @@
 #define __GENALLOC_H__
 
 #include <linux/spinlock_types.h>
+#include <linux/atomic.h>
 
 struct device;
 struct device_node;
@@ -66,7 +67,7 @@ struct gen_pool {
  */
 struct gen_pool_chunk {
 	struct list_head next_chunk;	/* next chunk in pool */
-	atomic_t avail;
+	atomic_long_t avail;
 	phys_addr_t phys_addr;		/* physical starting address of memory chunk */
 	unsigned long start_addr;	/* start address of memory chunk */
 	unsigned long end_addr;		/* end address of memory chunk (inclusive) */
diff -druNp --no-dereference linux-libre-3.18.87-gnu/include/linux/sysfs.h linux-libre-3.18.88-gnu/include/linux/sysfs.h
--- linux-libre-3.18.87-gnu/include/linux/sysfs.h	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/include/linux/sysfs.h	2017-12-16 04:32:31.000000000 -0500
@@ -82,6 +82,12 @@ struct attribute_group {
 	.show	= _name##_show,						\
 }
 
+#define __ATTR_RO_MODE(_name, _mode) {					\
+	.attr	= { .name = __stringify(_name),				\
+		    .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },		\
+	.show	= _name##_show,						\
+}
+
 #define __ATTR_WO(_name) {						\
 	.attr	= { .name = __stringify(_name), .mode = S_IWUSR },	\
 	.store	= _name##_store,					\
diff -druNp --no-dereference linux-libre-3.18.87-gnu/kernel/audit.c linux-libre-3.18.88-gnu/kernel/audit.c
--- linux-libre-3.18.87-gnu/kernel/audit.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/kernel/audit.c	2017-12-16 04:32:31.000000000 -0500
@@ -79,13 +79,13 @@ static int	audit_initialized;
 #define AUDIT_OFF	0
 #define AUDIT_ON	1
 #define AUDIT_LOCKED	2
-u32		audit_enabled;
-u32		audit_ever_enabled;
+u32		audit_enabled = AUDIT_OFF;
+u32		audit_ever_enabled = !!AUDIT_OFF;
 
 EXPORT_SYMBOL_GPL(audit_enabled);
 
 /* Default state when kernel boots without any parameters. */
-static u32	audit_default;
+static u32	audit_default = AUDIT_OFF;
 
 /* If auditing cannot proceed, audit_failure selects what happens. */
 static u32	audit_failure = AUDIT_FAIL_PRINTK;
@@ -1173,8 +1173,6 @@ static int __init audit_init(void)
 	skb_queue_head_init(&audit_skb_queue);
 	skb_queue_head_init(&audit_skb_hold_queue);
 	audit_initialized = AUDIT_INITIALIZED;
-	audit_enabled = audit_default;
-	audit_ever_enabled |= !!audit_default;
 
 	audit_log(NULL, GFP_KERNEL, AUDIT_KERNEL, "initialized");
 
@@ -1191,6 +1189,8 @@ static int __init audit_enable(char *str
 	audit_default = !!simple_strtol(str, NULL, 0);
 	if (!audit_default)
 		audit_initialized = AUDIT_DISABLED;
+	audit_enabled = audit_default;
+	audit_ever_enabled = !!audit_enabled;
 
 	pr_info("%s\n", audit_default ?
 		"enabled (after initialization)" : "disabled (until reboot)");
diff -druNp --no-dereference linux-libre-3.18.87-gnu/kernel/debug/kdb/kdb_io.c linux-libre-3.18.88-gnu/kernel/debug/kdb/kdb_io.c
--- linux-libre-3.18.87-gnu/kernel/debug/kdb/kdb_io.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/kernel/debug/kdb/kdb_io.c	2017-12-16 04:32:31.000000000 -0500
@@ -349,7 +349,7 @@ poll_again:
 			}
 			kdb_printf("\n");
 			for (i = 0; i < count; i++) {
-				if (kallsyms_symbol_next(p_tmp, i) < 0)
+				if (WARN_ON(!kallsyms_symbol_next(p_tmp, i)))
 					break;
 				kdb_printf("%s ", p_tmp);
 				*(p_tmp + len) = '\0';
diff -druNp --no-dereference linux-libre-3.18.87-gnu/kernel/workqueue.c linux-libre-3.18.88-gnu/kernel/workqueue.c
--- linux-libre-3.18.87-gnu/kernel/workqueue.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/kernel/workqueue.c	2017-12-16 04:32:31.000000000 -0500
@@ -1452,6 +1452,7 @@ static void __queue_delayed_work(int cpu
 	struct timer_list *timer = &dwork->timer;
 	struct work_struct *work = &dwork->work;
 
+	WARN_ON_ONCE(!wq);
 	WARN_ON_ONCE(timer->function != delayed_work_timer_fn ||
 		     timer->data != (unsigned long)dwork);
 	WARN_ON_ONCE(timer_pending(timer));
diff -druNp --no-dereference linux-libre-3.18.87-gnu/lib/asn1_decoder.c linux-libre-3.18.88-gnu/lib/asn1_decoder.c
--- linux-libre-3.18.87-gnu/lib/asn1_decoder.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/lib/asn1_decoder.c	2017-12-16 04:32:31.000000000 -0500
@@ -422,6 +422,8 @@ next_op:
 			else
 				act = machine[pc + 1];
 			ret = actions[act](context, hdr, 0, data + tdp, len);
+			if (ret < 0)
+				return ret;
 		}
 		pc += asn1_op_lengths[op];
 		goto next_op;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/lib/dynamic_debug.c linux-libre-3.18.88-gnu/lib/dynamic_debug.c
--- linux-libre-3.18.87-gnu/lib/dynamic_debug.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/lib/dynamic_debug.c	2017-12-16 04:32:31.000000000 -0500
@@ -353,6 +353,10 @@ static int ddebug_parse_query(char *word
 				if (parse_lineno(last, &query->last_lineno) < 0)
 					return -EINVAL;
 
+				/* special case for last lineno not specified */
+				if (query->last_lineno == 0)
+					query->last_lineno = UINT_MAX;
+
 				if (query->last_lineno < query->first_lineno) {
 					pr_err("last-line:%d < 1st-line:%d\n",
 						query->last_lineno,
diff -druNp --no-dereference linux-libre-3.18.87-gnu/lib/genalloc.c linux-libre-3.18.88-gnu/lib/genalloc.c
--- linux-libre-3.18.87-gnu/lib/genalloc.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/lib/genalloc.c	2017-12-16 04:32:31.000000000 -0500
@@ -194,7 +194,7 @@ int gen_pool_add_virt(struct gen_pool *p
 	chunk->phys_addr = phys;
 	chunk->start_addr = virt;
 	chunk->end_addr = virt + size - 1;
-	atomic_set(&chunk->avail, size);
+	atomic_long_set(&chunk->avail, size);
 
 	spin_lock(&pool->lock);
 	list_add_rcu(&chunk->next_chunk, &pool->chunks);
@@ -285,7 +285,7 @@ unsigned long gen_pool_alloc(struct gen_
 	nbits = (size + (1UL << order) - 1) >> order;
 	rcu_read_lock();
 	list_for_each_entry_rcu(chunk, &pool->chunks, next_chunk) {
-		if (size > atomic_read(&chunk->avail))
+		if (size > atomic_long_read(&chunk->avail))
 			continue;
 
 		end_bit = chunk_size(chunk) >> order;
@@ -304,7 +304,7 @@ retry:
 
 		addr = chunk->start_addr + ((unsigned long)start_bit << order);
 		size = nbits << order;
-		atomic_sub(size, &chunk->avail);
+		atomic_long_sub(size, &chunk->avail);
 		break;
 	}
 	rcu_read_unlock();
@@ -370,7 +370,7 @@ void gen_pool_free(struct gen_pool *pool
 			remain = bitmap_clear_ll(chunk->bits, start_bit, nbits);
 			BUG_ON(remain);
 			size = nbits << order;
-			atomic_add(size, &chunk->avail);
+			atomic_long_add(size, &chunk->avail);
 			rcu_read_unlock();
 			return;
 		}
@@ -444,7 +444,7 @@ size_t gen_pool_avail(struct gen_pool *p
 
 	rcu_read_lock();
 	list_for_each_entry_rcu(chunk, &pool->chunks, next_chunk)
-		avail += atomic_read(&chunk->avail);
+		avail += atomic_long_read(&chunk->avail);
 	rcu_read_unlock();
 	return avail;
 }
diff -druNp --no-dereference linux-libre-3.18.87-gnu/Makefile linux-libre-3.18.88-gnu/Makefile
--- linux-libre-3.18.87-gnu/Makefile	2017-12-09 21:44:10.000000000 -0500
+++ linux-libre-3.18.88-gnu/Makefile	2017-12-16 10:22:27.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 87
+SUBLEVEL = 88
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/ipv4/route.c linux-libre-3.18.88-gnu/net/ipv4/route.c
--- linux-libre-3.18.87-gnu/net/ipv4/route.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/ipv4/route.c	2017-12-16 04:32:31.000000000 -0500
@@ -622,9 +622,12 @@ static void update_or_create_fnhe(struct
 	struct fnhe_hash_bucket *hash;
 	struct fib_nh_exception *fnhe;
 	struct rtable *rt;
+	u32 genid, hval;
 	unsigned int i;
 	int depth;
-	u32 hval = fnhe_hashfun(daddr);
+
+	genid = fnhe_genid(dev_net(nh->nh_dev));
+	hval = fnhe_hashfun(daddr);
 
 	spin_lock_bh(&fnhe_lock);
 
@@ -647,12 +650,13 @@ static void update_or_create_fnhe(struct
 	}
 
 	if (fnhe) {
+		if (fnhe->fnhe_genid != genid)
+			fnhe->fnhe_genid = genid;
 		if (gw)
 			fnhe->fnhe_gw = gw;
-		if (pmtu) {
+		if (pmtu)
 			fnhe->fnhe_pmtu = pmtu;
-			fnhe->fnhe_expires = max(1UL, expires);
-		}
+		fnhe->fnhe_expires = max(1UL, expires);
 		/* Update all cached dsts too */
 		rt = rcu_dereference(fnhe->fnhe_rth_input);
 		if (rt)
@@ -671,7 +675,7 @@ static void update_or_create_fnhe(struct
 			fnhe->fnhe_next = hash->chain;
 			rcu_assign_pointer(hash->chain, fnhe);
 		}
-		fnhe->fnhe_genid = fnhe_genid(dev_net(nh->nh_dev));
+		fnhe->fnhe_genid = genid;
 		fnhe->fnhe_daddr = daddr;
 		fnhe->fnhe_gw = gw;
 		fnhe->fnhe_pmtu = pmtu;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/ipv6/af_inet6.c linux-libre-3.18.88-gnu/net/ipv6/af_inet6.c
--- linux-libre-3.18.87-gnu/net/ipv6/af_inet6.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/ipv6/af_inet6.c	2017-12-16 04:32:31.000000000 -0500
@@ -887,12 +887,12 @@ static int __init inet6_init(void)
 	err = register_pernet_subsys(&inet6_net_ops);
 	if (err)
 		goto register_pernet_fail;
-	err = icmpv6_init();
-	if (err)
-		goto icmp_fail;
 	err = ip6_mr_init();
 	if (err)
 		goto ipmr_fail;
+	err = icmpv6_init();
+	if (err)
+		goto icmp_fail;
 	err = ndisc_init();
 	if (err)
 		goto ndisc_fail;
@@ -1010,10 +1010,10 @@ igmp_fail:
 	ndisc_cleanup();
 ndisc_fail:
 	ip6_mr_cleanup();
-ipmr_fail:
-	icmpv6_cleanup();
 icmp_fail:
 	unregister_pernet_subsys(&inet6_net_ops);
+ipmr_fail:
+	icmpv6_cleanup();
 register_pernet_fail:
 	sock_unregister(PF_INET6);
 	rtnl_unregister_all(PF_INET6);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/ipv6/sit.c linux-libre-3.18.88-gnu/net/ipv6/sit.c
--- linux-libre-3.18.87-gnu/net/ipv6/sit.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/ipv6/sit.c	2017-12-16 04:32:31.000000000 -0500
@@ -1093,6 +1093,7 @@ static void ipip6_tunnel_update(struct i
 	ipip6_tunnel_link(sitn, t);
 	t->parms.iph.ttl = p->iph.ttl;
 	t->parms.iph.tos = p->iph.tos;
+	t->parms.iph.frag_off = p->iph.frag_off;
 	if (t->parms.link != p->link) {
 		t->parms.link = p->link;
 		ipip6_tunnel_bind_dev(t->dev);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/packet/af_packet.c linux-libre-3.18.88-gnu/net/packet/af_packet.c
--- linux-libre-3.18.87-gnu/net/packet/af_packet.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/packet/af_packet.c	2017-12-16 04:32:31.000000000 -0500
@@ -2704,6 +2704,10 @@ static int packet_do_bind(struct sock *s
 	if (need_rehook) {
 		if (po->running) {
 			rcu_read_unlock();
+			/* prevents packet_notifier() from calling
+			 * register_prot_hook()
+			 */
+			po->num = 0;
 			__unregister_prot_hook(sk, true);
 			rcu_read_lock();
 			dev_curr = po->prot_hook.dev;
@@ -2712,6 +2716,7 @@ static int packet_do_bind(struct sock *s
 								 dev->ifindex);
 		}
 
+		BUG_ON(po->running);
 		po->num = proto;
 		po->prot_hook.type = proto;
 
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/rds/rdma.c linux-libre-3.18.88-gnu/net/rds/rdma.c
--- linux-libre-3.18.87-gnu/net/rds/rdma.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/rds/rdma.c	2017-12-16 04:32:31.000000000 -0500
@@ -184,7 +184,7 @@ static int __rds_rdma_map(struct rds_soc
 	long i;
 	int ret;
 
-	if (rs->rs_bound_addr == 0) {
+	if (rs->rs_bound_addr == 0 || !rs->rs_transport) {
 		ret = -ENOTCONN; /* XXX not a great errno */
 		goto out;
 	}
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/sctp/socket.c linux-libre-3.18.88-gnu/net/sctp/socket.c
--- linux-libre-3.18.87-gnu/net/sctp/socket.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/sctp/socket.c	2017-12-16 04:32:31.000000000 -0500
@@ -82,8 +82,8 @@
 /* Forward declarations for internal helper functions. */
 static int sctp_writeable(struct sock *sk);
 static void sctp_wfree(struct sk_buff *skb);
-static int sctp_wait_for_sndbuf(struct sctp_association *, long *timeo_p,
-				size_t msg_len);
+static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p,
+				size_t msg_len, struct sock **orig_sk);
 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p);
 static int sctp_wait_for_connect(struct sctp_association *, long *timeo_p);
 static int sctp_wait_for_accept(struct sock *sk, long timeo);
@@ -1949,9 +1949,16 @@ static int sctp_sendmsg(struct kiocb *io
 
 	timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
 	if (!sctp_wspace(asoc)) {
-		err = sctp_wait_for_sndbuf(asoc, &timeo, msg_len);
-		if (err)
+		/* sk can be changed by peel off when waiting for buf. */
+		err = sctp_wait_for_sndbuf(asoc, &timeo, msg_len, &sk);
+		if (err) {
+			if (err == -ESRCH) {
+				/* asoc is already dead. */
+				new_asoc = NULL;
+				err = -EPIPE;
+			}
 			goto out_free;
+		}
 	}
 
 	/* If an address is passed with the sendto/sendmsg call, it is used
@@ -4473,12 +4480,6 @@ int sctp_do_peeloff(struct sock *sk, sct
 	if (!asoc)
 		return -EINVAL;
 
-	/* If there is a thread waiting on more sndbuf space for
-	 * sending on this asoc, it cannot be peeled.
-	 */
-	if (waitqueue_active(&asoc->wait))
-		return -EBUSY;
-
 	/* An association cannot be branched off from an already peeled-off
 	 * socket, nor is this supported for tcp style sockets.
 	 */
@@ -6982,7 +6983,7 @@ void sctp_sock_rfree(struct sk_buff *skb
 
 /* Helper function to wait for space in the sndbuf.  */
 static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p,
-				size_t msg_len)
+				size_t msg_len, struct sock **orig_sk)
 {
 	struct sock *sk = asoc->base.sk;
 	int err = 0;
@@ -6999,10 +7000,11 @@ static int sctp_wait_for_sndbuf(struct s
 	for (;;) {
 		prepare_to_wait_exclusive(&asoc->wait, &wait,
 					  TASK_INTERRUPTIBLE);
+		if (asoc->base.dead)
+			goto do_dead;
 		if (!*timeo_p)
 			goto do_nonblock;
-		if (sk->sk_err || asoc->state >= SCTP_STATE_SHUTDOWN_PENDING ||
-		    asoc->base.dead)
+		if (sk->sk_err || asoc->state >= SCTP_STATE_SHUTDOWN_PENDING)
 			goto do_error;
 		if (signal_pending(current))
 			goto do_interrupted;
@@ -7015,11 +7017,17 @@ static int sctp_wait_for_sndbuf(struct s
 		release_sock(sk);
 		current_timeo = schedule_timeout(current_timeo);
 		lock_sock(sk);
+		if (sk != asoc->base.sk) {
+			release_sock(sk);
+			sk = asoc->base.sk;
+			lock_sock(sk);
+		}
 
 		*timeo_p = current_timeo;
 	}
 
 out:
+	*orig_sk = sk;
 	finish_wait(&asoc->wait, &wait);
 
 	/* Release the association's refcnt.  */
@@ -7027,6 +7035,10 @@ out:
 
 	return err;
 
+do_dead:
+	err = -ESRCH;
+	goto out;
+
 do_error:
 	err = -EPIPE;
 	goto out;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/sunrpc/sched.c linux-libre-3.18.88-gnu/net/sunrpc/sched.c
--- linux-libre-3.18.87-gnu/net/sunrpc/sched.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/sunrpc/sched.c	2017-12-16 04:32:31.000000000 -0500
@@ -273,10 +273,9 @@ static inline void rpc_task_set_debuginf
 
 static void rpc_set_active(struct rpc_task *task)
 {
-	trace_rpc_task_begin(task->tk_client, task, NULL);
-
 	rpc_task_set_debuginfo(task);
 	set_bit(RPC_TASK_ACTIVE, &task->tk_runstate);
+	trace_rpc_task_begin(task->tk_client, task, NULL);
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.18.87-gnu/net/xfrm/xfrm_policy.c linux-libre-3.18.88-gnu/net/xfrm/xfrm_policy.c
--- linux-libre-3.18.87-gnu/net/xfrm/xfrm_policy.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/net/xfrm/xfrm_policy.c	2017-12-16 04:32:31.000000000 -0500
@@ -1345,6 +1345,7 @@ static struct xfrm_policy *clone_policy(
 		newp->xfrm_nr = old->xfrm_nr;
 		newp->index = old->index;
 		newp->type = old->type;
+		newp->family = old->family;
 		memcpy(newp->xfrm_vec, old->xfrm_vec,
 		       newp->xfrm_nr*sizeof(struct xfrm_tmpl));
 		write_lock_bh(&net->xfrm.xfrm_policy_lock);
diff -druNp --no-dereference linux-libre-3.18.87-gnu/security/keys/request_key.c linux-libre-3.18.88-gnu/security/keys/request_key.c
--- linux-libre-3.18.87-gnu/security/keys/request_key.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/security/keys/request_key.c	2017-12-16 04:32:31.000000000 -0500
@@ -250,11 +250,12 @@ static int construct_key(struct key *key
  * The keyring selected is returned with an extra reference upon it which the
  * caller must release.
  */
-static void construct_get_dest_keyring(struct key **_dest_keyring)
+static int construct_get_dest_keyring(struct key **_dest_keyring)
 {
 	struct request_key_auth *rka;
 	const struct cred *cred = current_cred();
 	struct key *dest_keyring = *_dest_keyring, *authkey;
+	int ret;
 
 	kenter("%p", dest_keyring);
 
@@ -263,6 +264,8 @@ static void construct_get_dest_keyring(s
 		/* the caller supplied one */
 		key_get(dest_keyring);
 	} else {
+		bool do_perm_check = true;
+
 		/* use a default keyring; falling through the cases until we
 		 * find one that we actually have */
 		switch (cred->jit_keyring) {
@@ -277,8 +280,10 @@ static void construct_get_dest_keyring(s
 					dest_keyring =
 						key_get(rka->dest_keyring);
 				up_read(&authkey->sem);
-				if (dest_keyring)
+				if (dest_keyring) {
+					do_perm_check = false;
 					break;
+				}
 			}
 
 		case KEY_REQKEY_DEFL_THREAD_KEYRING:
@@ -313,11 +318,29 @@ static void construct_get_dest_keyring(s
 		default:
 			BUG();
 		}
+
+		/*
+		 * Require Write permission on the keyring.  This is essential
+		 * because the default keyring may be the session keyring, and
+		 * joining a keyring only requires Search permission.
+		 *
+		 * However, this check is skipped for the "requestor keyring" so
+		 * that /sbin/request-key can itself use request_key() to add
+		 * keys to the original requestor's destination keyring.
+		 */
+		if (dest_keyring && do_perm_check) {
+			ret = key_permission(make_key_ref(dest_keyring, 1),
+					     KEY_NEED_WRITE);
+			if (ret) {
+				key_put(dest_keyring);
+				return ret;
+			}
+		}
 	}
 
 	*_dest_keyring = dest_keyring;
 	kleave(" [dk %d]", key_serial(dest_keyring));
-	return;
+	return 0;
 }
 
 /*
@@ -439,11 +462,15 @@ static struct key *construct_key_and_lin
 
 	kenter("");
 
-	user = key_user_lookup(current_fsuid());
-	if (!user)
-		return ERR_PTR(-ENOMEM);
+	ret = construct_get_dest_keyring(&dest_keyring);
+	if (ret)
+		goto error;
 
-	construct_get_dest_keyring(&dest_keyring);
+	user = key_user_lookup(current_fsuid());
+	if (!user) {
+		ret = -ENOMEM;
+		goto error_put_dest_keyring;
+	}
 
 	ret = construct_alloc_key(ctx, dest_keyring, flags, user, &key);
 	key_user_put(user);
@@ -458,7 +485,7 @@ static struct key *construct_key_and_lin
 	} else if (ret == -EINPROGRESS) {
 		ret = 0;
 	} else {
-		goto couldnt_alloc_key;
+		goto error_put_dest_keyring;
 	}
 
 	key_put(dest_keyring);
@@ -468,8 +495,9 @@ static struct key *construct_key_and_lin
 construction_failed:
 	key_negate_and_link(key, key_negative_timeout, NULL, NULL);
 	key_put(key);
-couldnt_alloc_key:
+error_put_dest_keyring:
 	key_put(dest_keyring);
+error:
 	kleave(" = %d", ret);
 	return ERR_PTR(ret);
 }
diff -druNp --no-dereference linux-libre-3.18.87-gnu/sound/core/pcm.c linux-libre-3.18.88-gnu/sound/core/pcm.c
--- linux-libre-3.18.87-gnu/sound/core/pcm.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/sound/core/pcm.c	2017-12-16 04:32:31.000000000 -0500
@@ -150,7 +150,9 @@ static int snd_pcm_control_ioctl(struct
 				err = -ENXIO;
 				goto _error;
 			}
+			mutex_lock(&pcm->open_mutex);
 			err = snd_pcm_info_user(substream, info);
+			mutex_unlock(&pcm->open_mutex);
 		_error:
 			mutex_unlock(&register_mutex);
 			return err;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/sound/core/seq/seq_timer.c linux-libre-3.18.88-gnu/sound/core/seq/seq_timer.c
--- linux-libre-3.18.87-gnu/sound/core/seq/seq_timer.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/sound/core/seq/seq_timer.c	2017-12-16 04:32:31.000000000 -0500
@@ -355,7 +355,7 @@ static int initialize_timer(struct snd_s
 	unsigned long freq;
 
 	t = tmr->timeri->timer;
-	if (snd_BUG_ON(!t))
+	if (!t)
 		return -EINVAL;
 
 	freq = tmr->preferred_resolution;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/sound/usb/mixer.c linux-libre-3.18.88-gnu/sound/usb/mixer.c
--- linux-libre-3.18.87-gnu/sound/usb/mixer.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/sound/usb/mixer.c	2017-12-16 04:32:31.000000000 -0500
@@ -199,6 +199,10 @@ static int snd_usb_copy_string_desc(stru
 				    int index, char *buf, int maxlen)
 {
 	int len = usb_string(state->chip->dev, index, buf, maxlen - 1);
+
+	if (len < 0)
+		return 0;
+
 	buf[len] = 0;
 	return len;
 }
@@ -2095,13 +2099,14 @@ static int parse_audio_selector_unit(str
 	if (len)
 		;
 	else if (nameid)
-		snd_usb_copy_string_desc(state, nameid, kctl->id.name,
+		len = snd_usb_copy_string_desc(state, nameid, kctl->id.name,
 					 sizeof(kctl->id.name));
-	else {
+	else
 		len = get_term_name(state, &state->oterm,
 				    kctl->id.name, sizeof(kctl->id.name), 0);
-		if (!len)
-			strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
+
+	if (!len) {
+		strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
 
 		if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR)
 			append_ctl_name(kctl, " Clock Source");
diff -druNp --no-dereference linux-libre-3.18.87-gnu/tools/hv/hv_kvp_daemon.c linux-libre-3.18.88-gnu/tools/hv/hv_kvp_daemon.c
--- linux-libre-3.18.87-gnu/tools/hv/hv_kvp_daemon.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/tools/hv/hv_kvp_daemon.c	2017-12-16 04:32:31.000000000 -0500
@@ -196,11 +196,14 @@ static void kvp_update_mem_state(int poo
 	for (;;) {
 		readp = &record[records_read];
 		records_read += fread(readp, sizeof(struct kvp_record),
-					ENTRIES_PER_BLOCK * num_blocks,
-					filep);
+				ENTRIES_PER_BLOCK * num_blocks - records_read,
+				filep);
 
 		if (ferror(filep)) {
-			syslog(LOG_ERR, "Failed to read file, pool: %d", pool);
+			syslog(LOG_ERR,
+				"Failed to read file, pool: %d; error: %d %s",
+				 pool, errno, strerror(errno));
+			kvp_release_lock(pool);
 			exit(EXIT_FAILURE);
 		}
 
@@ -213,6 +216,7 @@ static void kvp_update_mem_state(int poo
 
 			if (record == NULL) {
 				syslog(LOG_ERR, "malloc failed");
+				kvp_release_lock(pool);
 				exit(EXIT_FAILURE);
 			}
 			continue;
@@ -227,15 +231,11 @@ static void kvp_update_mem_state(int poo
 	fclose(filep);
 	kvp_release_lock(pool);
 }
+
 static int kvp_file_init(void)
 {
 	int  fd;
-	FILE *filep;
-	size_t records_read;
 	char *fname;
-	struct kvp_record *record;
-	struct kvp_record *readp;
-	int num_blocks;
 	int i;
 	int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
 
@@ -249,61 +249,19 @@ static int kvp_file_init(void)
 
 	for (i = 0; i < KVP_POOL_COUNT; i++) {
 		fname = kvp_file_info[i].fname;
-		records_read = 0;
-		num_blocks = 1;
 		sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i);
 		fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);
 
 		if (fd == -1)
 			return 1;
 
-
-		filep = fopen(fname, "re");
-		if (!filep) {
-			close(fd);
-			return 1;
-		}
-
-		record = malloc(alloc_unit * num_blocks);
-		if (record == NULL) {
-			fclose(filep);
-			close(fd);
-			return 1;
-		}
-		for (;;) {
-			readp = &record[records_read];
-			records_read += fread(readp, sizeof(struct kvp_record),
-					ENTRIES_PER_BLOCK,
-					filep);
-
-			if (ferror(filep)) {
-				syslog(LOG_ERR, "Failed to read file, pool: %d",
-				       i);
-				exit(EXIT_FAILURE);
-			}
-
-			if (!feof(filep)) {
-				/*
-				 * We have more data to read.
-				 */
-				num_blocks++;
-				record = realloc(record, alloc_unit *
-						num_blocks);
-				if (record == NULL) {
-					fclose(filep);
-					close(fd);
-					return 1;
-				}
-				continue;
-			}
-			break;
-		}
 		kvp_file_info[i].fd = fd;
-		kvp_file_info[i].num_blocks = num_blocks;
-		kvp_file_info[i].records = record;
-		kvp_file_info[i].num_records = records_read;
-		fclose(filep);
-
+		kvp_file_info[i].num_blocks = 1;
+		kvp_file_info[i].records = malloc(alloc_unit);
+		if (kvp_file_info[i].records == NULL)
+			return 1;
+		kvp_file_info[i].num_records = 0;
+		kvp_update_mem_state(i);
 	}
 
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.87-gnu/tools/testing/selftests/powerpc/harness.c linux-libre-3.18.88-gnu/tools/testing/selftests/powerpc/harness.c
--- linux-libre-3.18.87-gnu/tools/testing/selftests/powerpc/harness.c	2017-12-09 12:29:48.000000000 -0500
+++ linux-libre-3.18.88-gnu/tools/testing/selftests/powerpc/harness.c	2017-12-16 04:32:31.000000000 -0500
@@ -105,9 +105,11 @@ int test_harness(int (test_function)(voi
 
 	rc = run_test(test_function, name);
 
-	if (rc == MAGIC_SKIP_RETURN_VALUE)
+	if (rc == MAGIC_SKIP_RETURN_VALUE) {
 		test_skip(name);
-	else
+		/* so that skipped test is not marked as failed */
+		rc = 0;
+	} else
 		test_finish(name, rc);
 
 	return rc;
