diff -druNp --no-dereference linux-libre-4.12.10-gnu/arch/alpha/include/asm/types.h linux-libre-4.12.11-gnu/arch/alpha/include/asm/types.h
--- linux-libre-4.12.10-gnu/arch/alpha/include/asm/types.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/arch/alpha/include/asm/types.h	2017-09-07 02:37:34.000000000 -0400
@@ -1,6 +1,6 @@
 #ifndef _ALPHA_TYPES_H
 #define _ALPHA_TYPES_H
 
-#include <asm-generic/int-ll64.h>
+#include <uapi/asm/types.h>
 
 #endif /* _ALPHA_TYPES_H */
diff -druNp --no-dereference linux-libre-4.12.10-gnu/arch/alpha/include/uapi/asm/types.h linux-libre-4.12.11-gnu/arch/alpha/include/uapi/asm/types.h
--- linux-libre-4.12.10-gnu/arch/alpha/include/uapi/asm/types.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/arch/alpha/include/uapi/asm/types.h	2017-09-07 02:37:34.000000000 -0400
@@ -9,8 +9,18 @@
  * need to be careful to avoid a name clashes.
  */
 
-#ifndef __KERNEL__
+/*
+ * This is here because we used to use l64 for alpha
+ * and we don't want to impact user mode with our change to ll64
+ * in the kernel.
+ *
+ * However, some user programs are fine with this.  They can
+ * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
+ */
+#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
 #include <asm-generic/int-l64.h>
+#else
+#include <asm-generic/int-ll64.h>
 #endif
 
 #endif /* _UAPI_ALPHA_TYPES_H */
diff -druNp --no-dereference linux-libre-4.12.10-gnu/arch/arm64/mm/fault.c linux-libre-4.12.11-gnu/arch/arm64/mm/fault.c
--- linux-libre-4.12.10-gnu/arch/arm64/mm/fault.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/arch/arm64/mm/fault.c	2017-09-07 02:37:34.000000000 -0400
@@ -397,8 +397,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.12.10-gnu/arch/x86/include/asm/io.h linux-libre-4.12.11-gnu/arch/x86/include/asm/io.h
--- linux-libre-4.12.10-gnu/arch/x86/include/asm/io.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/arch/x86/include/asm/io.h	2017-09-07 02:37:34.000000000 -0400
@@ -328,13 +328,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.12.10-gnu/crypto/algif_skcipher.c linux-libre-4.12.11-gnu/crypto/algif_skcipher.c
--- linux-libre-4.12.10-gnu/crypto/algif_skcipher.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/crypto/algif_skcipher.c	2017-09-07 02:37:34.000000000 -0400
@@ -87,8 +87,13 @@ static void skcipher_free_async_sgls(str
 	}
 	sgl = sreq->tsg;
 	n = sg_nents(sgl);
-	for_each_sg(sgl, sg, n, i)
-		put_page(sg_page(sg));
+	for_each_sg(sgl, sg, n, i) {
+		struct page *page = sg_page(sg);
+
+		/* some SGs may not have a page mapped */
+		if (page && page_ref_count(page))
+			put_page(page);
+	}
 
 	kfree(sreq->tsg);
 }
diff -druNp --no-dereference linux-libre-4.12.10-gnu/crypto/chacha20_generic.c linux-libre-4.12.11-gnu/crypto/chacha20_generic.c
--- linux-libre-4.12.10-gnu/crypto/chacha20_generic.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/crypto/chacha20_generic.c	2017-09-07 02:37:34.000000000 -0400
@@ -91,9 +91,14 @@ int crypto_chacha20_crypt(struct skciphe
 	crypto_chacha20_init(state, ctx, walk.iv);
 
 	while (walk.nbytes > 0) {
+		unsigned int nbytes = walk.nbytes;
+
+		if (nbytes < walk.total)
+			nbytes = round_down(nbytes, walk.stride);
+
 		chacha20_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr,
-				 walk.nbytes);
-		err = skcipher_walk_done(&walk, 0);
+				 nbytes);
+		err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
 	}
 
 	return err;
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c	2017-09-07 02:37:34.000000000 -0400
@@ -1155,8 +1155,6 @@ nouveau_connector_aux_xfer(struct drm_dp
 		return -ENODEV;
 	if (WARN_ON(msg->size > 16))
 		return -E2BIG;
-	if (msg->size == 0)
-		return msg->size;
 
 	ret = nvkm_i2c_aux_acquire(aux);
 	if (ret)
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nv50_display.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nv50_display.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nv50_display.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nv50_display.c	2017-09-07 02:37:34.000000000 -0400
@@ -3618,15 +3618,24 @@ nv50_sor_create(struct drm_connector *co
 	drm_mode_connector_attach_encoder(connector, encoder);
 
 	if (dcbe->type == DCB_OUTPUT_DP) {
+		struct nv50_disp *disp = nv50_disp(encoder->dev);
 		struct nvkm_i2c_aux *aux =
 			nvkm_i2c_aux_find(i2c, dcbe->i2c_index);
 		if (aux) {
-			nv_encoder->i2c = &nv_connector->aux.ddc;
+			if (disp->disp->oclass < GF110_DISP) {
+				/* HW has no support for address-only
+				 * transactions, so we're required to
+				 * use custom I2C-over-AUX code.
+				 */
+				nv_encoder->i2c = &aux->i2c;
+			} else {
+				nv_encoder->i2c = &nv_connector->aux.ddc;
+			}
 			nv_encoder->aux = aux;
 		}
 
 		/*TODO: Use DP Info Table to check for support. */
-		if (nv50_disp(encoder->dev)->disp->oclass >= GF110_DISP) {
+		if (disp->disp->oclass >= GF110_DISP) {
 			ret = nv50_mstm_new(nv_encoder, &nv_connector->aux, 16,
 					    nv_connector->base.base.id,
 					    &nv_encoder->dp.mstm);
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c	2017-09-07 02:37:34.000000000 -0400
@@ -117,6 +117,10 @@ int
 nvkm_i2c_aux_xfer(struct nvkm_i2c_aux *aux, bool retry, u8 type,
 		  u32 addr, u8 *data, u8 *size)
 {
+	if (!*size && !aux->func->address_only) {
+		AUX_ERR(aux, "address-only transaction dropped");
+		return -ENOSYS;
+	}
 	return aux->func->xfer(aux, retry, type, addr, data, size);
 }
 
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c	2017-09-07 02:37:34.000000000 -0400
@@ -72,7 +72,7 @@ g94_i2c_aux_init(struct g94_i2c_aux *aux
 	return 0;
 }
 
-static int
+int
 g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,
 		 u8 type, u32 addr, u8 *data, u8 *size)
 {
@@ -105,9 +105,9 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *ob
 	}
 
 	ctrl  = nvkm_rd32(device, 0x00e4e4 + base);
-	ctrl &= ~0x0001f0ff;
+	ctrl &= ~0x0001f1ff;
 	ctrl |= type << 12;
-	ctrl |= *size - 1;
+	ctrl |= (*size ? (*size - 1) : 0x00000100);
 	nvkm_wr32(device, 0x00e4e0 + base, addr);
 
 	/* (maybe) retry transaction a number of times on failure... */
@@ -160,14 +160,10 @@ out:
 	return ret < 0 ? ret : (stat & 0x000f0000) >> 16;
 }
 
-static const struct nvkm_i2c_aux_func
-g94_i2c_aux_func = {
-	.xfer = g94_i2c_aux_xfer,
-};
-
 int
-g94_i2c_aux_new(struct nvkm_i2c_pad *pad, int index, u8 drive,
-		struct nvkm_i2c_aux **paux)
+g94_i2c_aux_new_(const struct nvkm_i2c_aux_func *func,
+		 struct nvkm_i2c_pad *pad, int index, u8 drive,
+		 struct nvkm_i2c_aux **paux)
 {
 	struct g94_i2c_aux *aux;
 
@@ -175,8 +171,20 @@ g94_i2c_aux_new(struct nvkm_i2c_pad *pad
 		return -ENOMEM;
 	*paux = &aux->base;
 
-	nvkm_i2c_aux_ctor(&g94_i2c_aux_func, pad, index, &aux->base);
+	nvkm_i2c_aux_ctor(func, pad, index, &aux->base);
 	aux->ch = drive;
 	aux->base.intr = 1 << aux->ch;
 	return 0;
 }
+
+static const struct nvkm_i2c_aux_func
+g94_i2c_aux = {
+	.xfer = g94_i2c_aux_xfer,
+};
+
+int
+g94_i2c_aux_new(struct nvkm_i2c_pad *pad, int index, u8 drive,
+		struct nvkm_i2c_aux **paux)
+{
+	return g94_i2c_aux_new_(&g94_i2c_aux, pad, index, drive, paux);
+}
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgf119.c	2017-09-07 02:37:34.000000000 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include "aux.h"
+
+static const struct nvkm_i2c_aux_func
+gf119_i2c_aux = {
+	.address_only = true,
+	.xfer = g94_i2c_aux_xfer,
+};
+
+int
+gf119_i2c_aux_new(struct nvkm_i2c_pad *pad, int index, u8 drive,
+		  struct nvkm_i2c_aux **paux)
+{
+	return g94_i2c_aux_new_(&gf119_i2c_aux, pad, index, drive, paux);
+}
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c	2017-09-07 02:37:34.000000000 -0400
@@ -105,9 +105,9 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *
 	}
 
 	ctrl  = nvkm_rd32(device, 0x00d954 + base);
-	ctrl &= ~0x0001f0ff;
+	ctrl &= ~0x0001f1ff;
 	ctrl |= type << 12;
-	ctrl |= *size - 1;
+	ctrl |= (*size ? (*size - 1) : 0x00000100);
 	nvkm_wr32(device, 0x00d950 + base, addr);
 
 	/* (maybe) retry transaction a number of times on failure... */
@@ -162,6 +162,7 @@ out:
 
 static const struct nvkm_i2c_aux_func
 gm200_i2c_aux_func = {
+	.address_only = true,
 	.xfer = gm200_i2c_aux_xfer,
 };
 
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h	2017-09-07 02:37:34.000000000 -0400
@@ -3,6 +3,7 @@
 #include "pad.h"
 
 struct nvkm_i2c_aux_func {
+	bool address_only;
 	int  (*xfer)(struct nvkm_i2c_aux *, bool retry, u8 type,
 		     u32 addr, u8 *data, u8 *size);
 	int  (*lnk_ctl)(struct nvkm_i2c_aux *, int link_nr, int link_bw,
@@ -17,7 +18,12 @@ void nvkm_i2c_aux_del(struct nvkm_i2c_au
 int nvkm_i2c_aux_xfer(struct nvkm_i2c_aux *, bool retry, u8 type,
 		      u32 addr, u8 *data, u8 *size);
 
+int g94_i2c_aux_new_(const struct nvkm_i2c_aux_func *, struct nvkm_i2c_pad *,
+		     int, u8, struct nvkm_i2c_aux **);
+
 int g94_i2c_aux_new(struct nvkm_i2c_pad *, int, u8, struct nvkm_i2c_aux **);
+int g94_i2c_aux_xfer(struct nvkm_i2c_aux *, bool, u8, u32, u8 *, u8 *);
+int gf119_i2c_aux_new(struct nvkm_i2c_pad *, int, u8, struct nvkm_i2c_aux **);
 int gm200_i2c_aux_new(struct nvkm_i2c_pad *, int, u8, struct nvkm_i2c_aux **);
 
 #define AUX_MSG(b,l,f,a...) do {                                               \
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild	2017-09-07 02:37:34.000000000 -0400
@@ -25,6 +25,7 @@ nvkm-y += nvkm/subdev/i2c/bit.o
 
 nvkm-y += nvkm/subdev/i2c/aux.o
 nvkm-y += nvkm/subdev/i2c/auxg94.o
+nvkm-y += nvkm/subdev/i2c/auxgf119.o
 nvkm-y += nvkm/subdev/i2c/auxgm200.o
 
 nvkm-y += nvkm/subdev/i2c/anx9805.o
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgf119.c linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgf119.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgf119.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/padgf119.c	2017-09-07 02:37:34.000000000 -0400
@@ -28,7 +28,7 @@
 static const struct nvkm_i2c_pad_func
 gf119_i2c_pad_s_func = {
 	.bus_new_4 = gf119_i2c_bus_new,
-	.aux_new_6 = g94_i2c_aux_new,
+	.aux_new_6 = gf119_i2c_aux_new,
 	.mode = g94_i2c_pad_mode,
 };
 
@@ -41,7 +41,7 @@ gf119_i2c_pad_s_new(struct nvkm_i2c *i2c
 static const struct nvkm_i2c_pad_func
 gf119_i2c_pad_x_func = {
 	.bus_new_4 = gf119_i2c_bus_new,
-	.aux_new_6 = g94_i2c_aux_new,
+	.aux_new_6 = gf119_i2c_aux_new,
 };
 
 int
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/ttm/ttm_page_alloc.c linux-libre-4.12.11-gnu/drivers/gpu/drm/ttm/ttm_page_alloc.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/ttm/ttm_page_alloc.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/ttm/ttm_page_alloc.c	2017-09-07 02:37:34.000000000 -0400
@@ -615,7 +615,7 @@ static void ttm_page_pool_fill_locked(st
 		} else {
 			pr_err("Failed to fill pool (%p)\n", pool);
 			/* If we have any pages left put them to the pool. */
-			list_for_each_entry(p, &pool->list, lru) {
+			list_for_each_entry(p, &new_pages, lru) {
 				++cpages;
 			}
 			list_splice(&new_pages, &pool->list);
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c linux-libre-4.12.11-gnu/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
--- linux-libre-4.12.10-gnu/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c	2017-09-07 02:37:34.000000000 -0400
@@ -1567,10 +1567,34 @@ vmw_kms_atomic_check_modeset(struct drm_
 }
 
 
+/**
+ * vmw_kms_atomic_commit - Perform an atomic state commit
+ *
+ * @dev: DRM device
+ * @state: the driver state object
+ * @nonblock: Whether nonblocking behaviour is requested
+ *
+ * This is a simple wrapper around drm_atomic_helper_commit() for
+ * us to clear the nonblocking value.
+ *
+ * Nonblocking commits currently cause synchronization issues
+ * for vmwgfx.
+ *
+ * RETURNS
+ * Zero for success or negative error code on failure.
+ */
+int vmw_kms_atomic_commit(struct drm_device *dev,
+			  struct drm_atomic_state *state,
+			  bool nonblock)
+{
+	return drm_atomic_helper_commit(dev, state, false);
+}
+
+
 static const struct drm_mode_config_funcs vmw_kms_funcs = {
 	.fb_create = vmw_kms_fb_create,
 	.atomic_check = vmw_kms_atomic_check_modeset,
-	.atomic_commit = drm_atomic_helper_commit,
+	.atomic_commit = vmw_kms_atomic_commit,
 };
 
 static int vmw_kms_generic_present(struct vmw_private *dev_priv,
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/i2c/busses/i2c-ismt.c linux-libre-4.12.11-gnu/drivers/i2c/busses/i2c-ismt.c
--- linux-libre-4.12.10-gnu/drivers/i2c/busses/i2c-ismt.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/i2c/busses/i2c-ismt.c	2017-09-07 02:37:34.000000000 -0400
@@ -341,8 +341,10 @@ static int ismt_process_desc(const struc
 			break;
 		case I2C_SMBUS_BLOCK_DATA:
 		case I2C_SMBUS_I2C_BLOCK_DATA:
-			memcpy(&data->block[1], dma_buffer, desc->rxbytes);
-			data->block[0] = desc->rxbytes;
+			if (desc->rxbytes != dma_buffer[0] + 1)
+				return -EMSGSIZE;
+
+			memcpy(data->block, dma_buffer, desc->rxbytes);
 			break;
 		}
 		return 0;
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/input/joystick/xpad.c linux-libre-4.12.11-gnu/drivers/input/joystick/xpad.c
--- linux-libre-4.12.10-gnu/drivers/input/joystick/xpad.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/input/joystick/xpad.c	2017-09-07 02:37:34.000000000 -0400
@@ -389,10 +389,21 @@ static const u8 xboxone_hori_init[] = {
 };
 
 /*
- * A rumble packet is required for some PowerA pads to start
+ * A specific rumble packet is required for some PowerA pads to start
  * sending input reports. One of those pads is (0x24c6:0x543a).
  */
-static const u8 xboxone_zerorumble_init[] = {
+static const u8 xboxone_rumblebegin_init[] = {
+	0x09, 0x00, 0x00, 0x09, 0x00, 0x0F, 0x00, 0x00,
+	0x1D, 0x1D, 0xFF, 0x00, 0x00
+};
+
+/*
+ * A rumble packet with zero FF intensity will immediately
+ * terminate the rumbling required to init PowerA pads.
+ * This should happen fast enough that the motors don't
+ * spin up to enough speed to actually vibrate the gamepad.
+ */
+static const u8 xboxone_rumbleend_init[] = {
 	0x09, 0x00, 0x00, 0x09, 0x00, 0x0F, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x00
 };
@@ -407,9 +418,12 @@ static const struct xboxone_init_packet
 	XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init),
 	XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init),
 	XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init),
-	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_zerorumble_init),
-	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_zerorumble_init),
-	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_zerorumble_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumbleend_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumbleend_init),
+	XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumbleend_init),
 };
 
 struct xpad_output_packet {
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/input/mouse/synaptics.c linux-libre-4.12.11-gnu/drivers/input/mouse/synaptics.c
--- linux-libre-4.12.10-gnu/drivers/input/mouse/synaptics.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/input/mouse/synaptics.c	2017-09-07 02:37:34.000000000 -0400
@@ -535,16 +535,17 @@ static void synaptics_apply_quirks(struc
 	}
 }
 
+static bool synaptics_has_agm(struct synaptics_data *priv)
+{
+	return (SYN_CAP_ADV_GESTURE(priv->info.ext_cap_0c) ||
+		SYN_CAP_IMAGE_SENSOR(priv->info.ext_cap_0c));
+}
+
 static int synaptics_set_advanced_gesture_mode(struct psmouse *psmouse)
 {
 	static u8 param = 0xc8;
-	struct synaptics_data *priv = psmouse->private;
 	int error;
 
-	if (!(SYN_CAP_ADV_GESTURE(priv->info.ext_cap_0c) ||
-	      SYN_CAP_IMAGE_SENSOR(priv->info.ext_cap_0c)))
-		return 0;
-
 	error = psmouse_sliced_command(psmouse, SYN_QUE_MODEL);
 	if (error)
 		return error;
@@ -553,9 +554,6 @@ static int synaptics_set_advanced_gestur
 	if (error)
 		return error;
 
-	/* Advanced gesture mode also sends multi finger data */
-	priv->info.capabilities |= BIT(1);
-
 	return 0;
 }
 
@@ -578,7 +576,7 @@ static int synaptics_set_mode(struct psm
 	if (error)
 		return error;
 
-	if (priv->absolute_mode) {
+	if (priv->absolute_mode && synaptics_has_agm(priv)) {
 		error = synaptics_set_advanced_gesture_mode(psmouse);
 		if (error) {
 			psmouse_err(psmouse,
@@ -766,9 +764,7 @@ static int synaptics_parse_hw_state(cons
 			 ((buf[0] & 0x04) >> 1) |
 			 ((buf[3] & 0x04) >> 2));
 
-		if ((SYN_CAP_ADV_GESTURE(priv->info.ext_cap_0c) ||
-			SYN_CAP_IMAGE_SENSOR(priv->info.ext_cap_0c)) &&
-		    hw->w == 2) {
+		if (synaptics_has_agm(priv) && hw->w == 2) {
 			synaptics_parse_agm(buf, priv, hw);
 			return 1;
 		}
@@ -1033,6 +1029,15 @@ static void synaptics_image_sensor_proce
 	synaptics_report_mt_data(psmouse, sgm, num_fingers);
 }
 
+static bool synaptics_has_multifinger(struct synaptics_data *priv)
+{
+	if (SYN_CAP_MULTIFINGER(priv->info.capabilities))
+		return true;
+
+	/* Advanced gesture mode also sends multi finger data */
+	return synaptics_has_agm(priv);
+}
+
 /*
  *  called for each full received packet from the touchpad
  */
@@ -1079,7 +1084,7 @@ static void synaptics_process_packet(str
 		if (SYN_CAP_EXTENDED(info->capabilities)) {
 			switch (hw.w) {
 			case 0 ... 1:
-				if (SYN_CAP_MULTIFINGER(info->capabilities))
+				if (synaptics_has_multifinger(priv))
 					num_fingers = hw.w + 2;
 				break;
 			case 2:
@@ -1123,7 +1128,7 @@ static void synaptics_process_packet(str
 		input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
 
 	input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1);
-	if (SYN_CAP_MULTIFINGER(info->capabilities)) {
+	if (synaptics_has_multifinger(priv)) {
 		input_report_key(dev, BTN_TOOL_DOUBLETAP, num_fingers == 2);
 		input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3);
 	}
@@ -1283,7 +1288,7 @@ static void set_input_params(struct psmo
 	__set_bit(BTN_TOUCH, dev->keybit);
 	__set_bit(BTN_TOOL_FINGER, dev->keybit);
 
-	if (SYN_CAP_MULTIFINGER(info->capabilities)) {
+	if (synaptics_has_multifinger(priv)) {
 		__set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
 		__set_bit(BTN_TOOL_TRIPLETAP, dev->keybit);
 	}
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/irqchip/irq-mips-gic.c linux-libre-4.12.11-gnu/drivers/irqchip/irq-mips-gic.c
--- linux-libre-4.12.10-gnu/drivers/irqchip/irq-mips-gic.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/irqchip/irq-mips-gic.c	2017-09-07 02:37:34.000000000 -0400
@@ -1022,8 +1022,11 @@ static int __init gic_of_init(struct dev
 		gic_len = resource_size(&res);
 	}
 
-	if (mips_cm_present())
+	if (mips_cm_present()) {
 		write_gcr_gic_base(gic_base | CM_GCR_GIC_BASE_GICEN_MSK);
+		/* Ensure GIC region is enabled before trying to access it */
+		__sync();
+	}
 	gic_present = true;
 
 	__gic_init(gic_base, gic_len, cpu_vec, 0, node);
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/md/dm-mpath.c linux-libre-4.12.11-gnu/drivers/md/dm-mpath.c
--- linux-libre-4.12.10-gnu/drivers/md/dm-mpath.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/md/dm-mpath.c	2017-09-07 02:37:34.000000000 -0400
@@ -504,7 +504,6 @@ static int multipath_clone_and_map(struc
 		if (queue_dying) {
 			atomic_inc(&m->pg_init_in_progress);
 			activate_or_offline_path(pgpath);
-			return DM_MAPIO_REQUEUE;
 		}
 		return DM_MAPIO_DELAY_REQUEUE;
 	}
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/mmc/host/sdhci-xenon.c linux-libre-4.12.11-gnu/drivers/mmc/host/sdhci-xenon.c
--- linux-libre-4.12.10-gnu/drivers/mmc/host/sdhci-xenon.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/mmc/host/sdhci-xenon.c	2017-09-07 02:37:34.000000000 -0400
@@ -210,8 +210,27 @@ static void xenon_set_uhs_signaling(stru
 	sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
 }
 
+static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
+		unsigned short vdd)
+{
+	struct mmc_host *mmc = host->mmc;
+	u8 pwr = host->pwr;
+
+	sdhci_set_power_noreg(host, mode, vdd);
+
+	if (host->pwr == pwr)
+		return;
+
+	if (host->pwr == 0)
+		vdd = 0;
+
+	if (!IS_ERR(mmc->supply.vmmc))
+		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
+}
+
 static const struct sdhci_ops sdhci_xenon_ops = {
 	.set_clock		= sdhci_set_clock,
+	.set_power		= xenon_set_power,
 	.set_bus_width		= sdhci_set_bus_width,
 	.reset			= xenon_reset,
 	.set_uhs_signaling	= xenon_set_uhs_signaling,
diff -druNp --no-dereference linux-libre-4.12.10-gnu/drivers/net/wireless/ti/wl1251/main.c linux-libre-4.12.11-gnu/drivers/net/wireless/ti/wl1251/main.c
--- linux-libre-4.12.10-gnu/drivers/net/wireless/ti/wl1251/main.c	2017-08-30 07:51:13.000000000 -0400
+++ linux-libre-4.12.11-gnu/drivers/net/wireless/ti/wl1251/main.c	2017-09-07 06:21:33.000000000 -0400
@@ -1571,6 +1571,7 @@ struct ieee80211_hw *wl1251_alloc_hw(voi
 
 	wl->state = WL1251_STATE_OFF;
 	mutex_init(&wl->mutex);
+	spin_lock_init(&wl->wl_lock);
 
 	wl->tx_mgmt_frm_rate = DEFAULT_HW_GEN_TX_RATE;
 	wl->tx_mgmt_frm_mod = DEFAULT_HW_GEN_MODULATION_TYPE;
diff -druNp --no-dereference linux-libre-4.12.10-gnu/fs/ceph/addr.c linux-libre-4.12.11-gnu/fs/ceph/addr.c
--- linux-libre-4.12.10-gnu/fs/ceph/addr.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/fs/ceph/addr.c	2017-09-07 02:37:34.000000000 -0400
@@ -189,7 +189,7 @@ static int ceph_releasepage(struct page
 /*
  * read a single page, without unlocking it.
  */
-static int readpage_nounlock(struct file *filp, struct page *page)
+static int ceph_do_readpage(struct file *filp, struct page *page)
 {
 	struct inode *inode = file_inode(filp);
 	struct ceph_inode_info *ci = ceph_inode(inode);
@@ -219,7 +219,7 @@ static int readpage_nounlock(struct file
 
 	err = ceph_readpage_from_fscache(inode, page);
 	if (err == 0)
-		goto out;
+		return -EINPROGRESS;
 
 	dout("readpage inode %p file %p page %p index %lu\n",
 	     inode, filp, page, page->index);
@@ -249,8 +249,11 @@ out:
 
 static int ceph_readpage(struct file *filp, struct page *page)
 {
-	int r = readpage_nounlock(filp, page);
-	unlock_page(page);
+	int r = ceph_do_readpage(filp, page);
+	if (r != -EINPROGRESS)
+		unlock_page(page);
+	else
+		r = 0;
 	return r;
 }
 
@@ -1240,7 +1243,7 @@ retry_locked:
 			goto retry_locked;
 		r = writepage_nounlock(page, NULL);
 		if (r < 0)
-			goto fail_nosnap;
+			goto fail_unlock;
 		goto retry_locked;
 	}
 
@@ -1268,11 +1271,14 @@ retry_locked:
 	}
 
 	/* we need to read it. */
-	r = readpage_nounlock(file, page);
-	if (r < 0)
-		goto fail_nosnap;
+	r = ceph_do_readpage(file, page);
+	if (r < 0) {
+		if (r == -EINPROGRESS)
+			return -EAGAIN;
+		goto fail_unlock;
+	}
 	goto retry_locked;
-fail_nosnap:
+fail_unlock:
 	unlock_page(page);
 	return r;
 }
diff -druNp --no-dereference linux-libre-4.12.10-gnu/fs/ceph/cache.c linux-libre-4.12.11-gnu/fs/ceph/cache.c
--- linux-libre-4.12.10-gnu/fs/ceph/cache.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/fs/ceph/cache.c	2017-09-07 02:37:34.000000000 -0400
@@ -240,13 +240,7 @@ void ceph_fscache_file_set_cookie(struct
 	}
 }
 
-static void ceph_vfs_readpage_complete(struct page *page, void *data, int error)
-{
-	if (!error)
-		SetPageUptodate(page);
-}
-
-static void ceph_vfs_readpage_complete_unlock(struct page *page, void *data, int error)
+static void ceph_readpage_from_fscache_complete(struct page *page, void *data, int error)
 {
 	if (!error)
 		SetPageUptodate(page);
@@ -274,7 +268,7 @@ int ceph_readpage_from_fscache(struct in
 		return -ENOBUFS;
 
 	ret = fscache_read_or_alloc_page(ci->fscache, page,
-					 ceph_vfs_readpage_complete, NULL,
+					 ceph_readpage_from_fscache_complete, NULL,
 					 GFP_KERNEL);
 
 	switch (ret) {
@@ -303,7 +297,7 @@ int ceph_readpages_from_fscache(struct i
 		return -ENOBUFS;
 
 	ret = fscache_read_or_alloc_pages(ci->fscache, mapping, pages, nr_pages,
-					  ceph_vfs_readpage_complete_unlock,
+					  ceph_readpage_from_fscache_complete,
 					  NULL, mapping_gfp_mask(mapping));
 
 	switch (ret) {
diff -druNp --no-dereference linux-libre-4.12.10-gnu/fs/cifs/dir.c linux-libre-4.12.11-gnu/fs/cifs/dir.c
--- linux-libre-4.12.10-gnu/fs/cifs/dir.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/fs/cifs/dir.c	2017-09-07 02:37:34.000000000 -0400
@@ -205,7 +205,7 @@ check_name(struct dentry *direntry, stru
 	int i;
 
 	if (unlikely(direntry->d_name.len >
-		     tcon->fsAttrInfo.MaxPathNameComponentLength))
+		     le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength)))
 		return -ENAMETOOLONG;
 
 	if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
diff -druNp --no-dereference linux-libre-4.12.10-gnu/fs/cifs/smb2pdu.h linux-libre-4.12.11-gnu/fs/cifs/smb2pdu.h
--- linux-libre-4.12.10-gnu/fs/cifs/smb2pdu.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/fs/cifs/smb2pdu.h	2017-09-07 02:37:34.000000000 -0400
@@ -84,8 +84,8 @@
 
 #define NUMBER_OF_SMB2_COMMANDS	0x0013
 
-/* BB FIXME - analyze following length BB */
-#define MAX_SMB2_HDR_SIZE 0x78 /* 4 len + 64 hdr + (2*24 wct) + 2 bct + 2 pad */
+/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
+#define MAX_SMB2_HDR_SIZE 0x00b0
 
 #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
 #define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)
diff -druNp --no-dereference linux-libre-4.12.10-gnu/fs/eventpoll.c linux-libre-4.12.11-gnu/fs/eventpoll.c
--- linux-libre-4.12.10-gnu/fs/eventpoll.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/fs/eventpoll.c	2017-09-07 02:37:34.000000000 -0400
@@ -600,8 +600,13 @@ static void ep_remove_wait_queue(struct
 	wait_queue_head_t *whead;
 
 	rcu_read_lock();
-	/* If it is cleared by POLLFREE, it should be rcu-safe */
-	whead = rcu_dereference(pwq->whead);
+	/*
+	 * If it is cleared by POLLFREE, it should be rcu-safe.
+	 * If we read NULL we need a barrier paired with
+	 * smp_store_release() in ep_poll_callback(), otherwise
+	 * we rely on whead->lock.
+	 */
+	whead = smp_load_acquire(&pwq->whead);
 	if (whead)
 		remove_wait_queue(whead, &pwq->wait);
 	rcu_read_unlock();
@@ -1086,17 +1091,6 @@ static int ep_poll_callback(wait_queue_t
 	struct eventpoll *ep = epi->ep;
 	int ewake = 0;
 
-	if ((unsigned long)key & POLLFREE) {
-		ep_pwq_from_wait(wait)->whead = NULL;
-		/*
-		 * whead = NULL above can race with ep_remove_wait_queue()
-		 * which can do another remove_wait_queue() after us, so we
-		 * can't use __remove_wait_queue(). whead->lock is held by
-		 * the caller.
-		 */
-		list_del_init(&wait->task_list);
-	}
-
 	spin_lock_irqsave(&ep->lock, flags);
 
 	ep_set_busy_poll_napi_id(epi);
@@ -1180,10 +1174,26 @@ out_unlock:
 	if (pwake)
 		ep_poll_safewake(&ep->poll_wait);
 
-	if (epi->event.events & EPOLLEXCLUSIVE)
-		return ewake;
+	if (!(epi->event.events & EPOLLEXCLUSIVE))
+		ewake = 1;
 
-	return 1;
+	if ((unsigned long)key & POLLFREE) {
+		/*
+		 * If we race with ep_remove_wait_queue() it can miss
+		 * ->whead = NULL and do another remove_wait_queue() after
+		 * us, so we can't use __remove_wait_queue().
+		 */
+		list_del_init(&wait->task_list);
+		/*
+		 * ->whead != NULL protects us from the race with ep_free()
+		 * or ep_remove(), ep_remove_wait_queue() takes whead->lock
+		 * held by the caller. Once we nullify it, nothing protects
+		 * ep/epi or even wait.
+		 */
+		smp_store_release(&ep_pwq_from_wait(wait)->whead, NULL);
+	}
+
+	return ewake;
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.12.10-gnu/include/asm-generic/topology.h linux-libre-4.12.11-gnu/include/asm-generic/topology.h
--- linux-libre-4.12.10-gnu/include/asm-generic/topology.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/include/asm-generic/topology.h	2017-09-07 02:37:34.000000000 -0400
@@ -48,7 +48,11 @@
 #define parent_node(node)	((void)(node),0)
 #endif
 #ifndef cpumask_of_node
-#define cpumask_of_node(node)	((void)node, cpu_online_mask)
+  #ifdef CONFIG_NEED_MULTIPLE_NODES
+    #define cpumask_of_node(node)	((node) == 0 ? cpu_online_mask : cpu_none_mask)
+  #else
+    #define cpumask_of_node(node)	((void)node, cpu_online_mask)
+  #endif
 #endif
 #ifndef pcibus_to_node
 #define pcibus_to_node(bus)	((void)(bus), -1)
diff -druNp --no-dereference linux-libre-4.12.10-gnu/include/linux/nvme.h linux-libre-4.12.11-gnu/include/linux/nvme.h
--- linux-libre-4.12.10-gnu/include/linux/nvme.h	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/include/linux/nvme.h	2017-09-07 02:37:34.000000000 -0400
@@ -245,7 +245,7 @@ enum {
 	NVME_CTRL_ONCS_WRITE_ZEROES		= 1 << 3,
 	NVME_CTRL_VWC_PRESENT			= 1 << 0,
 	NVME_CTRL_OACS_SEC_SUPP                 = 1 << 0,
-	NVME_CTRL_OACS_DBBUF_SUPP		= 1 << 7,
+	NVME_CTRL_OACS_DBBUF_SUPP		= 1 << 8,
 };
 
 struct nvme_lbaf {
diff -druNp --no-dereference linux-libre-4.12.10-gnu/kernel/cgroup/cpuset.c linux-libre-4.12.11-gnu/kernel/cgroup/cpuset.c
--- linux-libre-4.12.10-gnu/kernel/cgroup/cpuset.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/kernel/cgroup/cpuset.c	2017-09-07 02:37:34.000000000 -0400
@@ -1907,6 +1907,7 @@ static struct cftype files[] = {
 	{
 		.name = "memory_pressure",
 		.read_u64 = cpuset_read_u64,
+		.private = FILE_MEMORY_PRESSURE,
 	},
 
 	{
diff -druNp --no-dereference linux-libre-4.12.10-gnu/kernel/events/uprobes.c linux-libre-4.12.11-gnu/kernel/events/uprobes.c
--- linux-libre-4.12.10-gnu/kernel/events/uprobes.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/kernel/events/uprobes.c	2017-09-07 02:37:34.000000000 -0400
@@ -1262,8 +1262,6 @@ void uprobe_end_dup_mmap(void)
 
 void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm)
 {
-	newmm->uprobes_state.xol_area = NULL;
-
 	if (test_bit(MMF_HAS_UPROBES, &oldmm->flags)) {
 		set_bit(MMF_HAS_UPROBES, &newmm->flags);
 		/* unconditionally, dup_mmap() skips VM_DONTCOPY vmas */
diff -druNp --no-dereference linux-libre-4.12.10-gnu/kernel/fork.c linux-libre-4.12.11-gnu/kernel/fork.c
--- linux-libre-4.12.10-gnu/kernel/fork.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/kernel/fork.c	2017-09-07 02:37:34.000000000 -0400
@@ -781,6 +781,13 @@ static void mm_init_owner(struct mm_stru
 #endif
 }
 
+static void mm_init_uprobes_state(struct mm_struct *mm)
+{
+#ifdef CONFIG_UPROBES
+	mm->uprobes_state.xol_area = NULL;
+#endif
+}
+
 static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
 	struct user_namespace *user_ns)
 {
@@ -808,6 +815,7 @@ static struct mm_struct *mm_init(struct
 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
 	mm->pmd_huge_pte = NULL;
 #endif
+	mm_init_uprobes_state(mm);
 
 	if (current->mm) {
 		mm->flags = current->mm->flags & MMF_INIT_MASK;
diff -druNp --no-dereference linux-libre-4.12.10-gnu/lib/mpi/mpicoder.c linux-libre-4.12.11-gnu/lib/mpi/mpicoder.c
--- linux-libre-4.12.10-gnu/lib/mpi/mpicoder.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/lib/mpi/mpicoder.c	2017-09-07 02:37:34.000000000 -0400
@@ -364,11 +364,11 @@ MPI mpi_read_raw_from_sgl(struct scatter
 	}
 
 	miter.consumed = lzeros;
-	sg_miter_stop(&miter);
 
 	nbytes -= lzeros;
 	nbits = nbytes * 8;
 	if (nbits > MAX_EXTERN_MPI_BITS) {
+		sg_miter_stop(&miter);
 		pr_info("MPI: mpi too large (%u bits)\n", nbits);
 		return NULL;
 	}
@@ -376,6 +376,8 @@ MPI mpi_read_raw_from_sgl(struct scatter
 	if (nbytes > 0)
 		nbits -= count_leading_zeros(*buff) - (BITS_PER_LONG - 8);
 
+	sg_miter_stop(&miter);
+
 	nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB);
 	val = mpi_alloc(nlimbs);
 	if (!val)
diff -druNp --no-dereference linux-libre-4.12.10-gnu/Makefile linux-libre-4.12.11-gnu/Makefile
--- linux-libre-4.12.10-gnu/Makefile	2017-08-30 07:14:56.000000000 -0400
+++ linux-libre-4.12.11-gnu/Makefile	2017-09-07 05:45:43.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 12
-SUBLEVEL = 10
+SUBLEVEL = 11
 EXTRAVERSION = -gnu
 NAME = Fearless Coyote
 
diff -druNp --no-dereference linux-libre-4.12.10-gnu/mm/madvise.c linux-libre-4.12.11-gnu/mm/madvise.c
--- linux-libre-4.12.10-gnu/mm/madvise.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/mm/madvise.c	2017-09-07 02:37:34.000000000 -0400
@@ -610,6 +610,7 @@ static int madvise_inject_error(int beha
 		unsigned long start, unsigned long end)
 {
 	struct page *page;
+	struct zone *zone;
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
@@ -643,6 +644,11 @@ static int madvise_inject_error(int beha
 		if (ret)
 			return ret;
 	}
+
+	/* Ensure that all poisoned pages are removed from per-cpu lists */
+	for_each_populated_zone(zone)
+		drain_all_pages(zone);
+
 	return 0;
 }
 #endif
diff -druNp --no-dereference linux-libre-4.12.10-gnu/net/xfrm/xfrm_policy.c linux-libre-4.12.11-gnu/net/xfrm/xfrm_policy.c
--- linux-libre-4.12.10-gnu/net/xfrm/xfrm_policy.c	2017-08-30 04:32:30.000000000 -0400
+++ linux-libre-4.12.11-gnu/net/xfrm/xfrm_policy.c	2017-09-07 02:37:34.000000000 -0400
@@ -3301,9 +3301,15 @@ int xfrm_migrate(const struct xfrm_selec
 	struct xfrm_state *x_new[XFRM_MAX_DEPTH];
 	struct xfrm_migrate *mp;
 
+	/* Stage 0 - sanity checks */
 	if ((err = xfrm_migrate_check(m, num_migrate)) < 0)
 		goto out;
 
+	if (dir >= XFRM_POLICY_MAX) {
+		err = -EINVAL;
+		goto out;
+	}
+
 	/* Stage 1 - find policy */
 	if ((pol = xfrm_migrate_policy_find(sel, dir, type, net)) == NULL) {
 		err = -ENOENT;
