diff -druNp --no-dereference linux-libre-3.18.92-gnu/arch/arm/boot/dts/kirkwood-openblocks_a7.dts linux-libre-3.18.93-gnu/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
--- linux-libre-3.18.92-gnu/arch/arm/boot/dts/kirkwood-openblocks_a7.dts	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/arch/arm/boot/dts/kirkwood-openblocks_a7.dts	2018-01-31 08:46:16.000000000 -0500
@@ -53,7 +53,8 @@
 		};
 
 		pinctrl: pin-controller@10000 {
-			pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>;
+			pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header
+				     &pmx_gpio_header_gpo>;
 			pinctrl-names = "default";
 
 			pmx_uart0: pmx-uart0 {
@@ -85,11 +86,16 @@
 			 * ground.
 			 */
 			pmx_gpio_header: pmx-gpio-header {
-				marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28",
+				marvell,pins = "mpp17", "mpp29", "mpp28",
 					       "mpp35", "mpp34", "mpp40";
 				marvell,function = "gpio";
 			};
 
+			pmx_gpio_header_gpo: pxm-gpio-header-gpo {
+				marvell,pins = "mpp7";
+				marvell,function = "gpo";
+			};
+
 			pmx_gpio_init: pmx-init {
 				marvell,pins = "mpp38";
 				marvell,function = "gpio";
diff -druNp --no-dereference linux-libre-3.18.92-gnu/arch/arm64/kvm/handle_exit.c linux-libre-3.18.93-gnu/arch/arm64/kvm/handle_exit.c
--- linux-libre-3.18.92-gnu/arch/arm64/kvm/handle_exit.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/arch/arm64/kvm/handle_exit.c	2018-01-31 08:46:16.000000000 -0500
@@ -34,7 +34,7 @@ static int handle_hvc(struct kvm_vcpu *v
 
 	ret = kvm_psci_call(vcpu);
 	if (ret < 0) {
-		kvm_inject_undefined(vcpu);
+		*vcpu_reg(vcpu, 0) = ~0UL;
 		return 1;
 	}
 
@@ -43,7 +43,7 @@ static int handle_hvc(struct kvm_vcpu *v
 
 static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
 {
-	kvm_inject_undefined(vcpu);
+	*vcpu_reg(vcpu, 0) = ~0UL;
 	return 1;
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/arch/mips/ar7/platform.c linux-libre-3.18.93-gnu/arch/mips/ar7/platform.c
--- linux-libre-3.18.92-gnu/arch/mips/ar7/platform.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/arch/mips/ar7/platform.c	2018-01-31 08:46:16.000000000 -0500
@@ -581,7 +581,7 @@ static int __init ar7_register_uarts(voi
 	uart_port.type		= PORT_AR7;
 	uart_port.uartclk	= clk_get_rate(bus_clk) / 2;
 	uart_port.iotype	= UPIO_MEM32;
-	uart_port.flags		= UPF_FIXED_TYPE;
+	uart_port.flags		= UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF;
 	uart_port.regshift	= 2;
 
 	uart_port.line		= 0;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/arch/x86/include/asm/processor.h linux-libre-3.18.93-gnu/arch/x86/include/asm/processor.h
--- linux-libre-3.18.92-gnu/arch/x86/include/asm/processor.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/arch/x86/include/asm/processor.h	2018-01-31 08:46:16.000000000 -0500
@@ -669,7 +669,7 @@ static inline void sync_core(void)
 {
 	int tmp;
 
-#ifdef CONFIG_M486
+#ifdef CONFIG_X86_32
 	/*
 	 * Do a CPUID if available, otherwise do a jump.  The jump
 	 * can conveniently enough be the jump around CPUID.
diff -druNp --no-dereference linux-libre-3.18.92-gnu/arch/x86/kernel/cpu/microcode/intel.c linux-libre-3.18.93-gnu/arch/x86/kernel/cpu/microcode/intel.c
--- linux-libre-3.18.92-gnu/arch/x86/kernel/cpu/microcode/intel.c	2018-01-17 18:24:26.000000000 -0500
+++ linux-libre-3.18.93-gnu/arch/x86/kernel/cpu/microcode/intel.c	2018-01-31 10:16:36.000000000 -0500
@@ -87,6 +87,9 @@ MODULE_DESCRIPTION("Microcode Update Dri
 MODULE_AUTHOR("Tigran Aivazian <tigran@aivazian.fsnet.co.uk>");
 MODULE_LICENSE("GPL");
 
+/* last level cache size per core */
+static int llc_size_per_core;
+
 static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
 {
 	struct cpuinfo_x86 *c = &cpu_data(cpu_num);
@@ -273,12 +276,14 @@ static bool is_blacklisted(unsigned int
 
 	/*
 	 * Late loading on model 79 with microcode revision less than 0x0b000021
-	 * may result in a system hang. This behavior is documented in item
-	 * BDF90, #334165 (Intel Xeon Processor E7-8800/4800 v4 Product Family).
+	 * and LLC size per core bigger than 2.5MB may result in a system hang.
+	 * This behavior is documented in item BDF90, #334165 (Intel Xeon
+	 * Processor E7-8800/4800 v4 Product Family).
 	 */
 	if (c->x86 == 6 &&
 	    c->x86_model == 79 &&
 	    c->x86_mask == 0x01 &&
+	    llc_size_per_core > 2621440 &&
 	    c->microcode < 0x0b000021) {
 		pr_err_once("Erratum BDF90: late loading with revision < 0x0b000021 (0x%x) disabled.\n", c->microcode);
 		pr_err_once("Please consider either early loading through initrd/built-in or a potential BIOS update.\n");
@@ -345,6 +350,15 @@ static struct microcode_ops microcode_in
 	.microcode_fini_cpu               = microcode_fini_cpu,
 };
 
+static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c)
+{
+	u64 llc_size = c->x86_cache_size * 1024;
+
+	do_div(llc_size, c->x86_max_cores);
+
+	return (int)llc_size;
+}
+
 struct microcode_ops * __init init_intel_microcode(void)
 {
 	struct cpuinfo_x86 *c = &cpu_data(0);
@@ -355,6 +369,8 @@ struct microcode_ops * __init init_intel
 		return NULL;
 	}
 
+	llc_size_per_core = calc_llc_size_per_core(c);
+
 	return &microcode_intel_ops;
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/input/misc/twl4030-vibra.c linux-libre-3.18.93-gnu/drivers/input/misc/twl4030-vibra.c
--- linux-libre-3.18.92-gnu/drivers/input/misc/twl4030-vibra.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/input/misc/twl4030-vibra.c	2018-01-31 08:46:16.000000000 -0500
@@ -180,12 +180,15 @@ static SIMPLE_DEV_PM_OPS(twl4030_vibra_p
 			 twl4030_vibra_suspend, twl4030_vibra_resume);
 
 static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
-			      struct device_node *node)
+			      struct device_node *parent)
 {
+	struct device_node *node;
+
 	if (pdata && pdata->coexist)
 		return true;
 
-	if (of_find_node_by_name(node, "codec")) {
+	node = of_get_child_by_name(parent, "codec");
+	if (node) {
 		of_node_put(node);
 		return true;
 	}
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/input/misc/twl6040-vibra.c linux-libre-3.18.93-gnu/drivers/input/misc/twl6040-vibra.c
--- linux-libre-3.18.92-gnu/drivers/input/misc/twl6040-vibra.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/input/misc/twl6040-vibra.c	2018-01-31 08:46:16.000000000 -0500
@@ -264,7 +264,7 @@ static int twl6040_vibra_probe(struct pl
 	int vddvibr_uV = 0;
 	int error;
 
-	twl6040_core_node = of_find_node_by_name(twl6040_core_dev->of_node,
+	twl6040_core_node = of_get_child_by_name(twl6040_core_dev->of_node,
 						 "vibra");
 	if (!twl6040_core_node) {
 		dev_err(&pdev->dev, "parent of node is missing?\n");
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/input/touchscreen/88pm860x-ts.c linux-libre-3.18.93-gnu/drivers/input/touchscreen/88pm860x-ts.c
--- linux-libre-3.18.92-gnu/drivers/input/touchscreen/88pm860x-ts.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/input/touchscreen/88pm860x-ts.c	2018-01-31 08:46:16.000000000 -0500
@@ -126,7 +126,7 @@ static int pm860x_touch_dt_init(struct p
 	int data, n, ret;
 	if (!np)
 		return -ENODEV;
-	np = of_find_node_by_name(np, "touch");
+	np = of_get_child_by_name(np, "touch");
 	if (!np) {
 		dev_err(&pdev->dev, "Can't find touch node\n");
 		return -EINVAL;
@@ -144,13 +144,13 @@ static int pm860x_touch_dt_init(struct p
 	if (data) {
 		ret = pm860x_reg_write(i2c, PM8607_GPADC_MISC1, data);
 		if (ret < 0)
-			return -EINVAL;
+			goto err_put_node;
 	}
 	/* set tsi prebias time */
 	if (!of_property_read_u32(np, "marvell,88pm860x-tsi-prebias", &data)) {
 		ret = pm860x_reg_write(i2c, PM8607_TSI_PREBIAS, data);
 		if (ret < 0)
-			return -EINVAL;
+			goto err_put_node;
 	}
 	/* set prebias & prechg time of pen detect */
 	data = 0;
@@ -161,10 +161,18 @@ static int pm860x_touch_dt_init(struct p
 	if (data) {
 		ret = pm860x_reg_write(i2c, PM8607_PD_PREBIAS, data);
 		if (ret < 0)
-			return -EINVAL;
+			goto err_put_node;
 	}
 	of_property_read_u32(np, "marvell,88pm860x-resistor-X", res_x);
+
+	of_node_put(np);
+
 	return 0;
+
+err_put_node:
+	of_node_put(np);
+
+	return -EINVAL;
 }
 #else
 #define pm860x_touch_dt_init(x, y, z)	(-1)
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/md/dm-thin-metadata.c linux-libre-3.18.93-gnu/drivers/md/dm-thin-metadata.c
--- linux-libre-3.18.92-gnu/drivers/md/dm-thin-metadata.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/md/dm-thin-metadata.c	2018-01-31 08:46:16.000000000 -0500
@@ -81,10 +81,14 @@
 #define SECTOR_TO_BLOCK_SHIFT 3
 
 /*
+ * For btree insert:
  *  3 for btree insert +
  *  2 for btree lookup used within space map
+ * For btree remove:
+ *  2 for shadow spine +
+ *  4 for rebalance 3 child node
  */
-#define THIN_MAX_CONCURRENT_LOCKS 5
+#define THIN_MAX_CONCURRENT_LOCKS 6
 
 /* This should be plenty */
 #define SPACE_MAP_ROOT_SIZE 128
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/md/persistent-data/dm-btree.c linux-libre-3.18.93-gnu/drivers/md/persistent-data/dm-btree.c
--- linux-libre-3.18.92-gnu/drivers/md/persistent-data/dm-btree.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/md/persistent-data/dm-btree.c	2018-01-31 08:46:16.000000000 -0500
@@ -572,23 +572,8 @@ static int btree_split_beneath(struct sh
 	pn->keys[1] = rn->keys[0];
 	memcpy_disk(value_ptr(pn, 1), &val, sizeof(__le64));
 
-	/*
-	 * rejig the spine.  This is ugly, since it knows too
-	 * much about the spine
-	 */
-	if (s->nodes[0] != new_parent) {
-		unlock_block(s->info, s->nodes[0]);
-		s->nodes[0] = new_parent;
-	}
-	if (key < le64_to_cpu(rn->keys[0])) {
-		unlock_block(s->info, right);
-		s->nodes[1] = left;
-	} else {
-		unlock_block(s->info, left);
-		s->nodes[1] = right;
-	}
-	s->count = 2;
-
+	unlock_block(s->info, left);
+	unlock_block(s->info, right);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/net/ppp/pppoe.c linux-libre-3.18.93-gnu/drivers/net/ppp/pppoe.c
--- linux-libre-3.18.92-gnu/drivers/net/ppp/pppoe.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/net/ppp/pppoe.c	2018-01-31 08:46:16.000000000 -0500
@@ -830,6 +830,7 @@ static int pppoe_sendmsg(struct kiocb *i
 	struct pppoe_hdr *ph;
 	struct net_device *dev;
 	char *start;
+	int hlen;
 
 	lock_sock(sk);
 	if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) {
@@ -848,16 +849,16 @@ static int pppoe_sendmsg(struct kiocb *i
 	if (total_len > (dev->mtu + dev->hard_header_len))
 		goto end;
 
-
-	skb = sock_wmalloc(sk, total_len + dev->hard_header_len + 32,
-			   0, GFP_KERNEL);
+	hlen = LL_RESERVED_SPACE(dev);
+	skb = sock_wmalloc(sk, hlen + sizeof(*ph) + total_len +
+			   dev->needed_tailroom, 0, GFP_KERNEL);
 	if (!skb) {
 		error = -ENOMEM;
 		goto end;
 	}
 
 	/* Reserve space for headers. */
-	skb_reserve(skb, dev->hard_header_len);
+	skb_reserve(skb, hlen);
 	skb_reset_network_header(skb);
 
 	skb->dev = dev;
@@ -918,7 +919,7 @@ static int __pppoe_xmit(struct sock *sk,
 	/* Copy the data if there is no space for the header or if it's
 	 * read-only.
 	 */
-	if (skb_cow_head(skb, sizeof(*ph) + dev->hard_header_len))
+	if (skb_cow_head(skb, LL_RESERVED_SPACE(dev) + sizeof(*ph)))
 		goto abort;
 
 	__skb_push(skb, sizeof(*ph));
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/net/vmxnet3/vmxnet3_drv.c linux-libre-3.18.93-gnu/drivers/net/vmxnet3/vmxnet3_drv.c
--- linux-libre-3.18.92-gnu/drivers/net/vmxnet3/vmxnet3_drv.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/net/vmxnet3/vmxnet3_drv.c	2018-01-31 08:46:16.000000000 -0500
@@ -1420,7 +1420,6 @@ static void vmxnet3_rq_destroy(struct vm
 					  rq->rx_ring[i].basePA);
 			rq->rx_ring[i].base = NULL;
 		}
-		rq->buf_info[i] = NULL;
 	}
 
 	if (rq->comp_ring.base) {
@@ -1435,6 +1434,7 @@ static void vmxnet3_rq_destroy(struct vm
 			(rq->rx_ring[0].size + rq->rx_ring[1].size);
 		dma_free_coherent(&adapter->pdev->dev, sz, rq->buf_info[0],
 				  rq->buf_info_pa);
+		rq->buf_info[0] = rq->buf_info[1] = NULL;
 	}
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/phy/phy-core.c linux-libre-3.18.93-gnu/drivers/phy/phy-core.c
--- linux-libre-3.18.92-gnu/drivers/phy/phy-core.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/phy/phy-core.c	2018-01-31 08:46:16.000000000 -0500
@@ -319,6 +319,10 @@ static struct phy *_of_phy_get(struct de
 	if (ret)
 		return ERR_PTR(-ENODEV);
 
+	/* This phy type handled by the usb-phy subsystem for now */
+	if (of_device_is_compatible(args.np, "usb-nop-xceiv"))
+		return ERR_PTR(-ENODEV);
+
 	mutex_lock(&phy_provider_mutex);
 	phy_provider = of_phy_provider_lookup(args.np);
 	if (IS_ERR(phy_provider) || !try_module_get(phy_provider->owner)) {
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/scsi/libiscsi.c linux-libre-3.18.93-gnu/drivers/scsi/libiscsi.c
--- linux-libre-3.18.92-gnu/drivers/scsi/libiscsi.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/scsi/libiscsi.c	2018-01-31 08:46:16.000000000 -0500
@@ -1727,7 +1727,7 @@ int iscsi_queuecommand(struct Scsi_Host
 
 	if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
 		reason = FAILURE_SESSION_IN_RECOVERY;
-		sc->result = DID_REQUEUE;
+		sc->result = DID_REQUEUE << 16;
 		goto fault;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/drivers/scsi/sg.c linux-libre-3.18.93-gnu/drivers/scsi/sg.c
--- linux-libre-3.18.92-gnu/drivers/scsi/sg.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/drivers/scsi/sg.c	2018-01-31 08:46:16.000000000 -0500
@@ -160,7 +160,6 @@ typedef struct sg_fd {		/* holds the sta
 	struct list_head rq_list; /* head of request list */
 	struct fasync_struct *async_qp;	/* used by asynchronous notification */
 	Sg_request req_arr[SG_MAX_QUEUE];	/* used as singly-linked list */
-	char low_dma;		/* as in parent but possibly overridden to 1 */
 	char force_packid;	/* 1 -> pack_id input to read(), 0 -> ignored */
 	char cmd_q;		/* 1 -> allow command queuing, 0 -> don't */
 	unsigned char next_cmd_len; /* 0: automatic, >0: use on next write() */
@@ -947,24 +946,14 @@ sg_ioctl(struct file *filp, unsigned int
 				/* strange ..., for backward compatibility */
 		return sfp->timeout_user;
 	case SG_SET_FORCE_LOW_DMA:
-		result = get_user(val, ip);
-		if (result)
-			return result;
-		if (val) {
-			sfp->low_dma = 1;
-			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);
-			}
-		} else {
-			if (atomic_read(&sdp->detaching))
-				return -ENODEV;
-			sfp->low_dma = sdp->device->host->unchecked_isa_dma;
-		}
+		/*
+		 * N.B. This ioctl never worked properly, but failed to
+		 * return an error value. So returning '0' to keep compability
+		 * with legacy applications.
+		 */
 		return 0;
 	case SG_GET_LOW_DMA:
-		return put_user((int) sfp->low_dma, ip);
+		return put_user((int) sdp->device->host->unchecked_isa_dma, ip);
 	case SG_GET_SCSI_ID:
 		if (!access_ok(VERIFY_WRITE, p, sizeof (sg_scsi_id_t)))
 			return -EFAULT;
@@ -1916,6 +1905,7 @@ sg_build_indirect(Sg_scatter_hold * schp
 	int sg_tablesize = sfp->parentdp->sg_tablesize;
 	int blk_size = buff_size, order;
 	gfp_t gfp_mask = GFP_ATOMIC | __GFP_COMP | __GFP_NOWARN;
+	struct sg_device *sdp = sfp->parentdp;
 
 	if (blk_size < 0)
 		return -EFAULT;
@@ -1941,7 +1931,7 @@ sg_build_indirect(Sg_scatter_hold * schp
 			scatter_elem_sz_prev = num;
 	}
 
-	if (sfp->low_dma)
+	if (sdp->device->host->unchecked_isa_dma)
 		gfp_mask |= GFP_DMA;
 
 	if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
@@ -2204,8 +2194,6 @@ sg_add_sfp(Sg_device * sdp)
 	sfp->timeout = SG_DEFAULT_TIMEOUT;
 	sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER;
 	sfp->force_packid = SG_DEF_FORCE_PACK_ID;
-	sfp->low_dma = (SG_DEF_FORCE_LOW_DMA == 0) ?
-	    sdp->device->host->unchecked_isa_dma : 1;
 	sfp->cmd_q = SG_DEF_COMMAND_Q;
 	sfp->keep_orphan = SG_DEF_KEEP_ORPHAN;
 	sfp->parentdp = sdp;
@@ -2664,7 +2652,7 @@ static void sg_proc_debug_helper(struct
 			   jiffies_to_msecs(fp->timeout),
 			   fp->reserve.bufflen,
 			   (int) fp->reserve.k_use_sg,
-			   (int) fp->low_dma);
+			   (int) sdp->device->host->unchecked_isa_dma);
 		seq_printf(s, "   cmd_q=%d f_packid=%d k_orphan=%d closed=0\n",
 			   (int) fp->cmd_q, (int) fp->force_packid,
 			   (int) fp->keep_orphan);
diff -druNp --no-dereference linux-libre-3.18.92-gnu/fs/fcntl.c linux-libre-3.18.93-gnu/fs/fcntl.c
--- linux-libre-3.18.92-gnu/fs/fcntl.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/fs/fcntl.c	2018-01-31 08:46:16.000000000 -0500
@@ -113,6 +113,10 @@ void f_setown(struct file *filp, unsigne
 	int who = arg;
 	type = PIDTYPE_PID;
 	if (who < 0) {
+		/* avoid overflow below */
+		if (who == INT_MIN)
+			return;
+
 		type = PIDTYPE_PGID;
 		who = -who;
 	}
diff -druNp --no-dereference linux-libre-3.18.92-gnu/fs/pipe.c linux-libre-3.18.93-gnu/fs/pipe.c
--- linux-libre-3.18.92-gnu/fs/pipe.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/fs/pipe.c	2018-01-31 08:46:16.000000000 -0500
@@ -1002,6 +1002,9 @@ static long pipe_set_size(struct pipe_in
 {
 	struct pipe_buffer *bufs;
 
+	if (!nr_pages)
+		return -EINVAL;
+
 	/*
 	 * We can shrink the pipe, if arg >= pipe->nrbufs. Since we don't
 	 * expect a lot of shrink+grow operations, just free and allocate
@@ -1046,13 +1049,19 @@ static long pipe_set_size(struct pipe_in
 
 /*
  * Currently we rely on the pipe array holding a power-of-2 number
- * of pages.
+ * of pages. Returns 0 on error.
  */
 static inline unsigned int round_pipe_size(unsigned int size)
 {
 	unsigned long nr_pages;
 
+	if (size < pipe_min_size)
+		size = pipe_min_size;
+
 	nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+	if (nr_pages == 0)
+		return 0;
+
 	return roundup_pow_of_two(nr_pages) << PAGE_SHIFT;
 }
 
@@ -1063,13 +1072,18 @@ static inline unsigned int round_pipe_si
 int pipe_proc_fn(struct ctl_table *table, int write, void __user *buf,
 		 size_t *lenp, loff_t *ppos)
 {
+	unsigned int rounded_pipe_max_size;
 	int ret;
 
 	ret = proc_dointvec_minmax(table, write, buf, lenp, ppos);
 	if (ret < 0 || !write)
 		return ret;
 
-	pipe_max_size = round_pipe_size(pipe_max_size);
+	rounded_pipe_max_size = round_pipe_size(pipe_max_size);
+	if (rounded_pipe_max_size == 0)
+		return -EINVAL;
+
+	pipe_max_size = rounded_pipe_max_size;
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/fs/reiserfs/bitmap.c linux-libre-3.18.93-gnu/fs/reiserfs/bitmap.c
--- linux-libre-3.18.92-gnu/fs/reiserfs/bitmap.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/fs/reiserfs/bitmap.c	2018-01-31 08:46:16.000000000 -0500
@@ -513,9 +513,17 @@ static void __discard_prealloc(struct re
 			       "inode has negative prealloc blocks count.");
 #endif
 	while (ei->i_prealloc_count > 0) {
-		reiserfs_free_prealloc_block(th, inode, ei->i_prealloc_block);
-		ei->i_prealloc_block++;
+		b_blocknr_t block_to_free;
+
+		/*
+		 * reiserfs_free_prealloc_block can drop the write lock,
+		 * which could allow another caller to free the same block.
+		 * We can protect against it by modifying the prealloc
+		 * state before calling it.
+		 */
+		block_to_free = ei->i_prealloc_block++;
 		ei->i_prealloc_count--;
+		reiserfs_free_prealloc_block(th, inode, block_to_free);
 		dirty = 1;
 	}
 	if (dirty)
@@ -1128,7 +1136,7 @@ static int determine_prealloc_size(reise
 	hint->prealloc_size = 0;
 
 	if (!hint->formatted_node && hint->preallocate) {
-		if (S_ISREG(hint->inode->i_mode)
+		if (S_ISREG(hint->inode->i_mode) && !IS_PRIVATE(hint->inode)
 		    && hint->inode->i_size >=
 		    REISERFS_SB(hint->th->t_super)->s_alloc_options.
 		    preallocmin * hint->inode->i_sb->s_blocksize)
diff -druNp --no-dereference linux-libre-3.18.92-gnu/include/linux/tcp.h linux-libre-3.18.93-gnu/include/linux/tcp.h
--- linux-libre-3.18.92-gnu/include/linux/tcp.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/include/linux/tcp.h	2018-01-31 08:46:16.000000000 -0500
@@ -29,9 +29,14 @@ static inline struct tcphdr *tcp_hdr(con
 	return (struct tcphdr *)skb_transport_header(skb);
 }
 
+static inline unsigned int __tcp_hdrlen(const struct tcphdr *th)
+{
+	return th->doff * 4;
+}
+
 static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
 {
-	return tcp_hdr(skb)->doff * 4;
+	return __tcp_hdrlen(tcp_hdr(skb));
 }
 
 static inline struct tcphdr *inner_tcp_hdr(const struct sk_buff *skb)
diff -druNp --no-dereference linux-libre-3.18.92-gnu/include/net/arp.h linux-libre-3.18.93-gnu/include/net/arp.h
--- linux-libre-3.18.92-gnu/include/net/arp.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/include/net/arp.h	2018-01-31 08:46:16.000000000 -0500
@@ -37,6 +37,9 @@ static inline struct neighbour *__ipv4_n
 {
 	struct neighbour *n;
 
+	if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
+		key = INADDR_ANY;
+
 	rcu_read_lock_bh();
 	n = __ipv4_neigh_lookup_noref(dev, key);
 	if (n && !atomic_inc_not_zero(&n->refcnt))
diff -druNp --no-dereference linux-libre-3.18.92-gnu/include/net/net_namespace.h linux-libre-3.18.93-gnu/include/net/net_namespace.h
--- linux-libre-3.18.92-gnu/include/net/net_namespace.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/include/net/net_namespace.h	2018-01-31 08:46:16.000000000 -0500
@@ -200,6 +200,11 @@ int net_eq(const struct net *net1, const
 	return net1 == net2;
 }
 
+static inline int check_net(const struct net *net)
+{
+	return atomic_read(&net->count) != 0;
+}
+
 void net_drop_ns(void *);
 
 #else
@@ -223,6 +228,11 @@ int net_eq(const struct net *net1, const
 {
 	return 1;
 }
+
+static inline int check_net(const struct net *net)
+{
+	return 1;
+}
 
 #define net_drop_ns NULL
 #endif
diff -druNp --no-dereference linux-libre-3.18.92-gnu/include/scsi/sg.h linux-libre-3.18.93-gnu/include/scsi/sg.h
--- linux-libre-3.18.92-gnu/include/scsi/sg.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/include/scsi/sg.h	2018-01-31 08:46:16.000000000 -0500
@@ -194,7 +194,6 @@ typedef struct sg_req_info { /* used by
 #define SG_DEFAULT_RETRIES 0
 
 /* Defaults, commented if they differ from original sg driver */
-#define SG_DEF_FORCE_LOW_DMA 0  /* was 1 -> memory below 16MB on i386 */
 #define SG_DEF_FORCE_PACK_ID 0
 #define SG_DEF_KEEP_ORPHAN 0
 #define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ /* load time option */
diff -druNp --no-dereference linux-libre-3.18.92-gnu/include/uapi/linux/eventpoll.h linux-libre-3.18.93-gnu/include/uapi/linux/eventpoll.h
--- linux-libre-3.18.92-gnu/include/uapi/linux/eventpoll.h	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/include/uapi/linux/eventpoll.h	2018-01-31 08:46:16.000000000 -0500
@@ -26,6 +26,19 @@
 #define EPOLL_CTL_DEL 2
 #define EPOLL_CTL_MOD 3
 
+/* Epoll event masks */
+#define EPOLLIN		0x00000001
+#define EPOLLPRI	0x00000002
+#define EPOLLOUT	0x00000004
+#define EPOLLERR	0x00000008
+#define EPOLLHUP	0x00000010
+#define EPOLLRDNORM	0x00000040
+#define EPOLLRDBAND	0x00000080
+#define EPOLLWRNORM	0x00000100
+#define EPOLLWRBAND	0x00000200
+#define EPOLLMSG	0x00000400
+#define EPOLLRDHUP	0x00002000
+
 /*
  * Request the handling of system wakeup events so as to prevent system suspends
  * from happening while those events are being processed.
diff -druNp --no-dereference linux-libre-3.18.92-gnu/ipc/msg.c linux-libre-3.18.93-gnu/ipc/msg.c
--- linux-libre-3.18.92-gnu/ipc/msg.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/ipc/msg.c	2018-01-31 08:46:16.000000000 -0500
@@ -740,7 +740,10 @@ static inline int convert_mode(long *msg
 	if (*msgtyp == 0)
 		return SEARCH_ANY;
 	if (*msgtyp < 0) {
-		*msgtyp = -*msgtyp;
+		if (*msgtyp == LONG_MIN) /* -LONG_MIN is undefined */
+			*msgtyp = LONG_MAX;
+		else
+			*msgtyp = -*msgtyp;
 		return SEARCH_LESSEQUAL;
 	}
 	if (msgflg & MSG_EXCEPT)
diff -druNp --no-dereference linux-libre-3.18.92-gnu/kernel/futex.c linux-libre-3.18.93-gnu/kernel/futex.c
--- linux-libre-3.18.92-gnu/kernel/futex.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/kernel/futex.c	2018-01-31 08:46:16.000000000 -0500
@@ -1514,6 +1514,9 @@ static int futex_requeue(u32 __user *uad
 	struct futex_hash_bucket *hb1, *hb2;
 	struct futex_q *this, *next;
 
+	if (nr_wake < 0 || nr_requeue < 0)
+		return -EINVAL;
+
 	if (requeue_pi) {
 		/*
 		 * Requeue PI only works on two distinct uaddrs. This
diff -druNp --no-dereference linux-libre-3.18.92-gnu/kernel/gcov/Kconfig linux-libre-3.18.93-gnu/kernel/gcov/Kconfig
--- linux-libre-3.18.92-gnu/kernel/gcov/Kconfig	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/kernel/gcov/Kconfig	2018-01-31 08:46:16.000000000 -0500
@@ -34,6 +34,7 @@ config GCOV_KERNEL
 
 config GCOV_PROFILE_ALL
 	bool "Profile entire Kernel"
+	depends on !COMPILE_TEST
 	depends on GCOV_KERNEL
 	depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM || ARM64
 	default n
diff -druNp --no-dereference linux-libre-3.18.92-gnu/kernel/time/hrtimer.c linux-libre-3.18.93-gnu/kernel/time/hrtimer.c
--- linux-libre-3.18.92-gnu/kernel/time/hrtimer.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/kernel/time/hrtimer.c	2018-01-31 08:46:16.000000000 -0500
@@ -612,6 +612,7 @@ static int hrtimer_reprogram(struct hrti
 static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base)
 {
 	base->expires_next.tv64 = KTIME_MAX;
+	base->hang_detected = 0;
 	base->hres_active = 0;
 }
 
@@ -1632,6 +1633,7 @@ static void init_hrtimers_cpu(int cpu)
 		timerqueue_init_head(&cpu_base->clock_base[i].active);
 	}
 
+	cpu_base->active_bases = 0;
 	cpu_base->cpu = cpu;
 	hrtimer_init_hres(cpu_base);
 }
diff -druNp --no-dereference linux-libre-3.18.92-gnu/Makefile linux-libre-3.18.93-gnu/Makefile
--- linux-libre-3.18.92-gnu/Makefile	2018-01-17 18:24:04.000000000 -0500
+++ linux-libre-3.18.93-gnu/Makefile	2018-01-31 10:16:23.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 92
+SUBLEVEL = 93
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/mm/memcontrol.c linux-libre-3.18.93-gnu/mm/memcontrol.c
--- linux-libre-3.18.92-gnu/mm/memcontrol.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/mm/memcontrol.c	2018-01-31 08:46:16.000000000 -0500
@@ -6500,7 +6500,7 @@ static void uncharge_list(struct list_he
 		next = page->lru.next;
 
 		VM_BUG_ON_PAGE(PageLRU(page), page);
-		VM_BUG_ON_PAGE(page_count(page), page);
+		VM_BUG_ON_PAGE(!PageHWPoison(page) && page_count(page), page);
 
 		pc = lookup_page_cgroup(page);
 		if (!PageCgroupUsed(pc))
diff -druNp --no-dereference linux-libre-3.18.92-gnu/mm/memory-failure.c linux-libre-3.18.93-gnu/mm/memory-failure.c
--- linux-libre-3.18.92-gnu/mm/memory-failure.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/mm/memory-failure.c	2018-01-31 08:46:16.000000000 -0500
@@ -548,6 +548,13 @@ static int delete_from_lru_cache(struct
 		 */
 		ClearPageActive(p);
 		ClearPageUnevictable(p);
+
+		/*
+		 * Poisoned page might never drop its ref count to 0 so we have
+		 * to uncharge it manually from its memcg.
+		 */
+		mem_cgroup_uncharge(p);
+
 		/*
 		 * drop the page count elevated by isolate_lru_page()
 		 */
diff -druNp --no-dereference linux-libre-3.18.92-gnu/mm/mmap.c linux-libre-3.18.93-gnu/mm/mmap.c
--- linux-libre-3.18.92-gnu/mm/mmap.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/mm/mmap.c	2018-01-31 08:46:16.000000000 -0500
@@ -2191,7 +2191,8 @@ int expand_upwards(struct vm_area_struct
 		gap_addr = TASK_SIZE;
 
 	next = vma->vm_next;
-	if (next && next->vm_start < gap_addr) {
+	if (next && next->vm_start < gap_addr &&
+			(next->vm_flags & (VM_WRITE|VM_READ|VM_EXEC))) {
 		if (!(next->vm_flags & VM_GROWSUP))
 			return -ENOMEM;
 		/* Check that both stack segments have the same anon_vma? */
@@ -2271,7 +2272,8 @@ int expand_downwards(struct vm_area_stru
 	if (gap_addr > address)
 		return -ENOMEM;
 	prev = vma->vm_prev;
-	if (prev && prev->vm_end > gap_addr) {
+	if (prev && prev->vm_end > gap_addr &&
+			(prev->vm_flags & (VM_WRITE|VM_READ|VM_EXEC))) {
 		if (!(prev->vm_flags & VM_GROWSDOWN))
 			return -ENOMEM;
 		/* Check that both stack segments have the same anon_vma? */
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/can/af_can.c linux-libre-3.18.93-gnu/net/can/af_can.c
--- linux-libre-3.18.92-gnu/net/can/af_can.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/can/af_can.c	2018-01-31 08:46:16.000000000 -0500
@@ -719,13 +719,12 @@ static int can_rcv(struct sk_buff *skb,
 	if (unlikely(!net_eq(dev_net(dev), &init_net)))
 		goto drop;
 
-	if (WARN_ONCE(dev->type != ARPHRD_CAN ||
-		      skb->len != CAN_MTU ||
-		      cfd->len > CAN_MAX_DLEN,
-		      "PF_CAN: dropped non conform CAN skbuf: "
-		      "dev type %d, len %d, datalen %d\n",
-		      dev->type, skb->len, cfd->len))
+	if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU ||
+		     cfd->len > CAN_MAX_DLEN)) {
+		pr_warn_once("PF_CAN: dropped non conform CAN skbuf: dev type %d, len %d, datalen %d\n",
+			     dev->type, skb->len, cfd->len);
 		goto drop;
+	}
 
 	can_receive(skb, dev);
 	return NET_RX_SUCCESS;
@@ -743,13 +742,12 @@ static int canfd_rcv(struct sk_buff *skb
 	if (unlikely(!net_eq(dev_net(dev), &init_net)))
 		goto drop;
 
-	if (WARN_ONCE(dev->type != ARPHRD_CAN ||
-		      skb->len != CANFD_MTU ||
-		      cfd->len > CANFD_MAX_DLEN,
-		      "PF_CAN: dropped non conform CAN FD skbuf: "
-		      "dev type %d, len %d, datalen %d\n",
-		      dev->type, skb->len, cfd->len))
+	if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU ||
+		     cfd->len > CANFD_MAX_DLEN)) {
+		pr_warn_once("PF_CAN: dropped non conform CAN FD skbuf: dev type %d, len %d, datalen %d\n",
+			     dev->type, skb->len, cfd->len);
 		goto drop;
+	}
 
 	can_receive(skb, dev);
 	return NET_RX_SUCCESS;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/core/dev.c linux-libre-3.18.93-gnu/net/core/dev.c
--- linux-libre-3.18.92-gnu/net/core/dev.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/core/dev.c	2018-01-31 08:46:16.000000000 -0500
@@ -2772,10 +2772,21 @@ static void qdisc_pkt_len_init(struct sk
 		hdr_len = skb_transport_header(skb) - skb_mac_header(skb);
 
 		/* + transport layer */
-		if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
-			hdr_len += tcp_hdrlen(skb);
-		else
-			hdr_len += sizeof(struct udphdr);
+		if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) {
+			const struct tcphdr *th;
+			struct tcphdr _tcphdr;
+
+			th = skb_header_pointer(skb, skb_transport_offset(skb),
+						sizeof(_tcphdr), &_tcphdr);
+			if (likely(th))
+				hdr_len += __tcp_hdrlen(th);
+		} else {
+			struct udphdr _udphdr;
+
+			if (skb_header_pointer(skb, skb_transport_offset(skb),
+					       sizeof(_udphdr), &_udphdr))
+				hdr_len += sizeof(struct udphdr);
+		}
 
 		if (shinfo->gso_type & SKB_GSO_DODGY)
 			gso_segs = DIV_ROUND_UP(skb->len - hdr_len,
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/core/neighbour.c linux-libre-3.18.93-gnu/net/core/neighbour.c
--- linux-libre-3.18.92-gnu/net/core/neighbour.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/core/neighbour.c	2018-01-31 08:46:16.000000000 -0500
@@ -508,7 +508,7 @@ struct neighbour *__neigh_create(struct
 	if (atomic_read(&tbl->entries) > (1 << nht->hash_shift))
 		nht = neigh_hash_grow(tbl, nht->hash_shift + 1);
 
-	hash_val = tbl->hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
+	hash_val = tbl->hash(n->primary_key, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
 
 	if (n->parms->dead) {
 		rc = ERR_PTR(-EINVAL);
@@ -520,7 +520,7 @@ struct neighbour *__neigh_create(struct
 	     n1 != NULL;
 	     n1 = rcu_dereference_protected(n1->next,
 			lockdep_is_held(&tbl->lock))) {
-		if (dev == n1->dev && !memcmp(n1->primary_key, pkey, key_len)) {
+		if (dev == n1->dev && !memcmp(n1->primary_key, n->primary_key, key_len)) {
 			if (want_ref)
 				neigh_hold(n1);
 			rc = n1;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/dccp/ccids/ccid2.c linux-libre-3.18.93-gnu/net/dccp/ccids/ccid2.c
--- linux-libre-3.18.92-gnu/net/dccp/ccids/ccid2.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/dccp/ccids/ccid2.c	2018-01-31 08:46:16.000000000 -0500
@@ -140,6 +140,9 @@ static void ccid2_hc_tx_rto_expire(unsig
 
 	ccid2_pr_debug("RTO_EXPIRE\n");
 
+	if (sk->sk_state == DCCP_CLOSED)
+		goto out;
+
 	/* back-off timer */
 	hc->tx_rto <<= 1;
 	if (hc->tx_rto > DCCP_RTO_MAX)
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/ipv4/arp.c linux-libre-3.18.93-gnu/net/ipv4/arp.c
--- linux-libre-3.18.92-gnu/net/ipv4/arp.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/ipv4/arp.c	2018-01-31 08:46:16.000000000 -0500
@@ -221,11 +221,16 @@ static u32 arp_hash(const void *pkey,
 
 static int arp_constructor(struct neighbour *neigh)
 {
-	__be32 addr = *(__be32 *)neigh->primary_key;
+	__be32 addr;
 	struct net_device *dev = neigh->dev;
 	struct in_device *in_dev;
 	struct neigh_parms *parms;
+	u32 inaddr_any = INADDR_ANY;
 
+	if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
+		memcpy(neigh->primary_key, &inaddr_any, arp_tbl.key_len);
+
+	addr = *(__be32 *)neigh->primary_key;
 	rcu_read_lock();
 	in_dev = __in_dev_get_rcu(dev);
 	if (in_dev == NULL) {
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/ipv4/igmp.c linux-libre-3.18.93-gnu/net/ipv4/igmp.c
--- linux-libre-3.18.92-gnu/net/ipv4/igmp.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/ipv4/igmp.c	2018-01-31 08:46:16.000000000 -0500
@@ -329,7 +329,7 @@ static __be32 igmpv3_get_srcaddr(struct
 		return htonl(INADDR_ANY);
 
 	for_ifa(in_dev) {
-		if (inet_ifa_match(fl4->saddr, ifa))
+		if (fl4->saddr == ifa->ifa_local)
 			return fl4->saddr;
 	} endfor_ifa(in_dev);
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/ipv4/tcp.c linux-libre-3.18.93-gnu/net/ipv4/tcp.c
--- linux-libre-3.18.92-gnu/net/ipv4/tcp.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/ipv4/tcp.c	2018-01-31 08:46:16.000000000 -0500
@@ -2182,6 +2182,9 @@ adjudge_to_death:
 			tcp_send_active_reset(sk, GFP_ATOMIC);
 			NET_INC_STATS_BH(sock_net(sk),
 					LINUX_MIB_TCPABORTONMEMORY);
+		} else if (!check_net(sock_net(sk))) {
+			/* Not possible to send reset; just close */
+			tcp_set_state(sk, TCP_CLOSE);
 		}
 	}
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/ipv4/tcp_timer.c linux-libre-3.18.93-gnu/net/ipv4/tcp_timer.c
--- linux-libre-3.18.92-gnu/net/ipv4/tcp_timer.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/ipv4/tcp_timer.c	2018-01-31 08:46:16.000000000 -0500
@@ -46,11 +46,19 @@ static void tcp_write_err(struct sock *s
  * to prevent DoS attacks. It is called when a retransmission timeout
  * or zero probe timeout occurs on orphaned socket.
  *
+ * Also close if our net namespace is exiting; in that case there is no
+ * hope of ever communicating again since all netns interfaces are already
+ * down (or about to be down), and we need to release our dst references,
+ * which have been moved to the netns loopback interface, so the namespace
+ * can finish exiting.  This condition is only possible if we are a kernel
+ * socket, as those do not hold references to the namespace.
+ *
  * Criteria is still not confirmed experimentally and may change.
  * We kill the socket, if:
  * 1. If number of orphaned sockets exceeds an administratively configured
  *    limit.
  * 2. If we have strong memory pressure.
+ * 3. If our net namespace is exiting.
  */
 static int tcp_out_of_resources(struct sock *sk, bool do_reset)
 {
@@ -79,6 +87,13 @@ static int tcp_out_of_resources(struct s
 		NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPABORTONMEMORY);
 		return 1;
 	}
+
+	if (!check_net(sock_net(sk))) {
+		/* Not possible to send reset; just close */
+		tcp_done(sk);
+		return 1;
+	}
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/ipv6/ip6_output.c linux-libre-3.18.93-gnu/net/ipv6/ip6_output.c
--- linux-libre-3.18.92-gnu/net/ipv6/ip6_output.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/ipv6/ip6_output.c	2018-01-31 08:46:16.000000000 -0500
@@ -1214,14 +1214,16 @@ int ip6_append_data(struct sock *sk, int
 		np->cork.tclass = tclass;
 		if (rt->dst.flags & DST_XFRM_TUNNEL)
 			mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
-			      rt->dst.dev->mtu : dst_mtu(&rt->dst);
+			      READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
 		else
 			mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
-			      rt->dst.dev->mtu : dst_mtu(rt->dst.path);
+			      READ_ONCE(rt->dst.dev->mtu) : dst_mtu(rt->dst.path);
 		if (np->frag_size < mtu) {
 			if (np->frag_size)
 				mtu = np->frag_size;
 		}
+		if (mtu < IPV6_MIN_MTU)
+			return -EINVAL;
 		cork->fragsize = mtu;
 		if (dst_allfrag(rt->dst.path))
 			cork->flags |= IPCORK_ALLFRAG;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/key/af_key.c linux-libre-3.18.93-gnu/net/key/af_key.c
--- linux-libre-3.18.92-gnu/net/key/af_key.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/key/af_key.c	2018-01-31 08:46:16.000000000 -0500
@@ -401,6 +401,11 @@ static int verify_address_len(const void
 #endif
 	int len;
 
+	if (sp->sadb_address_len <
+	    DIV_ROUND_UP(sizeof(*sp) + offsetofend(typeof(*addr), sa_family),
+			 sizeof(uint64_t)))
+		return -EINVAL;
+
 	switch (addr->sa_family) {
 	case AF_INET:
 		len = DIV_ROUND_UP(sizeof(*sp) + sizeof(*sin), sizeof(uint64_t));
@@ -511,6 +516,9 @@ static int parse_exthdrs(struct sk_buff
 		uint16_t ext_type;
 		int ext_len;
 
+		if (len < sizeof(*ehdr))
+			return -EINVAL;
+
 		ext_len  = ehdr->sadb_ext_len;
 		ext_len *= sizeof(uint64_t);
 		ext_type = ehdr->sadb_ext_type;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_core.c linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_core.c
--- linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_core.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_core.c	2018-01-31 08:46:16.000000000 -0500
@@ -695,6 +695,7 @@ nf_conntrack_tuple_taken(const struct nf
 	 * least once for the stats anyway.
 	 */
 	rcu_read_lock_bh();
+ begin:
 	hlist_nulls_for_each_entry_rcu(h, n, &net->ct.hash[hash], hnnode) {
 		ct = nf_ct_tuplehash_to_ctrack(h);
 		if (ct != ignored_conntrack &&
@@ -706,6 +707,12 @@ nf_conntrack_tuple_taken(const struct nf
 		}
 		NF_CT_STAT_INC(net, searched);
 	}
+
+	if (get_nulls_value(n) != hash) {
+		NF_CT_STAT_INC(net, search_restart);
+		goto begin;
+	}
+
 	rcu_read_unlock_bh();
 
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_expect.c linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_expect.c
--- linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_expect.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_expect.c	2018-01-31 08:46:16.000000000 -0500
@@ -557,7 +557,7 @@ static int exp_seq_show(struct seq_file
 	helper = rcu_dereference(nfct_help(expect->master)->helper);
 	if (helper) {
 		seq_printf(s, "%s%s", expect->flags ? " " : "", helper->name);
-		if (helper->expect_policy[expect->class].name)
+		if (helper->expect_policy[expect->class].name[0])
 			seq_printf(s, "/%s",
 				   helper->expect_policy[expect->class].name);
 	}
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_sip.c linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_sip.c
--- linux-libre-3.18.92-gnu/net/netfilter/nf_conntrack_sip.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/netfilter/nf_conntrack_sip.c	2018-01-31 08:46:16.000000000 -0500
@@ -1434,9 +1434,12 @@ static int process_sip_request(struct sk
 		handler = &sip_handlers[i];
 		if (handler->request == NULL)
 			continue;
-		if (*datalen < handler->len ||
+		if (*datalen < handler->len + 2 ||
 		    strncasecmp(*dptr, handler->method, handler->len))
 			continue;
+		if ((*dptr)[handler->len] != ' ' ||
+		    !isalpha((*dptr)[handler->len+1]))
+			continue;
 
 		if (ct_sip_get_header(ct, *dptr, 0, *datalen, SIP_HDR_CSEQ,
 				      &matchoff, &matchlen) <= 0) {
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/netfilter/nfnetlink_cthelper.c linux-libre-3.18.93-gnu/net/netfilter/nfnetlink_cthelper.c
--- linux-libre-3.18.92-gnu/net/netfilter/nfnetlink_cthelper.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/netfilter/nfnetlink_cthelper.c	2018-01-31 08:46:16.000000000 -0500
@@ -17,6 +17,7 @@
 #include <linux/types.h>
 #include <linux/list.h>
 #include <linux/errno.h>
+#include <linux/capability.h>
 #include <net/netlink.h>
 #include <net/sock.h>
 
@@ -392,6 +393,9 @@ nfnl_cthelper_new(struct sock *nfnl, str
 	struct nfnl_cthelper *nlcth;
 	int ret = 0;
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 	if (!tb[NFCTH_NAME] || !tb[NFCTH_TUPLE])
 		return -EINVAL;
 
@@ -595,6 +599,9 @@ nfnl_cthelper_get(struct sock *nfnl, str
 	struct nfnl_cthelper *nlcth;
 	bool tuple_set = false;
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 	if (nlh->nlmsg_flags & NLM_F_DUMP) {
 		struct netlink_dump_control c = {
 			.dump = nfnl_cthelper_dump_table,
@@ -661,6 +668,9 @@ nfnl_cthelper_del(struct sock *nfnl, str
 	struct nfnl_cthelper *nlcth, *n;
 	int j = 0, ret;
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 	if (tb[NFCTH_NAME])
 		helper_name = nla_data(tb[NFCTH_NAME]);
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/netfilter/xt_osf.c linux-libre-3.18.93-gnu/net/netfilter/xt_osf.c
--- linux-libre-3.18.92-gnu/net/netfilter/xt_osf.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/netfilter/xt_osf.c	2018-01-31 08:46:16.000000000 -0500
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 
+#include <linux/capability.h>
 #include <linux/if.h>
 #include <linux/inetdevice.h>
 #include <linux/ip.h>
@@ -69,6 +70,9 @@ static int xt_osf_add_callback(struct so
 	struct xt_osf_finger *kf = NULL, *sf;
 	int err = 0;
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 	if (!osf_attrs[OSF_ATTR_FINGER])
 		return -EINVAL;
 
@@ -112,6 +116,9 @@ static int xt_osf_remove_callback(struct
 	struct xt_osf_finger *sf;
 	int err = -ENOENT;
 
+	if (!capable(CAP_NET_ADMIN))
+		return -EPERM;
+
 	if (!osf_attrs[OSF_ATTR_FINGER])
 		return -EINVAL;
 
diff -druNp --no-dereference linux-libre-3.18.92-gnu/net/sctp/socket.c linux-libre-3.18.93-gnu/net/sctp/socket.c
--- linux-libre-3.18.92-gnu/net/sctp/socket.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/net/sctp/socket.c	2018-01-31 08:46:16.000000000 -0500
@@ -83,7 +83,7 @@
 static int sctp_writeable(struct sock *sk);
 static void sctp_wfree(struct sk_buff *skb);
 static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p,
-				size_t msg_len, struct sock **orig_sk);
+				size_t msg_len);
 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);
@@ -333,16 +333,14 @@ static struct sctp_af *sctp_sockaddr_af(
 	if (len < sizeof (struct sockaddr))
 		return NULL;
 
+	if (!opt->pf->af_supported(addr->sa.sa_family, opt))
+		return NULL;
+
 	/* V4 mapped address are really of AF_INET family */
 	if (addr->sa.sa_family == AF_INET6 &&
-	    ipv6_addr_v4mapped(&addr->v6.sin6_addr)) {
-		if (!opt->pf->af_supported(AF_INET, opt))
-			return NULL;
-	} else {
-		/* Does this PF support this AF? */
-		if (!opt->pf->af_supported(addr->sa.sa_family, opt))
-			return NULL;
-	}
+	    ipv6_addr_v4mapped(&addr->v6.sin6_addr) &&
+	    !opt->pf->af_supported(AF_INET, opt))
+		return NULL;
 
 	/* If we get this far, af is valid. */
 	af = sctp_get_af_specific(addr->sa.sa_family);
@@ -1950,7 +1948,7 @@ static int sctp_sendmsg(struct kiocb *io
 	timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
 	if (!sctp_wspace(asoc)) {
 		/* sk can be changed by peel off when waiting for buf. */
-		err = sctp_wait_for_sndbuf(asoc, &timeo, msg_len, &sk);
+		err = sctp_wait_for_sndbuf(asoc, &timeo, msg_len);
 		if (err) {
 			if (err == -ESRCH) {
 				/* asoc is already dead. */
@@ -6983,12 +6981,12 @@ 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, struct sock **orig_sk)
+				size_t msg_len)
 {
 	struct sock *sk = asoc->base.sk;
-	int err = 0;
 	long current_timeo = *timeo_p;
 	DEFINE_WAIT(wait);
+	int err = 0;
 
 	pr_debug("%s: asoc:%p, timeo:%ld, msg_len:%zu\n", __func__, asoc,
 		 *timeo_p, msg_len);
@@ -7017,17 +7015,13 @@ 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);
-		}
+		if (sk != asoc->base.sk)
+			goto do_error;
 
 		*timeo_p = current_timeo;
 	}
 
 out:
-	*orig_sk = sk;
 	finish_wait(&asoc->wait, &wait);
 
 	/* Release the association's refcnt.  */
diff -druNp --no-dereference linux-libre-3.18.92-gnu/sound/core/pcm_lib.c linux-libre-3.18.93-gnu/sound/core/pcm_lib.c
--- linux-libre-3.18.92-gnu/sound/core/pcm_lib.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/sound/core/pcm_lib.c	2018-01-31 08:46:16.000000000 -0500
@@ -644,7 +644,6 @@ static inline unsigned int muldiv32(unsi
 {
 	u_int64_t n = (u_int64_t) a * b;
 	if (c == 0) {
-		snd_BUG_ON(!n);
 		*r = 0;
 		return UINT_MAX;
 	}
diff -druNp --no-dereference linux-libre-3.18.92-gnu/sound/pci/hda/patch_cirrus.c linux-libre-3.18.93-gnu/sound/pci/hda/patch_cirrus.c
--- linux-libre-3.18.92-gnu/sound/pci/hda/patch_cirrus.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/sound/pci/hda/patch_cirrus.c	2018-01-31 08:46:16.000000000 -0500
@@ -394,6 +394,7 @@ static const struct snd_pci_quirk cs420x
 	/*SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),*/
 
 	/* codec SSID */
+	SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
 	SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
 	SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
 	SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
diff -druNp --no-dereference linux-libre-3.18.92-gnu/tools/usb/usbip/src/usbip.c linux-libre-3.18.93-gnu/tools/usb/usbip/src/usbip.c
--- linux-libre-3.18.92-gnu/tools/usb/usbip/src/usbip.c	2018-01-17 03:29:32.000000000 -0500
+++ linux-libre-3.18.93-gnu/tools/usb/usbip/src/usbip.c	2018-01-31 08:46:16.000000000 -0500
@@ -176,6 +176,8 @@ int main(int argc, char *argv[])
 			break;
 		case '?':
 			printf("usbip: invalid option\n");
+			/* Terminate after printing error */
+			/* FALLTHRU */
 		default:
 			usbip_usage();
 			goto out;
