diff -druNp --no-dereference linux-libre-3.18.86-gnu/arch/arm/mach-omap1/dma.c linux-libre-3.18.87-gnu/arch/arm/mach-omap1/dma.c
--- linux-libre-3.18.86-gnu/arch/arm/mach-omap1/dma.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/arch/arm/mach-omap1/dma.c	2017-12-09 12:29:48.000000000 -0500
@@ -31,7 +31,6 @@
 #include <mach/irqs.h>
 
 #define OMAP1_DMA_BASE			(0xfffed800)
-#define OMAP1_LOGICAL_DMA_CH_COUNT	17
 
 static u32 enable_1510_mode;
 
@@ -311,8 +310,6 @@ static int __init omap1_system_dma_init(
 		goto exit_iounmap;
 	}
 
-	d->lch_count		= OMAP1_LOGICAL_DMA_CH_COUNT;
-
 	/* Valid attributes for omap1 plus processors */
 	if (cpu_is_omap15xx())
 		d->dev_caps = ENABLE_1510_MODE;
@@ -329,13 +326,14 @@ static int __init omap1_system_dma_init(
 	d->dev_caps		|= CLEAR_CSR_ON_READ;
 	d->dev_caps		|= IS_WORD_16;
 
-	if (cpu_is_omap15xx())
-		d->chan_count = 9;
-	else if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
-		if (!(d->dev_caps & ENABLE_1510_MODE))
-			d->chan_count = 16;
+	/* available logical channels */
+	if (cpu_is_omap15xx()) {
+		d->lch_count = 9;
+	} else {
+		if (d->dev_caps & ENABLE_1510_MODE)
+			d->lch_count = 9;
 		else
-			d->chan_count = 9;
+			d->lch_count = 16;
 	}
 
 	p = dma_plat_info;
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/edac/sb_edac.c linux-libre-3.18.87-gnu/drivers/edac/sb_edac.c
--- linux-libre-3.18.86-gnu/drivers/edac/sb_edac.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/edac/sb_edac.c	2017-12-09 12:29:48.000000000 -0500
@@ -1645,6 +1645,7 @@ static int ibridge_mci_bind_devs(struct
 			break;
 		case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_TA:
 			pvt->pci_ta = pdev;
+			break;
 		case PCI_DEVICE_ID_INTEL_IBRIDGE_IMC_HA0_RAS:
 			pvt->pci_ras = pdev;
 			break;
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/md/bcache/request.c linux-libre-3.18.87-gnu/drivers/md/bcache/request.c
--- linux-libre-3.18.86-gnu/drivers/md/bcache/request.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/md/bcache/request.c	2017-12-09 12:29:48.000000000 -0500
@@ -706,7 +706,14 @@ static void cached_dev_read_error(struct
 	struct search *s = container_of(cl, struct search, cl);
 	struct bio *bio = &s->bio.bio;
 
-	if (s->recoverable) {
+	/*
+	 * If read request hit dirty data (s->read_dirty_data is true),
+	 * then recovery a failed read request from cached device may
+	 * get a stale data back. So read failure recovery is only
+	 * permitted when read request hit clean data in cache device,
+	 * or when cache read race happened.
+	 */
+	if (s->recoverable && !s->read_dirty_data) {
 		/* Retry from the backing device: */
 		trace_bcache_read_retry(s->orig_bio);
 
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/net/appletalk/ipddp.c linux-libre-3.18.87-gnu/drivers/net/appletalk/ipddp.c
--- linux-libre-3.18.86-gnu/drivers/net/appletalk/ipddp.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/net/appletalk/ipddp.c	2017-12-09 12:29:48.000000000 -0500
@@ -191,7 +191,7 @@ static netdev_tx_t ipddp_xmit(struct sk_
  */
 static int ipddp_create(struct ipddp_route *new_rt)
 {
-        struct ipddp_route *rt = kmalloc(sizeof(*rt), GFP_KERNEL);
+        struct ipddp_route *rt = kzalloc(sizeof(*rt), GFP_KERNEL);
 
         if (rt == NULL)
                 return -ENOMEM;
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/net/ethernet/freescale/fec_main.c linux-libre-3.18.87-gnu/drivers/net/ethernet/freescale/fec_main.c
--- linux-libre-3.18.86-gnu/drivers/net/ethernet/freescale/fec_main.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/net/ethernet/freescale/fec_main.c	2017-12-09 12:29:48.000000000 -0500
@@ -2793,6 +2793,7 @@ static void set_multicast_list(struct ne
 	struct netdev_hw_addr *ha;
 	unsigned int i, bit, data, crc, tmp;
 	unsigned char hash;
+	unsigned int hash_high = 0, hash_low = 0;
 
 	if (ndev->flags & IFF_PROMISC) {
 		tmp = readl(fep->hwp + FEC_R_CNTRL);
@@ -2815,11 +2816,7 @@ static void set_multicast_list(struct ne
 		return;
 	}
 
-	/* Clear filter and add the addresses in hash register
-	 */
-	writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
-	writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
-
+	/* Add the addresses in hash register */
 	netdev_for_each_mc_addr(ha, ndev) {
 		/* calculate crc32 value of mac address */
 		crc = 0xffffffff;
@@ -2837,16 +2834,14 @@ static void set_multicast_list(struct ne
 		 */
 		hash = (crc >> (32 - HASH_BITS)) & 0x3f;
 
-		if (hash > 31) {
-			tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
-			tmp |= 1 << (hash - 32);
-			writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
-		} else {
-			tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_LOW);
-			tmp |= 1 << hash;
-			writel(tmp, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
-		}
+		if (hash > 31)
+			hash_high |= 1 << (hash - 32);
+		else
+			hash_low |= 1 << hash;
 	}
+
+	writel(hash_high, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
+	writel(hash_low, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
 }
 
 /* Set a MAC change in hardware. */
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/spi/spi-sh-msiof.c linux-libre-3.18.87-gnu/drivers/spi/spi-sh-msiof.c
--- linux-libre-3.18.86-gnu/drivers/spi/spi-sh-msiof.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/spi/spi-sh-msiof.c	2017-12-09 12:29:48.000000000 -0500
@@ -818,7 +818,7 @@ static int sh_msiof_transfer_one(struct
 				break;
 			copy32 = copy_bswap32;
 		} else if (bits <= 16) {
-			if (l & 1)
+			if (l & 3)
 				break;
 			copy32 = copy_wswap32;
 		} else {
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/staging/lustre/lustre/llite/llite_mmap.c linux-libre-3.18.87-gnu/drivers/staging/lustre/lustre/llite/llite_mmap.c
--- linux-libre-3.18.86-gnu/drivers/staging/lustre/lustre/llite/llite_mmap.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/staging/lustre/lustre/llite/llite_mmap.c	2017-12-09 12:29:48.000000000 -0500
@@ -407,15 +407,13 @@ static int ll_page_mkwrite(struct vm_are
 		result = VM_FAULT_LOCKED;
 		break;
 	case -ENODATA:
+	case -EAGAIN:
 	case -EFAULT:
 		result = VM_FAULT_NOPAGE;
 		break;
 	case -ENOMEM:
 		result = VM_FAULT_OOM;
 		break;
-	case -EAGAIN:
-		result = VM_FAULT_RETRY;
-		break;
 	default:
 		result = VM_FAULT_SIGBUS;
 		break;
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/tty/serial/8250/8250_fintek.c linux-libre-3.18.87-gnu/drivers/tty/serial/8250/8250_fintek.c
--- linux-libre-3.18.86-gnu/drivers/tty/serial/8250/8250_fintek.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/tty/serial/8250/8250_fintek.c	2017-12-09 12:29:48.000000000 -0500
@@ -118,7 +118,7 @@ static int fintek_8250_rs4850_config(str
 
 	if ((!!(rs485->flags & SER_RS485_RTS_ON_SEND)) ==
 			(!!(rs485->flags & SER_RS485_RTS_AFTER_SEND)))
-		rs485->flags &= SER_RS485_ENABLED;
+		rs485->flags &= ~SER_RS485_ENABLED;
 	else
 		config |= RS485_URA;
 
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/tty/serial/8250/8250_pci.c linux-libre-3.18.87-gnu/drivers/tty/serial/8250/8250_pci.c
--- linux-libre-3.18.86-gnu/drivers/tty/serial/8250/8250_pci.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/tty/serial/8250/8250_pci.c	2017-12-09 12:29:48.000000000 -0500
@@ -5483,6 +5483,9 @@ static struct pci_device_id serial_pci_t
 	{ PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 },
 	{ PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 },
 
+	/* Amazon PCI serial device */
+	{ PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 },
+
 	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/tty/sysrq.c linux-libre-3.18.87-gnu/drivers/tty/sysrq.c
--- linux-libre-3.18.86-gnu/drivers/tty/sysrq.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/tty/sysrq.c	2017-12-09 12:29:48.000000000 -0500
@@ -237,8 +237,10 @@ static void sysrq_handle_showallcpus(int
 	 * architecture has no support for it:
 	 */
 	if (!trigger_all_cpu_backtrace()) {
-		struct pt_regs *regs = get_irq_regs();
+		struct pt_regs *regs = NULL;
 
+		if (in_irq())
+			regs = get_irq_regs();
 		if (regs) {
 			printk(KERN_INFO "CPU%d:\n", smp_processor_id());
 			show_regs(regs);
@@ -257,7 +259,10 @@ static struct sysrq_key_op sysrq_showall
 
 static void sysrq_handle_showregs(int key)
 {
-	struct pt_regs *regs = get_irq_regs();
+	struct pt_regs *regs = NULL;
+
+	if (in_irq())
+		regs = get_irq_regs();
 	if (regs)
 		show_regs(regs);
 	perf_event_print_debug();
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/usb/core/devio.c linux-libre-3.18.87-gnu/drivers/usb/core/devio.c
--- linux-libre-3.18.86-gnu/drivers/usb/core/devio.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/usb/core/devio.c	2017-12-09 12:29:48.000000000 -0500
@@ -113,42 +113,38 @@ enum snoop_when {
 #define USB_DEVICE_DEV		MKDEV(USB_DEVICE_MAJOR, 0)
 
 /* Limit on the total amount of memory we can allocate for transfers */
-static unsigned usbfs_memory_mb = 16;
+static u32 usbfs_memory_mb = 16;
 module_param(usbfs_memory_mb, uint, 0644);
 MODULE_PARM_DESC(usbfs_memory_mb,
 		"maximum MB allowed for usbfs buffers (0 = no limit)");
 
 /* Hard limit, necessary to avoid arithmetic overflow */
-#define USBFS_XFER_MAX		(UINT_MAX / 2 - 1000000)
+#define USBFS_XFER_MAX         (UINT_MAX / 2 - 1000000)
 
-static atomic_t usbfs_memory_usage;	/* Total memory currently allocated */
+static atomic64_t usbfs_memory_usage;	/* Total memory currently allocated */
 
 /* Check whether it's okay to allocate more memory for a transfer */
-static int usbfs_increase_memory_usage(unsigned amount)
+static int usbfs_increase_memory_usage(u64 amount)
 {
-	unsigned lim;
+	u64 lim;
 
-	/*
-	 * Convert usbfs_memory_mb to bytes, avoiding overflows.
-	 * 0 means use the hard limit (effectively unlimited).
-	 */
 	lim = ACCESS_ONCE(usbfs_memory_mb);
-	if (lim == 0 || lim > (USBFS_XFER_MAX >> 20))
-		lim = USBFS_XFER_MAX;
-	else
-		lim <<= 20;
+	lim <<= 20;
 
-	atomic_add(amount, &usbfs_memory_usage);
-	if (atomic_read(&usbfs_memory_usage) <= lim)
-		return 0;
-	atomic_sub(amount, &usbfs_memory_usage);
-	return -ENOMEM;
+	atomic64_add(amount, &usbfs_memory_usage);
+
+	if (lim > 0 && atomic64_read(&usbfs_memory_usage) > lim) {
+		atomic64_sub(amount, &usbfs_memory_usage);
+		return -ENOMEM;
+	}
+
+	return 0;
 }
 
 /* Memory for a transfer is being deallocated */
-static void usbfs_decrease_memory_usage(unsigned amount)
+static void usbfs_decrease_memory_usage(u64 amount)
 {
-	atomic_sub(amount, &usbfs_memory_usage);
+	atomic64_sub(amount, &usbfs_memory_usage);
 }
 
 static int connected(struct usb_dev_state *ps)
@@ -1077,7 +1073,7 @@ static int proc_bulk(struct usb_dev_stat
 	if (!usb_maxpacket(dev, pipe, !(bulk.ep & USB_DIR_IN)))
 		return -EINVAL;
 	len1 = bulk.len;
-	if (len1 >= USBFS_XFER_MAX)
+	if (len1 >= (INT_MAX - sizeof(struct urb)))
 		return -EINVAL;
 	ret = usbfs_increase_memory_usage(len1 + sizeof(struct urb));
 	if (ret)
@@ -1294,13 +1290,19 @@ static int proc_do_submiturb(struct usb_
 	int number_of_packets = 0;
 	unsigned int stream_id = 0;
 	void *buf;
-
-	if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP |
-				USBDEVFS_URB_SHORT_NOT_OK |
+	unsigned long mask =	USBDEVFS_URB_SHORT_NOT_OK |
 				USBDEVFS_URB_BULK_CONTINUATION |
 				USBDEVFS_URB_NO_FSBR |
 				USBDEVFS_URB_ZERO_PACKET |
-				USBDEVFS_URB_NO_INTERRUPT))
+				USBDEVFS_URB_NO_INTERRUPT;
+	/* USBDEVFS_URB_ISO_ASAP is a special case */
+	if (uurb->type == USBDEVFS_URB_TYPE_ISO)
+		mask |= USBDEVFS_URB_ISO_ASAP;
+
+	if (uurb->flags & ~mask)
+			return -EINVAL;
+
+	if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX)
 		return -EINVAL;
 	if (uurb->buffer_length > 0 && !uurb->buffer)
 		return -EINVAL;
@@ -1420,10 +1422,6 @@ static int proc_do_submiturb(struct usb_
 		return -EINVAL;
 	}
 
-	if (uurb->buffer_length >= USBFS_XFER_MAX) {
-		ret = -EINVAL;
-		goto error;
-	}
 	if (uurb->buffer_length > 0 &&
 			!access_ok(is_in ? VERIFY_WRITE : VERIFY_READ,
 				uurb->buffer, uurb->buffer_length)) {
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/usb/core/hub.c linux-libre-3.18.87-gnu/drivers/usb/core/hub.c
--- linux-libre-3.18.86-gnu/drivers/usb/core/hub.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/usb/core/hub.c	2017-12-09 12:29:48.000000000 -0500
@@ -4816,6 +4816,15 @@ loop:
 		usb_put_dev(udev);
 		if ((status == -ENOTCONN) || (status == -ENOTSUPP))
 			break;
+
+		/* When halfway through our retry count, power-cycle the port */
+		if (i == (SET_CONFIG_TRIES / 2) - 1) {
+			dev_info(&port_dev->dev, "attempt power cycle\n");
+			usb_hub_set_port_power(hdev, hub, port1, false);
+			msleep(2 * hub_power_on_good_delay(hub));
+			usb_hub_set_port_power(hdev, hub, port1, true);
+			msleep(hub_power_on_good_delay(hub));
+		}
 	}
 	if (hub->hdev->parent ||
 			!hcd->driver->port_handed_over ||
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/usb/core/quirks.c linux-libre-3.18.87-gnu/drivers/usb/core/quirks.c
--- linux-libre-3.18.86-gnu/drivers/usb/core/quirks.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/usb/core/quirks.c	2017-12-09 12:29:48.000000000 -0500
@@ -144,6 +144,9 @@ static const struct usb_device_id usb_qu
 	/* appletouch */
 	{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
 
+	/* Genesys Logic hub, internally used by KY-688 USB 3.1 Type-C Hub */
+	{ USB_DEVICE(0x05e3, 0x0612), .driver_info = USB_QUIRK_NO_LPM },
+
 	/* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
 	{ USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
 
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/usb/host/ehci-dbg.c linux-libre-3.18.87-gnu/drivers/usb/host/ehci-dbg.c
--- linux-libre-3.18.86-gnu/drivers/usb/host/ehci-dbg.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/usb/host/ehci-dbg.c	2017-12-09 12:29:48.000000000 -0500
@@ -850,7 +850,7 @@ static ssize_t fill_registers_buffer(str
 			default:		/* unknown */
 				break;
 			}
-			temp = (cap >> 8) & 0xff;
+			offset = (cap >> 8) & 0xff;
 		}
 	}
 #endif
diff -druNp --no-dereference linux-libre-3.18.86-gnu/drivers/usb/storage/uas-detect.h linux-libre-3.18.87-gnu/drivers/usb/storage/uas-detect.h
--- linux-libre-3.18.86-gnu/drivers/usb/storage/uas-detect.h	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/drivers/usb/storage/uas-detect.h	2017-12-09 12:29:48.000000000 -0500
@@ -88,6 +88,10 @@ static int uas_use_uas_driver(struct usb
 		}
 	}
 
+	/* All Seagate disk enclosures have broken ATA pass-through support */
+	if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2)
+		flags |= US_FL_NO_ATA_1X;
+
 	usb_stor_adjust_quirks(udev, &flags);
 
 	if (flags & US_FL_IGNORE_UAS) {
diff -druNp --no-dereference linux-libre-3.18.86-gnu/fs/nfs/nfs4state.c linux-libre-3.18.87-gnu/fs/nfs/nfs4state.c
--- linux-libre-3.18.86-gnu/fs/nfs/nfs4state.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/fs/nfs/nfs4state.c	2017-12-09 12:29:48.000000000 -0500
@@ -1650,7 +1650,6 @@ static int nfs4_recovery_handle_error(st
 			break;
 		case -NFS4ERR_STALE_CLIENTID:
 			set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
-			nfs4_state_clear_reclaim_reboot(clp);
 			nfs4_state_start_reclaim_reboot(clp);
 			break;
 		case -NFS4ERR_EXPIRED:
diff -druNp --no-dereference linux-libre-3.18.86-gnu/include/linux/buffer_head.h linux-libre-3.18.87-gnu/include/linux/buffer_head.h
--- linux-libre-3.18.86-gnu/include/linux/buffer_head.h	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/include/linux/buffer_head.h	2017-12-09 12:29:48.000000000 -0500
@@ -236,12 +236,10 @@ static inline int block_page_mkwrite_ret
 {
 	if (err == 0)
 		return VM_FAULT_LOCKED;
-	if (err == -EFAULT)
+	if (err == -EFAULT || err == -EAGAIN)
 		return VM_FAULT_NOPAGE;
 	if (err == -ENOMEM)
 		return VM_FAULT_OOM;
-	if (err == -EAGAIN)
-		return VM_FAULT_RETRY;
 	/* -ENOSPC, -EDQUOT, -EIO ... */
 	return VM_FAULT_SIGBUS;
 }
diff -druNp --no-dereference linux-libre-3.18.86-gnu/Makefile linux-libre-3.18.87-gnu/Makefile
--- linux-libre-3.18.86-gnu/Makefile	2017-12-05 23:44:53.000000000 -0500
+++ linux-libre-3.18.87-gnu/Makefile	2017-12-09 21:44:10.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 86
+SUBLEVEL = 87
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.86-gnu/net/ipv6/ip6_vti.c linux-libre-3.18.87-gnu/net/ipv6/ip6_vti.c
--- linux-libre-3.18.86-gnu/net/ipv6/ip6_vti.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/net/ipv6/ip6_vti.c	2017-12-09 12:29:48.000000000 -0500
@@ -172,12 +172,12 @@ static int vti6_tnl_create2(struct net_d
 	struct vti6_net *ip6n = net_generic(net, vti6_net_id);
 	int err;
 
+	dev->rtnl_link_ops = &vti6_link_ops;
 	err = register_netdevice(dev);
 	if (err < 0)
 		goto out;
 
 	strcpy(t->parms.name, dev->name);
-	dev->rtnl_link_ops = &vti6_link_ops;
 
 	dev_hold(dev);
 	vti6_tnl_link(ip6n, t);
diff -druNp --no-dereference linux-libre-3.18.86-gnu/net/sctp/debug.c linux-libre-3.18.87-gnu/net/sctp/debug.c
--- linux-libre-3.18.86-gnu/net/sctp/debug.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/net/sctp/debug.c	2017-12-09 12:29:48.000000000 -0500
@@ -166,7 +166,7 @@ static const char *const sctp_timer_tbl[
 /* Lookup timer debug name. */
 const char *sctp_tname(const sctp_subtype_t id)
 {
-	if (id.timeout <= SCTP_EVENT_TIMEOUT_MAX)
+	if (id.timeout < ARRAY_SIZE(sctp_timer_tbl))
 		return sctp_timer_tbl[id.timeout];
 	return "unknown_timer";
 }
diff -druNp --no-dereference linux-libre-3.18.86-gnu/net/tipc/server.c linux-libre-3.18.87-gnu/net/tipc/server.c
--- linux-libre-3.18.86-gnu/net/tipc/server.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/net/tipc/server.c	2017-12-09 12:29:48.000000000 -0500
@@ -579,14 +579,12 @@ int tipc_server_start(struct tipc_server
 void tipc_server_stop(struct tipc_server *s)
 {
 	struct tipc_conn *con;
-	int total = 0;
 	int id;
 
 	spin_lock_bh(&s->idr_lock);
-	for (id = 0; total < s->idr_in_use; id++) {
+	for (id = 0; s->idr_in_use; id++) {
 		con = idr_find(&s->conn_idr, id);
 		if (con) {
-			total++;
 			spin_unlock_bh(&s->idr_lock);
 			tipc_close_conn(con);
 			spin_lock_bh(&s->idr_lock);
diff -druNp --no-dereference linux-libre-3.18.86-gnu/security/integrity/ima/ima_main.c linux-libre-3.18.87-gnu/security/integrity/ima/ima_main.c
--- linux-libre-3.18.86-gnu/security/integrity/ima/ima_main.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/security/integrity/ima/ima_main.c	2017-12-09 12:29:48.000000000 -0500
@@ -52,6 +52,8 @@ static int __init hash_setup(char *str)
 			ima_hash_algo = HASH_ALGO_SHA1;
 		else if (strncmp(str, "md5", 3) == 0)
 			ima_hash_algo = HASH_ALGO_MD5;
+		else
+			return 1;
 		goto out;
 	}
 
@@ -61,6 +63,8 @@ static int __init hash_setup(char *str)
 			break;
 		}
 	}
+	if (i == HASH_ALGO__LAST)
+		return 1;
 out:
 	hash_setup_done = 1;
 	return 1;
diff -druNp --no-dereference linux-libre-3.18.86-gnu/tools/perf/tests/attr.c linux-libre-3.18.87-gnu/tools/perf/tests/attr.c
--- linux-libre-3.18.86-gnu/tools/perf/tests/attr.c	2017-12-05 05:20:47.000000000 -0500
+++ linux-libre-3.18.87-gnu/tools/perf/tests/attr.c	2017-12-09 12:29:48.000000000 -0500
@@ -150,7 +150,7 @@ static int run_dir(const char *d, const
 	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
 		 d, d, perf, vcnt, v);
 
-	return system(cmd);
+	return system(cmd) ? TEST_FAIL : TEST_OK;
 }
 
 int test__attr(void)
