diff -druNp --no-dereference linux-libre-4.4.85-gnu/arch/arm64/kernel/fpsimd.c linux-libre-4.4.86-gnu/arch/arm64/kernel/fpsimd.c
--- linux-libre-4.4.85-gnu/arch/arm64/kernel/fpsimd.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/arch/arm64/kernel/fpsimd.c	2017-09-02 01:07:05.000000000 -0400
@@ -157,9 +157,11 @@ void fpsimd_thread_switch(struct task_st
 
 void fpsimd_flush_thread(void)
 {
+	preempt_disable();
 	memset(&current->thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
 	fpsimd_flush_task_state(current);
 	set_thread_flag(TIF_FOREIGN_FPSTATE);
+	preempt_enable();
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.4.85-gnu/arch/arm64/mm/fault.c linux-libre-4.4.86-gnu/arch/arm64/mm/fault.c
--- linux-libre-4.4.85-gnu/arch/arm64/mm/fault.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/arch/arm64/mm/fault.c	2017-09-02 01:07:05.000000000 -0400
@@ -313,8 +313,11 @@ retry:
 	 * signal first. We do not need to release the mmap_sem because it
 	 * would already be released in __lock_page_or_retry in mm/filemap.c.
 	 */
-	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
+	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
+		if (!user_mode(regs))
+			goto no_context;
 		return 0;
+	}
 
 	/*
 	 * Major/minor page fault accounting is only done on the initial
diff -druNp --no-dereference linux-libre-4.4.85-gnu/arch/x86/include/asm/io.h linux-libre-4.4.86-gnu/arch/x86/include/asm/io.h
--- linux-libre-4.4.85-gnu/arch/x86/include/asm/io.h	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/arch/x86/include/asm/io.h	2017-09-02 01:07:05.000000000 -0400
@@ -304,13 +304,13 @@ static inline unsigned type in##bwl##_p(
 static inline void outs##bwl(int port, const void *addr, unsigned long count) \
 {									\
 	asm volatile("rep; outs" #bwl					\
-		     : "+S"(addr), "+c"(count) : "d"(port));		\
+		     : "+S"(addr), "+c"(count) : "d"(port) : "memory");	\
 }									\
 									\
 static inline void ins##bwl(int port, void *addr, unsigned long count)	\
 {									\
 	asm volatile("rep; ins" #bwl					\
-		     : "+D"(addr), "+c"(count) : "d"(port));		\
+		     : "+D"(addr), "+c"(count) : "d"(port) : "memory");	\
 }
 
 BUILDIO(b, b, char)
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/gpu/drm/i915/intel_uncore.c linux-libre-4.4.86-gnu/drivers/gpu/drm/i915/intel_uncore.c
--- linux-libre-4.4.85-gnu/drivers/gpu/drm/i915/intel_uncore.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/gpu/drm/i915/intel_uncore.c	2017-09-02 01:07:05.000000000 -0400
@@ -635,7 +635,8 @@ hsw_unclaimed_reg_detect(struct drm_i915
 			  "enabling oneshot unclaimed register reporting. "
 			  "Please use i915.mmio_debug=N for more information.\n");
 		__raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
-		i915.mmio_debug = mmio_debug_once--;
+		i915.mmio_debug = mmio_debug_once;
+		mmio_debug_once = false;
 	}
 }
 
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/i2c/busses/i2c-jz4780.c linux-libre-4.4.86-gnu/drivers/i2c/busses/i2c-jz4780.c
--- linux-libre-4.4.85-gnu/drivers/i2c/busses/i2c-jz4780.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/i2c/busses/i2c-jz4780.c	2017-09-02 01:07:05.000000000 -0400
@@ -786,10 +786,6 @@ static int jz4780_i2c_probe(struct platf
 
 	jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0);
 
-	i2c->cmd = 0;
-	memset(i2c->cmd_buf, 0, BUFSIZE);
-	memset(i2c->data_buf, 0, BUFSIZE);
-
 	i2c->irq = platform_get_irq(pdev, 0);
 	ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0,
 			       dev_name(&pdev->dev), i2c);
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/net/wireless/p54/fwio.c linux-libre-4.4.86-gnu/drivers/net/wireless/p54/fwio.c
--- linux-libre-4.4.85-gnu/drivers/net/wireless/p54/fwio.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/net/wireless/p54/fwio.c	2017-09-02 01:07:05.000000000 -0400
@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u1
 
 			entry += sizeof(__le16);
 			chan->pa_points_per_curve = 8;
-			memset(chan->curve_data, 0, sizeof(*chan->curve_data));
+			memset(chan->curve_data, 0, sizeof(chan->curve_data));
 			memcpy(chan->curve_data, entry,
 			       sizeof(struct p54_pa_curve_data_sample) *
 			       min((u8)8, curve_data->points_per_channel));
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/scsi/isci/remote_node_context.c linux-libre-4.4.86-gnu/drivers/scsi/isci/remote_node_context.c
--- linux-libre-4.4.85-gnu/drivers/scsi/isci/remote_node_context.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/scsi/isci/remote_node_context.c	2017-09-02 01:07:05.000000000 -0400
@@ -66,6 +66,9 @@ const char *rnc_state_name(enum scis_sds
 {
 	static const char * const strings[] = RNC_STATES;
 
+	if (state >= ARRAY_SIZE(strings))
+		return "UNKNOWN";
+
 	return strings[state];
 }
 #undef C
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/scsi/lpfc/lpfc_els.c linux-libre-4.4.86-gnu/drivers/scsi/lpfc/lpfc_els.c
--- linux-libre-4.4.85-gnu/drivers/scsi/lpfc/lpfc_els.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/scsi/lpfc/lpfc_els.c	2017-09-02 01:07:05.000000000 -0400
@@ -1054,7 +1054,10 @@ stop_rr_fcf_flogi:
 					lpfc_sli4_unreg_all_rpis(vport);
 				}
 			}
-			lpfc_issue_reg_vfi(vport);
+
+			/* Do not register VFI if the driver aborted FLOGI */
+			if (!lpfc_error_lost_link(irsp))
+				lpfc_issue_reg_vfi(vport);
 			lpfc_nlp_put(ndlp);
 			goto out;
 		}
diff -druNp --no-dereference linux-libre-4.4.85-gnu/drivers/scsi/sg.c linux-libre-4.4.86-gnu/drivers/scsi/sg.c
--- linux-libre-4.4.85-gnu/drivers/scsi/sg.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/drivers/scsi/sg.c	2017-09-02 01:07:05.000000000 -0400
@@ -153,6 +153,7 @@ typedef struct sg_fd {		/* holds the sta
 	struct sg_device *parentdp;	/* owning device */
 	wait_queue_head_t read_wait;	/* queue read until command done */
 	rwlock_t rq_list_lock;	/* protect access to list in req_arr */
+	struct mutex f_mutex;	/* protect against changes in this fd */
 	int timeout;		/* defaults to SG_DEFAULT_TIMEOUT      */
 	int timeout_user;	/* defaults to SG_DEFAULT_TIMEOUT_USER */
 	Sg_scatter_hold reserve;	/* buffer held for this file descriptor */
@@ -166,6 +167,7 @@ typedef struct sg_fd {		/* holds the sta
 	unsigned char next_cmd_len; /* 0: automatic, >0: use on next write() */
 	char keep_orphan;	/* 0 -> drop orphan (def), 1 -> keep for read() */
 	char mmap_called;	/* 0 -> mmap() never called on this fd */
+	char res_in_use;	/* 1 -> 'reserve' array in use */
 	struct kref f_ref;
 	struct execute_work ew;
 } Sg_fd;
@@ -209,7 +211,6 @@ static void sg_remove_sfp(struct kref *)
 static Sg_request *sg_get_rq_mark(Sg_fd * sfp, int pack_id);
 static Sg_request *sg_add_request(Sg_fd * sfp);
 static int sg_remove_request(Sg_fd * sfp, Sg_request * srp);
-static int sg_res_in_use(Sg_fd * sfp);
 static Sg_device *sg_get_dev(int dev);
 static void sg_device_destroy(struct kref *kref);
 
@@ -625,6 +626,7 @@ sg_write(struct file *filp, const char _
 	}
 	buf += SZ_SG_HEADER;
 	__get_user(opcode, buf);
+	mutex_lock(&sfp->f_mutex);
 	if (sfp->next_cmd_len > 0) {
 		cmd_size = sfp->next_cmd_len;
 		sfp->next_cmd_len = 0;	/* reset so only this write() effected */
@@ -633,6 +635,7 @@ sg_write(struct file *filp, const char _
 		if ((opcode >= 0xc0) && old_hdr.twelve_byte)
 			cmd_size = 12;
 	}
+	mutex_unlock(&sfp->f_mutex);
 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp,
 		"sg_write:   scsi opcode=0x%02x, cmd_size=%d\n", (int) opcode, cmd_size));
 /* Determine buffer size.  */
@@ -732,7 +735,7 @@ sg_new_write(Sg_fd *sfp, struct file *fi
 			sg_remove_request(sfp, srp);
 			return -EINVAL;	/* either MMAP_IO or DIRECT_IO (not both) */
 		}
-		if (sg_res_in_use(sfp)) {
+		if (sfp->res_in_use) {
 			sg_remove_request(sfp, srp);
 			return -EBUSY;	/* reserve buffer already being used */
 		}
@@ -902,7 +905,7 @@ sg_ioctl(struct file *filp, unsigned int
 			return result;
 		if (val) {
 			sfp->low_dma = 1;
-			if ((0 == sfp->low_dma) && (0 == sg_res_in_use(sfp))) {
+			if ((0 == sfp->low_dma) && !sfp->res_in_use) {
 				val = (int) sfp->reserve.bufflen;
 				sg_remove_scat(sfp, &sfp->reserve);
 				sg_build_reserve(sfp, val);
@@ -977,12 +980,18 @@ sg_ioctl(struct file *filp, unsigned int
                         return -EINVAL;
 		val = min_t(int, val,
 			    max_sectors_bytes(sdp->device->request_queue));
+		mutex_lock(&sfp->f_mutex);
 		if (val != sfp->reserve.bufflen) {
-			if (sg_res_in_use(sfp) || sfp->mmap_called)
+			if (sfp->mmap_called ||
+			    sfp->res_in_use) {
+				mutex_unlock(&sfp->f_mutex);
 				return -EBUSY;
+			}
+
 			sg_remove_scat(sfp, &sfp->reserve);
 			sg_build_reserve(sfp, val);
 		}
+		mutex_unlock(&sfp->f_mutex);
 		return 0;
 	case SG_GET_RESERVED_SIZE:
 		val = min_t(int, sfp->reserve.bufflen,
@@ -1737,13 +1746,22 @@ sg_start_req(Sg_request *srp, unsigned c
 		md = &map_data;
 
 	if (md) {
-		if (!sg_res_in_use(sfp) && dxfer_len <= rsv_schp->bufflen)
+		mutex_lock(&sfp->f_mutex);
+		if (dxfer_len <= rsv_schp->bufflen &&
+		    !sfp->res_in_use) {
+			sfp->res_in_use = 1;
 			sg_link_reserve(sfp, srp, dxfer_len);
-		else {
+		} else if ((hp->flags & SG_FLAG_MMAP_IO) && sfp->res_in_use) {
+			mutex_unlock(&sfp->f_mutex);
+			return -EBUSY;
+		} else {
 			res = sg_build_indirect(req_schp, sfp, dxfer_len);
-			if (res)
+			if (res) {
+				mutex_unlock(&sfp->f_mutex);
 				return res;
+			}
 		}
+		mutex_unlock(&sfp->f_mutex);
 
 		md->pages = req_schp->pages;
 		md->page_order = req_schp->page_order;
@@ -2034,6 +2052,8 @@ sg_unlink_reserve(Sg_fd * sfp, Sg_reques
 	req_schp->sglist_len = 0;
 	sfp->save_scat_len = 0;
 	srp->res_used = 0;
+	/* Called without mutex lock to avoid deadlock */
+	sfp->res_in_use = 0;
 }
 
 static Sg_request *
@@ -2145,6 +2165,7 @@ sg_add_sfp(Sg_device * sdp)
 	rwlock_init(&sfp->rq_list_lock);
 
 	kref_init(&sfp->f_ref);
+	mutex_init(&sfp->f_mutex);
 	sfp->timeout = SG_DEFAULT_TIMEOUT;
 	sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER;
 	sfp->force_packid = SG_DEF_FORCE_PACK_ID;
@@ -2220,20 +2241,6 @@ sg_remove_sfp(struct kref *kref)
 	schedule_work(&sfp->ew.work);
 }
 
-static int
-sg_res_in_use(Sg_fd * sfp)
-{
-	const Sg_request *srp;
-	unsigned long iflags;
-
-	read_lock_irqsave(&sfp->rq_list_lock, iflags);
-	for (srp = sfp->headrp; srp; srp = srp->nextrp)
-		if (srp->res_used)
-			break;
-	read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
-	return srp ? 1 : 0;
-}
-
 #ifdef CONFIG_SCSI_PROC_FS
 static int
 sg_idr_max_id(int id, void *p, void *data)
diff -druNp --no-dereference linux-libre-4.4.85-gnu/fs/btrfs/volumes.c linux-libre-4.4.86-gnu/fs/btrfs/volumes.c
--- linux-libre-4.4.85-gnu/fs/btrfs/volumes.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/fs/btrfs/volumes.c	2017-09-02 01:07:05.000000000 -0400
@@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_
 	},
 };
 
-const u64 const btrfs_raid_group[BTRFS_NR_RAID_TYPES] = {
+const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = {
 	[BTRFS_RAID_RAID10] = BTRFS_BLOCK_GROUP_RAID10,
 	[BTRFS_RAID_RAID1]  = BTRFS_BLOCK_GROUP_RAID1,
 	[BTRFS_RAID_DUP]    = BTRFS_BLOCK_GROUP_DUP,
diff -druNp --no-dereference linux-libre-4.4.85-gnu/include/linux/lightnvm.h linux-libre-4.4.86-gnu/include/linux/lightnvm.h
--- linux-libre-4.4.85-gnu/include/linux/lightnvm.h	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/include/linux/lightnvm.h	2017-09-02 01:07:05.000000000 -0400
@@ -310,6 +310,7 @@ static inline struct ppa_addr dev_to_gen
 {
 	struct ppa_addr l;
 
+	l.ppa = 0;
 	/*
 	 * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc.
 	 */
diff -druNp --no-dereference linux-libre-4.4.85-gnu/kernel/gcov/base.c linux-libre-4.4.86-gnu/kernel/gcov/base.c
--- linux-libre-4.4.85-gnu/kernel/gcov/base.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/kernel/gcov/base.c	2017-09-02 01:07:05.000000000 -0400
@@ -98,6 +98,12 @@ void __gcov_merge_icall_topn(gcov_type *
 }
 EXPORT_SYMBOL(__gcov_merge_icall_topn);
 
+void __gcov_exit(void)
+{
+	/* Unused. */
+}
+EXPORT_SYMBOL(__gcov_exit);
+
 /**
  * gcov_enable_events - enable event reporting through gcov_event()
  *
diff -druNp --no-dereference linux-libre-4.4.85-gnu/kernel/gcov/gcc_4_7.c linux-libre-4.4.86-gnu/kernel/gcov/gcc_4_7.c
--- linux-libre-4.4.85-gnu/kernel/gcov/gcc_4_7.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/kernel/gcov/gcc_4_7.c	2017-09-02 01:07:05.000000000 -0400
@@ -18,7 +18,9 @@
 #include <linux/vmalloc.h>
 #include "gcov.h"
 
-#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1
+#if (__GNUC__ >= 7)
+#define GCOV_COUNTERS			9
+#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
 #define GCOV_COUNTERS			10
 #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
 #define GCOV_COUNTERS			9
diff -druNp --no-dereference linux-libre-4.4.85-gnu/Makefile linux-libre-4.4.86-gnu/Makefile
--- linux-libre-4.4.85-gnu/Makefile	2017-08-30 07:14:30.000000000 -0400
+++ linux-libre-4.4.86-gnu/Makefile	2017-09-02 07:33:48.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 85
+SUBLEVEL = 86
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
diff -druNp --no-dereference linux-libre-4.4.85-gnu/sound/pci/au88x0/au88x0_core.c linux-libre-4.4.86-gnu/sound/pci/au88x0/au88x0_core.c
--- linux-libre-4.4.85-gnu/sound/pci/au88x0/au88x0_core.c	2017-08-30 04:19:42.000000000 -0400
+++ linux-libre-4.4.86-gnu/sound/pci/au88x0/au88x0_core.c	2017-09-02 01:07:05.000000000 -0400
@@ -2150,8 +2150,7 @@ vortex_adb_allocroute(vortex_t *vortex,
 							   stream->resources, en,
 							   VORTEX_RESOURCE_SRC)) < 0) {
 					memset(stream->resources, 0,
-					       sizeof(unsigned char) *
-					       VORTEX_RESOURCE_LAST);
+					       sizeof(stream->resources));
 					return -EBUSY;
 				}
 				if (stream->type != VORTEX_PCM_A3D) {
@@ -2161,7 +2160,7 @@ vortex_adb_allocroute(vortex_t *vortex,
 								   VORTEX_RESOURCE_MIXIN)) < 0) {
 						memset(stream->resources,
 						       0,
-						       sizeof(unsigned char) * VORTEX_RESOURCE_LAST);
+						       sizeof(stream->resources));
 						return -EBUSY;
 					}
 				}
@@ -2174,8 +2173,7 @@ vortex_adb_allocroute(vortex_t *vortex,
 						   stream->resources, en,
 						   VORTEX_RESOURCE_A3D)) < 0) {
 				memset(stream->resources, 0,
-				       sizeof(unsigned char) *
-				       VORTEX_RESOURCE_LAST);
+				       sizeof(stream->resources));
 				dev_err(vortex->card->dev,
 					"out of A3D sources. Sorry\n");
 				return -EBUSY;
@@ -2289,8 +2287,7 @@ vortex_adb_allocroute(vortex_t *vortex,
 						   VORTEX_RESOURCE_MIXOUT))
 			    < 0) {
 				memset(stream->resources, 0,
-				       sizeof(unsigned char) *
-				       VORTEX_RESOURCE_LAST);
+				       sizeof(stream->resources));
 				return -EBUSY;
 			}
 			if ((src[i] =
@@ -2298,8 +2295,7 @@ vortex_adb_allocroute(vortex_t *vortex,
 						   stream->resources, en,
 						   VORTEX_RESOURCE_SRC)) < 0) {
 				memset(stream->resources, 0,
-				       sizeof(unsigned char) *
-				       VORTEX_RESOURCE_LAST);
+				       sizeof(stream->resources));
 				return -EBUSY;
 			}
 		}
