diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/am335x-pepper.dts linux-libre-3.18.101-gnu/arch/arm/boot/dts/am335x-pepper.dts
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/am335x-pepper.dts	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/am335x-pepper.dts	2018-03-22 04:37:18.000000000 -0400
@@ -138,7 +138,7 @@
 &audio_codec {
 	status = "okay";
 
-	gpio-reset = <&gpio1 16 GPIO_ACTIVE_LOW>;
+	reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
 	AVDD-supply = <&ldo3_reg>;
 	IOVDD-supply = <&ldo3_reg>;
 	DRVDD-supply = <&ldo3_reg>;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/moxart.dtsi linux-libre-3.18.101-gnu/arch/arm/boot/dts/moxart.dtsi
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/moxart.dtsi	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/moxart.dtsi	2018-03-22 04:37:18.000000000 -0400
@@ -6,6 +6,7 @@
  */
 
 /include/ "skeleton.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
 	compatible = "moxa,moxart";
@@ -36,8 +37,8 @@
 		ranges;
 
 		intc: interrupt-controller@98800000 {
-			compatible = "moxa,moxart-ic";
-			reg = <0x98800000 0x38>;
+			compatible = "moxa,moxart-ic", "faraday,ftintc010";
+			reg = <0x98800000 0x100>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
 			interrupt-mask = <0x00080000>;
@@ -59,7 +60,7 @@
 		timer: timer@98400000 {
 			compatible = "moxa,moxart-timer";
 			reg = <0x98400000 0x42>;
-			interrupts = <19 1>;
+			interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
 			clocks = <&clk_apb>;
 		};
 
@@ -80,7 +81,7 @@
 		dma: dma@90500000 {
 			compatible = "moxa,moxart-dma";
 			reg = <0x90500080 0x40>;
-			interrupts = <24 0>;
+			interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
 			#dma-cells = <1>;
 		};
 
@@ -93,7 +94,7 @@
 		sdhci: sdhci@98e00000 {
 			compatible = "moxa,moxart-sdhci";
 			reg = <0x98e00000 0x5C>;
-			interrupts = <5 0>;
+			interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clk_apb>;
 			dmas =  <&dma 5>,
 				<&dma 5>;
@@ -120,7 +121,7 @@
 		mac0: mac@90900000 {
 			compatible = "moxa,moxart-mac";
 			reg = <0x90900000 0x90>;
-			interrupts = <25 0>;
+			interrupts = <25 IRQ_TYPE_LEVEL_HIGH>;
 			phy-handle = <&ethphy0>;
 			phy-mode = "mii";
 			status = "disabled";
@@ -129,7 +130,7 @@
 		mac1: mac@92000000 {
 			compatible = "moxa,moxart-mac";
 			reg = <0x92000000 0x90>;
-			interrupts = <27 0>;
+			interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;
 			phy-handle = <&ethphy1>;
 			phy-mode = "mii";
 			status = "disabled";
@@ -138,7 +139,7 @@
 		uart0: uart@98200000 {
 			compatible = "ns16550a";
 			reg = <0x98200000 0x20>;
-			interrupts = <31 8>;
+			interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clock-frequency = <14745600>;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/moxart-uc7112lx.dts linux-libre-3.18.101-gnu/arch/arm/boot/dts/moxart-uc7112lx.dts
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/moxart-uc7112lx.dts	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/moxart-uc7112lx.dts	2018-03-22 04:37:18.000000000 -0400
@@ -6,7 +6,7 @@
  */
 
 /dts-v1/;
-/include/ "moxart.dtsi"
+#include "moxart.dtsi"
 
 / {
 	model = "MOXA UC-7112-LX";
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/omap3-n900.dts linux-libre-3.18.101-gnu/arch/arm/boot/dts/omap3-n900.dts
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/omap3-n900.dts	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/omap3-n900.dts	2018-03-22 04:37:18.000000000 -0400
@@ -435,7 +435,7 @@
 	tlv320aic3x: tlv320aic3x@18 {
 		compatible = "ti,tlv320aic3x";
 		reg = <0x18>;
-		gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
+		reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */
 		ai3x-gpio-func = <
 			0 /* AIC3X_GPIO1_FUNC_DISABLED */
 			5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
@@ -452,7 +452,7 @@
 	tlv320aic3x_aux: tlv320aic3x@19 {
 		compatible = "ti,tlv320aic3x";
 		reg = <0x19>;
-		gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
+		reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */
 
 		AVDD-supply = <&vmmc2>;
 		DRVDD-supply = <&vmmc2>;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/r8a7790.dtsi linux-libre-3.18.101-gnu/arch/arm/boot/dts/r8a7790.dtsi
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/r8a7790.dtsi	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/r8a7790.dtsi	2018-03-22 04:37:18.000000000 -0400
@@ -978,8 +978,11 @@
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
 			clocks = <&p_clk>,
-				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
 				<&p_clk>,
 				<&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
 				<&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/arm/boot/dts/r8a7791.dtsi linux-libre-3.18.101-gnu/arch/arm/boot/dts/r8a7791.dtsi
--- linux-libre-3.18.100-gnu/arch/arm/boot/dts/r8a7791.dtsi	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/arm/boot/dts/r8a7791.dtsi	2018-03-22 04:37:18.000000000 -0400
@@ -1001,8 +1001,11 @@
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
 			clocks = <&p_clk>,
-				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-				<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
+				<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
 				<&p_clk>,
 				<&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
 				<&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/mips/net/bpf_jit.c linux-libre-3.18.101-gnu/arch/mips/net/bpf_jit.c
--- linux-libre-3.18.100-gnu/arch/mips/net/bpf_jit.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/mips/net/bpf_jit.c	2018-03-22 04:37:18.000000000 -0400
@@ -562,7 +562,8 @@ static void save_bpf_jit_regs(struct jit
 	u32 sflags, tmp_flags;
 
 	/* Adjust the stack pointer */
-	emit_stack_offset(-align_sp(offset), ctx);
+	if (offset)
+		emit_stack_offset(-align_sp(offset), ctx);
 
 	if (ctx->flags & SEEN_CALL) {
 		/* Argument save area */
@@ -641,7 +642,8 @@ static void restore_bpf_jit_regs(struct
 		emit_load_stack_reg(r_ra, r_sp, real_off, ctx);
 
 	/* Restore the sp and discard the scrach memory */
-	emit_stack_offset(align_sp(offset), ctx);
+	if (offset)
+		emit_stack_offset(align_sp(offset), ctx);
 }
 
 static unsigned int get_stack_depth(struct jit_ctx *ctx)
@@ -689,8 +691,14 @@ static void build_prologue(struct jit_ct
 	if (ctx->flags & SEEN_X)
 		emit_jit_reg_move(r_X, r_zero, ctx);
 
-	/* Do not leak kernel data to userspace */
-	if (bpf_needs_clear_a(&ctx->skf->insns[0]))
+	/*
+	 * Do not leak kernel data to userspace, we only need to clear
+	 * r_A if it is ever used.  In fact if it is never used, we
+	 * will not save/restore it, so clearing it in this case would
+	 * corrupt the state of the caller.
+	 */
+	if (bpf_needs_clear_a(&ctx->skf->insns[0]) &&
+	    (ctx->flags & SEEN_A))
 		emit_jit_reg_move(r_A, r_zero, ctx);
 }
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/powerpc/mm/fault.c linux-libre-3.18.101-gnu/arch/powerpc/mm/fault.c
--- linux-libre-3.18.100-gnu/arch/powerpc/mm/fault.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/powerpc/mm/fault.c	2018-03-22 04:37:18.000000000 -0400
@@ -294,7 +294,7 @@ int __kprobes do_page_fault(struct pt_re
 	 * can result in fault, which will cause a deadlock when called with
 	 * mmap_sem held
 	 */
-	if (user_mode(regs))
+	if (!is_exec && user_mode(regs))
 		store_update_sp = store_updates_sp(regs);
 
 	if (user_mode(regs))
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/x86/kernel/kprobes/core.c linux-libre-3.18.101-gnu/arch/x86/kernel/kprobes/core.c
--- linux-libre-3.18.100-gnu/arch/x86/kernel/kprobes/core.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/x86/kernel/kprobes/core.c	2018-03-22 04:37:18.000000000 -0400
@@ -196,6 +196,8 @@ retry:
 		return (opcode != 0x62 && opcode != 0x67);
 	case 0x70:
 		return 0; /* can't boost conditional jump */
+	case 0x90:
+		return opcode != 0x9a;	/* can't boost call far */
 	case 0xc0:
 		/* can't boost software-interruptions */
 		return (0xc1 < opcode && opcode < 0xcc) || opcode == 0xcf;
@@ -376,6 +378,8 @@ static int arch_copy_kprobe(struct kprob
 {
 	int ret;
 
+	set_memory_rw((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
+
 	/* Copy an instruction with recovering if other optprobe modifies it.*/
 	ret = __copy_instruction(p->ainsn.insn, p->addr);
 	if (!ret)
@@ -390,6 +394,8 @@ static int arch_copy_kprobe(struct kprob
 	else
 		p->ainsn.boostable = -1;
 
+	set_memory_ro((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
+
 	/* Check whether the instruction modifies Interrupt Flag or not */
 	p->ainsn.if_modifier = is_IF_modifier(p->ainsn.insn);
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/arch/x86/kernel/kprobes/opt.c linux-libre-3.18.101-gnu/arch/x86/kernel/kprobes/opt.c
--- linux-libre-3.18.100-gnu/arch/x86/kernel/kprobes/opt.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/arch/x86/kernel/kprobes/opt.c	2018-03-22 04:37:18.000000000 -0400
@@ -344,6 +344,7 @@ int arch_prepare_optimized_kprobe(struct
 	}
 
 	buf = (u8 *)op->optinsn.insn;
+	set_memory_rw((unsigned long)buf & PAGE_MASK, 1);
 
 	/* Copy instructions into the out-of-line buffer */
 	ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr);
@@ -366,6 +367,8 @@ int arch_prepare_optimized_kprobe(struct
 	synthesize_reljump(buf + TMPL_END_IDX + op->optinsn.size,
 			   (u8 *)op->kp.addr + op->optinsn.size);
 
+	set_memory_ro((unsigned long)buf & PAGE_MASK, 1);
+
 	flush_icache_range((unsigned long) buf,
 			   (unsigned long) buf + TMPL_END_IDX +
 			   op->optinsn.size + RELATIVEJUMP_SIZE);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/block/blk-throttle.c linux-libre-3.18.101-gnu/block/blk-throttle.c
--- linux-libre-3.18.100-gnu/block/blk-throttle.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/block/blk-throttle.c	2018-03-22 04:37:18.000000000 -0400
@@ -648,6 +648,17 @@ static void throtl_dequeue_tg(struct thr
 static void throtl_schedule_pending_timer(struct throtl_service_queue *sq,
 					  unsigned long expires)
 {
+	unsigned long max_expire = jiffies + 8 * throtl_slice;
+
+	/*
+	 * Since we are adjusting the throttle limit dynamically, the sleep
+	 * time calculated according to previous limit might be invalid. It's
+	 * possible the cgroup sleep time is very long and no other cgroups
+	 * have IO running so notify the limit changes. Make sure the cgroup
+	 * doesn't sleep too long to avoid the missed notification.
+	 */
+	if (time_after(expires, max_expire))
+		expires = max_expire;
 	mod_timer(&sq->pending_timer, expires);
 	throtl_log(sq, "schedule timer. delay=%lu jiffies=%lu",
 		   expires - jiffies, jiffies);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/gpu/drm/drm_irq.c linux-libre-3.18.101-gnu/drivers/gpu/drm/drm_irq.c
--- linux-libre-3.18.100-gnu/drivers/gpu/drm/drm_irq.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/gpu/drm/drm_irq.c	2018-03-22 04:37:18.000000000 -0400
@@ -1038,9 +1038,9 @@ void drm_vblank_put(struct drm_device *d
 	if (atomic_dec_and_test(&vblank->refcount)) {
 		if (drm_vblank_offdelay == 0)
 			return;
-		else if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0)
+		else if (drm_vblank_offdelay < 0)
 			vblank_disable_fn((unsigned long)vblank);
-		else
+		else if (!dev->vblank_disable_immediate)
 			mod_timer(&vblank->disable_timer,
 				  jiffies + ((drm_vblank_offdelay * HZ)/1000));
 	}
@@ -1664,6 +1664,16 @@ bool drm_handle_vblank(struct drm_device
 	wake_up(&vblank->queue);
 	drm_handle_vblank_events(dev, crtc);
 
+	/* With instant-off, we defer disabling the interrupt until after
+	 * we finish processing the following vblank. The disable has to
+	 * be last (after drm_handle_vblank_events) so that the timestamp
+	 * is always accurate.
+	 */
+	if (dev->vblank_disable_immediate &&
+	    drm_vblank_offdelay > 0 &&
+	    !atomic_read(&vblank->refcount))
+		vblank_disable_fn((unsigned long)vblank);
+
 	spin_unlock_irqrestore(&dev->event_lock, irqflags);
 
 	return true;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/gpu/drm/radeon/radeon_display.c linux-libre-3.18.101-gnu/drivers/gpu/drm/radeon/radeon_display.c
--- linux-libre-3.18.100-gnu/drivers/gpu/drm/radeon/radeon_display.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/gpu/drm/radeon/radeon_display.c	2018-03-22 04:37:18.000000000 -0400
@@ -1320,6 +1320,12 @@ radeon_user_framebuffer_create(struct dr
 		return ERR_PTR(-ENOENT);
 	}
 
+	/* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
+	if (obj->import_attach) {
+		DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
+		return ERR_PTR(-EINVAL);
+	}
+
 	radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
 	if (radeon_fb == NULL) {
 		drm_gem_object_unreference_unlocked(obj);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/hid/hid-elo.c linux-libre-3.18.101-gnu/drivers/hid/hid-elo.c
--- linux-libre-3.18.100-gnu/drivers/hid/hid-elo.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/hid/hid-elo.c	2018-03-22 04:37:18.000000000 -0400
@@ -42,6 +42,12 @@ static void elo_input_configured(struct
 {
 	struct input_dev *input = hidinput->input;
 
+	/*
+	 * ELO devices have one Button usage in GenDesk field, which makes
+	 * hid-input map it to BTN_LEFT; that confuses userspace, which then
+	 * considers the device to be a mouse/touchpad instead of touchscreen.
+	 */
+	clear_bit(BTN_LEFT, input->keybit);
 	set_bit(BTN_TOUCH, input->keybit);
 	set_bit(ABS_PRESSURE, input->absbit);
 	input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/hid/hid-input.c linux-libre-3.18.101-gnu/drivers/hid/hid-input.c
--- linux-libre-3.18.100-gnu/drivers/hid/hid-input.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/hid/hid-input.c	2018-03-22 04:37:18.000000000 -0400
@@ -1090,18 +1090,26 @@ void hidinput_hid_event(struct hid_devic
 
 	/*
 	 * Ignore out-of-range values as per HID specification,
-	 * section 5.10 and 6.2.25.
+	 * section 5.10 and 6.2.25, when NULL state bit is present.
+	 * When it's not, clamp the value to match Microsoft's input
+	 * driver as mentioned in "Required HID usages for digitizers":
+	 * https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85).asp
 	 *
 	 * The logical_minimum < logical_maximum check is done so that we
 	 * don't unintentionally discard values sent by devices which
 	 * don't specify logical min and max.
 	 */
 	if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
-	    (field->logical_minimum < field->logical_maximum) &&
-	    (value < field->logical_minimum ||
-	     value > field->logical_maximum)) {
-		dbg_hid("Ignoring out-of-range value %x\n", value);
-		return;
+	    (field->logical_minimum < field->logical_maximum)) {
+		if (field->flags & HID_MAIN_ITEM_NULL_STATE &&
+		    (value < field->logical_minimum ||
+		     value > field->logical_maximum)) {
+			dbg_hid("Ignoring out-of-range value %x\n", value);
+			return;
+		}
+		value = clamp(value,
+			      field->logical_minimum,
+			      field->logical_maximum);
 	}
 
 	/*
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/input/touchscreen/tsc2007.c linux-libre-3.18.101-gnu/drivers/input/touchscreen/tsc2007.c
--- linux-libre-3.18.100-gnu/drivers/input/touchscreen/tsc2007.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/input/touchscreen/tsc2007.c	2018-03-22 04:37:18.000000000 -0400
@@ -456,6 +456,14 @@ static int tsc2007_probe(struct i2c_clie
 
 	tsc2007_stop(ts);
 
+	/* power down the chip (TSC2007_SETUP does not ACK on I2C) */
+	err = tsc2007_xfer(ts, PWRDOWN);
+	if (err < 0) {
+		dev_err(&client->dev,
+			"Failed to setup chip: %d\n", err);
+		return err;	/* usually, chip does not respond */
+	}
+
 	err = input_register_device(input_dev);
 	if (err) {
 		dev_err(&client->dev,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/iommu/iova.c linux-libre-3.18.101-gnu/drivers/iommu/iova.c
--- linux-libre-3.18.100-gnu/drivers/iommu/iova.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/iommu/iova.c	2018-03-22 04:37:18.000000000 -0400
@@ -118,7 +118,7 @@ static int __alloc_and_insert_iova_range
 				break;	/* found a free slot */
 		}
 adjust_limit_pfn:
-		limit_pfn = curr_iova->pfn_lo - 1;
+		limit_pfn = curr_iova->pfn_lo ? (curr_iova->pfn_lo - 1) : 0;
 move_left:
 		prev = curr;
 		curr = rb_prev(curr);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/media/i2c/soc_camera/ov6650.c linux-libre-3.18.101-gnu/drivers/media/i2c/soc_camera/ov6650.c
--- linux-libre-3.18.100-gnu/drivers/media/i2c/soc_camera/ov6650.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/media/i2c/soc_camera/ov6650.c	2018-03-22 04:37:18.000000000 -0400
@@ -1016,7 +1016,7 @@ static int ov6650_probe(struct i2c_clien
 	priv->code	  = V4L2_MBUS_FMT_YUYV8_2X8;
 	priv->colorspace  = V4L2_COLORSPACE_JPEG;
 
-	priv->clk = v4l2_clk_get(&client->dev, "mclk");
+	priv->clk = v4l2_clk_get(&client->dev, NULL);
 	if (IS_ERR(priv->clk)) {
 		ret = PTR_ERR(priv->clk);
 		goto eclkget;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/media/usb/cpia2/cpia2_v4l.c linux-libre-3.18.101-gnu/drivers/media/usb/cpia2/cpia2_v4l.c
--- linux-libre-3.18.100-gnu/drivers/media/usb/cpia2/cpia2_v4l.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/media/usb/cpia2/cpia2_v4l.c	2018-03-22 04:37:18.000000000 -0400
@@ -812,7 +812,7 @@ static int cpia2_querybuf(struct file *f
 	struct camera_data *cam = video_drvdata(file);
 
 	if(buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
-	   buf->index > cam->num_frames)
+	   buf->index >= cam->num_frames)
 		return -EINVAL;
 
 	buf->m.offset = cam->buffers[buf->index].data - cam->frame_buffer;
@@ -863,7 +863,7 @@ static int cpia2_qbuf(struct file *file,
 
 	if(buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
 	   buf->memory != V4L2_MEMORY_MMAP ||
-	   buf->index > cam->num_frames)
+	   buf->index >= cam->num_frames)
 		return -EINVAL;
 
 	DBG("QBUF #%d\n", buf->index);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/mtd/nand/nand_base.c linux-libre-3.18.101-gnu/drivers/mtd/nand/nand_base.c
--- linux-libre-3.18.100-gnu/drivers/mtd/nand/nand_base.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/mtd/nand/nand_base.c	2018-03-22 04:37:18.000000000 -0400
@@ -600,7 +600,8 @@ static void nand_command(struct mtd_info
 		chip->cmd_ctrl(mtd, readcmd, ctrl);
 		ctrl &= ~NAND_CTRL_CHANGE;
 	}
-	chip->cmd_ctrl(mtd, command, ctrl);
+	if (command != NAND_CMD_NONE)
+		chip->cmd_ctrl(mtd, command, ctrl);
 
 	/* Address cycle, when necessary */
 	ctrl = NAND_CTRL_ALE | NAND_CTRL_CHANGE;
@@ -629,6 +630,7 @@ static void nand_command(struct mtd_info
 	 */
 	switch (command) {
 
+	case NAND_CMD_NONE:
 	case NAND_CMD_PAGEPROG:
 	case NAND_CMD_ERASE1:
 	case NAND_CMD_ERASE2:
@@ -691,7 +693,9 @@ static void nand_command_lp(struct mtd_i
 	}
 
 	/* Command latch cycle */
-	chip->cmd_ctrl(mtd, command, NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
+	if (command != NAND_CMD_NONE)
+		chip->cmd_ctrl(mtd, command,
+			       NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
 
 	if (column != -1 || page_addr != -1) {
 		int ctrl = NAND_CTRL_CHANGE | NAND_NCE | NAND_ALE;
@@ -724,6 +728,7 @@ static void nand_command_lp(struct mtd_i
 	 */
 	switch (command) {
 
+	case NAND_CMD_NONE:
 	case NAND_CMD_CACHEDPROG:
 	case NAND_CMD_PAGEPROG:
 	case NAND_CMD_ERASE1:
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c linux-libre-3.18.101-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
--- linux-libre-3.18.100-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c	2018-03-22 04:37:18.000000000 -0400
@@ -535,6 +535,7 @@ static void xgene_enet_cle_bypass(struct
 	xgene_enet_rd_csr(pdata, CLE_BYPASS_REG0_0_ADDR, &cb);
 	cb |= CFG_CLE_BYPASS_EN0;
 	CFG_CLE_IP_PROTOCOL0_SET(&cb, 3);
+	CFG_CLE_IP_HDR_LEN_SET(&cb, 0);
 	xgene_enet_wr_csr(pdata, CLE_BYPASS_REG0_0_ADDR, cb);
 
 	xgene_enet_rd_csr(pdata, CLE_BYPASS_REG1_0_ADDR, &cb);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h linux-libre-3.18.101-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
--- linux-libre-3.18.100-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h	2018-03-22 04:37:18.000000000 -0400
@@ -143,6 +143,7 @@ enum xgene_enet_rm {
 #define CFG_TXCLK_MUXSEL0_SET(dst, val)	xgene_set_bits(dst, val, 29, 3)
 
 #define CFG_CLE_IP_PROTOCOL0_SET(dst, val)	xgene_set_bits(dst, val, 16, 2)
+#define CFG_CLE_IP_HDR_LEN_SET(dst, val)	xgene_set_bits(dst, val, 8, 5)
 #define CFG_CLE_DSTQID0_SET(dst, val)		xgene_set_bits(dst, val, 0, 12)
 #define CFG_CLE_FPSEL0_SET(dst, val)		xgene_set_bits(dst, val, 16, 4)
 #define CFG_MACMODE_SET(dst, val)		xgene_set_bits(dst, val, 18, 2)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/ethernet/faraday/ftgmac100.c linux-libre-3.18.101-gnu/drivers/net/ethernet/faraday/ftgmac100.c
--- linux-libre-3.18.100-gnu/drivers/net/ethernet/faraday/ftgmac100.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/ethernet/faraday/ftgmac100.c	2018-03-22 04:37:18.000000000 -0400
@@ -28,6 +28,7 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
+#include <linux/of.h>
 #include <linux/phy.h>
 #include <linux/platform_device.h>
 #include <net/ip.h>
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c linux-libre-3.18.101-gnu/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
--- linux-libre-3.18.100-gnu/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c	2018-03-22 04:37:18.000000000 -0400
@@ -840,7 +840,7 @@ static void fm10k_self_test(struct net_d
 
 	memset(data, 0, sizeof(*data) * FM10K_TEST_LEN);
 
-	if (FM10K_REMOVED(hw)) {
+	if (FM10K_REMOVED(hw->hw_addr)) {
 		netif_err(interface, drv, dev,
 			  "Interface removed - test blocked\n");
 		eth_test->flags |= ETH_TEST_FL_FAILED;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/veth.c linux-libre-3.18.101-gnu/drivers/net/veth.c
--- linux-libre-3.18.100-gnu/drivers/net/veth.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/veth.c	2018-03-22 04:37:18.000000000 -0400
@@ -382,6 +382,9 @@ static int veth_newlink(struct net *src_
 	if (ifmp && (dev->ifindex != 0))
 		peer->ifindex = ifmp->ifi_index;
 
+	peer->gso_max_size = dev->gso_max_size;
+	peer->gso_max_segs = dev->gso_max_segs;
+
 	err = register_netdevice(peer);
 	put_net(net);
 	net = NULL;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/wireless/ath/ath10k/debug.c linux-libre-3.18.101-gnu/drivers/net/wireless/ath/ath10k/debug.c
--- linux-libre-3.18.100-gnu/drivers/net/wireless/ath/ath10k/debug.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/wireless/ath/ath10k/debug.c	2018-03-22 04:37:18.000000000 -0400
@@ -1079,6 +1079,15 @@ static ssize_t ath10k_write_simulate_rad
 					   size_t count, loff_t *ppos)
 {
 	struct ath10k *ar = file->private_data;
+	struct ath10k_vif *arvif;
+
+	/* Just check for for the first vif alone, as all the vifs will be
+	 * sharing the same channel and if the channel is disabled, all the
+	 * vifs will share the same 'is_started' state.
+	 */
+	arvif = list_first_entry(&ar->arvifs, typeof(*arvif), list);
+	if (!arvif->is_started)
+		return -EINVAL;
 
 	ieee80211_radar_detected(ar->hw);
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/net/wireless/ath/wil6210/main.c linux-libre-3.18.101-gnu/drivers/net/wireless/ath/wil6210/main.c
--- linux-libre-3.18.100-gnu/drivers/net/wireless/ath/wil6210/main.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/net/wireless/ath/wil6210/main.c	2018-03-22 04:37:18.000000000 -0400
@@ -59,9 +59,15 @@ void wil_memcpy_fromio_32(void *dst, con
 	u32 *d = dst;
 	const volatile u32 __iomem *s = src;
 
-	/* size_t is unsigned, if (count%4 != 0) it will wrap */
-	for (count += 4; count > 4; count -= 4)
+	for (; count >= 4; count -= 4)
 		*d++ = __raw_readl(s++);
+
+	if (unlikely(count)) {
+		/* count can be 1..3 */
+		u32 tmp = __raw_readl(s);
+
+		memcpy(d, &tmp, count);
+	}
 }
 
 void wil_memcpy_toio_32(volatile void __iomem *dst, const void *src,
@@ -70,8 +76,16 @@ void wil_memcpy_toio_32(volatile void __
 	volatile u32 __iomem *d = dst;
 	const u32 *s = src;
 
-	for (count += 4; count > 4; count -= 4)
+	for (; count >= 4; count -= 4)
 		__raw_writel(*s++, d++);
+
+	if (unlikely(count)) {
+		/* count can be 1..3 */
+		u32 tmp = 0;
+
+		memcpy(&tmp, s, count);
+		__raw_writel(tmp, d);
+	}
 }
 
 static void wil_disconnect_cid(struct wil6210_priv *wil, int cid)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/of/device.c linux-libre-3.18.101-gnu/drivers/of/device.c
--- linux-libre-3.18.100-gnu/drivers/of/device.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/of/device.c	2018-03-22 04:37:18.000000000 -0400
@@ -126,7 +126,7 @@ ssize_t of_device_get_modalias(struct de
 			str[i] = '_';
 	}
 
-	return tsize;
+	return repend;
 }
 EXPORT_SYMBOL_GPL(of_device_get_modalias);
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/pci/pci-driver.c linux-libre-3.18.101-gnu/drivers/pci/pci-driver.c
--- linux-libre-3.18.100-gnu/drivers/pci/pci-driver.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/pci/pci-driver.c	2018-03-22 04:37:18.000000000 -0400
@@ -450,8 +450,6 @@ static void pci_device_shutdown(struct d
 
 	if (drv && drv->shutdown)
 		drv->shutdown(pci_dev);
-	pci_msi_shutdown(pci_dev);
-	pci_msix_shutdown(pci_dev);
 
 #ifdef CONFIG_KEXEC
 	/*
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/scsi/ipr.c linux-libre-3.18.101-gnu/drivers/scsi/ipr.c
--- linux-libre-3.18.100-gnu/drivers/scsi/ipr.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/scsi/ipr.c	2018-03-22 04:37:18.000000000 -0400
@@ -828,8 +828,10 @@ static void ipr_sata_eh_done(struct ipr_
 
 	qc->err_mask |= AC_ERR_OTHER;
 	sata_port->ioasa.status |= ATA_BUSY;
-	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 	ata_qc_complete(qc);
+	if (ipr_cmd->eh_comp)
+		complete(ipr_cmd->eh_comp);
+	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 }
 
 /**
@@ -5830,8 +5832,10 @@ static void ipr_erp_done(struct ipr_cmnd
 		res->in_erp = 0;
 	}
 	scsi_dma_unmap(ipr_cmd->scsi_cmd);
-	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 	scsi_cmd->scsi_done(scsi_cmd);
+	if (ipr_cmd->eh_comp)
+		complete(ipr_cmd->eh_comp);
+	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 }
 
 /**
@@ -6214,8 +6218,10 @@ static void ipr_erp_start(struct ipr_ioa
 	}
 
 	scsi_dma_unmap(ipr_cmd->scsi_cmd);
-	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 	scsi_cmd->scsi_done(scsi_cmd);
+	if (ipr_cmd->eh_comp)
+		complete(ipr_cmd->eh_comp);
+	list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 }
 
 /**
@@ -6241,8 +6247,10 @@ static void ipr_scsi_done(struct ipr_cmn
 		scsi_dma_unmap(scsi_cmd);
 
 		spin_lock_irqsave(ipr_cmd->hrrq->lock, lock_flags);
-		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 		scsi_cmd->scsi_done(scsi_cmd);
+		if (ipr_cmd->eh_comp)
+			complete(ipr_cmd->eh_comp);
+		list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
 		spin_unlock_irqrestore(ipr_cmd->hrrq->lock, lock_flags);
 	} else {
 		spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/scsi/scsi_devinfo.c linux-libre-3.18.101-gnu/drivers/scsi/scsi_devinfo.c
--- linux-libre-3.18.100-gnu/drivers/scsi/scsi_devinfo.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/scsi/scsi_devinfo.c	2018-03-22 04:37:18.000000000 -0400
@@ -180,7 +180,7 @@ static struct {
 	{"HITACHI", "6586-", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
 	{"HITACHI", "6588-", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
 	{"HP", "A6189A", NULL, BLIST_SPARSELUN | BLIST_LARGELUN},	/* HP VA7400 */
-	{"HP", "OPEN-", "*", BLIST_REPORTLUN2}, /* HP XP Arrays */
+	{"HP", "OPEN-", "*", BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES}, /* HP XP Arrays */
 	{"HP", "NetRAID-4M", NULL, BLIST_FORCELUN},
 	{"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD},
 	{"HP", "C1557A", NULL, BLIST_FORCELUN},
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/scsi/sg.c linux-libre-3.18.101-gnu/drivers/scsi/sg.c
--- linux-libre-3.18.100-gnu/drivers/scsi/sg.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/scsi/sg.c	2018-03-22 04:37:18.000000000 -0400
@@ -51,6 +51,7 @@ static int sg_version_num = 30536;	/* 2
 #include <linux/mutex.h>
 #include <linux/atomic.h>
 #include <linux/ratelimit.h>
+#include <linux/sizes.h>
 
 #include "scsi.h"
 #include <scsi/scsi_dbg.h>
@@ -535,6 +536,7 @@ sg_read(struct file *filp, char __user *
 	} else
 		count = (old_hdr->result == 0) ? 0 : -EIO;
 	sg_finish_rem_req(srp);
+	sg_remove_request(sfp, srp);
 	retval = count;
 free_old_hdr:
 	kfree(old_hdr);
@@ -575,6 +577,7 @@ sg_new_read(Sg_fd * sfp, char __user *bu
 	}
 err_out:
 	err2 = sg_finish_rem_req(srp);
+	sg_remove_request(sfp, srp);
 	return err ? : err2 ? : count;
 }
 
@@ -674,18 +677,14 @@ sg_write(struct file *filp, const char _
 	 * is a non-zero input_size, so emit a warning.
 	 */
 	if (hp->dxfer_direction == SG_DXFER_TO_FROM_DEV) {
-		static char cmd[TASK_COMM_LEN];
-		if (strcmp(current->comm, cmd)) {
-			printk_ratelimited(KERN_WARNING
-					   "sg_write: data in/out %d/%d bytes "
-					   "for SCSI command 0x%x-- guessing "
-					   "data in;\n   program %s not setting "
-					   "count and/or reply_len properly\n",
-					   old_hdr.reply_len - (int)SZ_SG_HEADER,
-					   input_size, (unsigned int) cmnd[0],
-					   current->comm);
-			strcpy(cmd, current->comm);
-		}
+		printk_ratelimited(KERN_WARNING
+				   "sg_write: data in/out %d/%d bytes "
+				   "for SCSI command 0x%x-- guessing "
+				   "data in;\n   program %s not setting "
+				   "count and/or reply_len properly\n",
+				   old_hdr.reply_len - (int)SZ_SG_HEADER,
+				   input_size, (unsigned int) cmnd[0],
+				   current->comm);
 	}
 	k = sg_common_write(sfp, srp, cmnd, sfp->timeout, blocking);
 	return (k < 0) ? k : count;
@@ -784,11 +783,15 @@ sg_common_write(Sg_fd * sfp, Sg_request
 			"sg_common_write:  scsi opcode=0x%02x, cmd_size=%d\n",
 			(int) cmnd[0], (int) hp->cmd_len));
 
+	if (hp->dxfer_len >= SZ_256M)
+		return -EINVAL;
+
 	k = sg_start_req(srp, cmnd);
 	if (k) {
 		SCSI_LOG_TIMEOUT(1, sg_printk(KERN_INFO, sfp->parentdp,
 			"sg_common_write: start_req err=%d\n", k));
 		sg_finish_rem_req(srp);
+		sg_remove_request(sfp, srp);
 		return k;	/* probably out of space --> ENOMEM */
 	}
 	if (atomic_read(&sdp->detaching)) {
@@ -801,6 +804,7 @@ sg_common_write(Sg_fd * sfp, Sg_request
 		}
 
 		sg_finish_rem_req(srp);
+		sg_remove_request(sfp, srp);
 		return -ENODEV;
 	}
 
@@ -1331,6 +1335,7 @@ sg_rq_end_io_usercontext(struct work_str
 	struct sg_fd *sfp = srp->parentfp;
 
 	sg_finish_rem_req(srp);
+	sg_remove_request(sfp, srp);
 	kref_put(&sfp->f_ref, sg_remove_sfp);
 }
 
@@ -1880,8 +1885,6 @@ sg_finish_rem_req(Sg_request *srp)
 	else
 		sg_remove_scat(sfp, req_schp);
 
-	sg_remove_request(sfp, srp);
-
 	return ret;
 }
 
@@ -2228,12 +2231,17 @@ sg_remove_sfp_usercontext(struct work_st
 	struct sg_fd *sfp = container_of(work, struct sg_fd, ew.work);
 	struct sg_device *sdp = sfp->parentdp;
 	Sg_request *srp;
+	unsigned long iflags;
 
 	/* Cleanup any responses which were never read(). */
+	write_lock_irqsave(&sfp->rq_list_lock, iflags);
 	while (!list_empty(&sfp->rq_list)) {
 		srp = list_first_entry(&sfp->rq_list, Sg_request, entry);
 		sg_finish_rem_req(srp);
+		list_del(&srp->entry);
+		srp->parentfp = NULL;
 	}
+	write_unlock_irqrestore(&sfp->rq_list_lock, iflags);
 
 	if (sfp->reserve.bufflen > 0) {
 		SCSI_LOG_TIMEOUT(6, sg_printk(KERN_INFO, sdp,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/spi/spi-omap2-mcspi.c linux-libre-3.18.101-gnu/drivers/spi/spi-omap2-mcspi.c
--- linux-libre-3.18.100-gnu/drivers/spi/spi-omap2-mcspi.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/spi/spi-omap2-mcspi.c	2018-03-22 04:37:18.000000000 -0400
@@ -441,6 +441,8 @@ omap2_mcspi_rx_dma(struct spi_device *sp
 	int			elements = 0;
 	int			word_len, element_count;
 	struct omap2_mcspi_cs	*cs = spi->controller_state;
+	void __iomem		*chstat_reg = cs->base + OMAP2_MCSPI_CHSTAT0;
+
 	mcspi = spi_master_get_devdata(spi->master);
 	mcspi_dma = &mcspi->dma_channels[spi->chip_select];
 	count = xfer->len;
@@ -501,8 +503,8 @@ omap2_mcspi_rx_dma(struct spi_device *sp
 	if (l & OMAP2_MCSPI_CHCONF_TURBO) {
 		elements--;
 
-		if (likely(mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHSTAT0)
-				   & OMAP2_MCSPI_CHSTAT_RXS)) {
+		if (!mcspi_wait_for_reg_bit(chstat_reg,
+					    OMAP2_MCSPI_CHSTAT_RXS)) {
 			u32 w;
 
 			w = mcspi_read_cs_reg(spi, OMAP2_MCSPI_RX0);
@@ -520,8 +522,7 @@ omap2_mcspi_rx_dma(struct spi_device *sp
 			return count;
 		}
 	}
-	if (likely(mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHSTAT0)
-				& OMAP2_MCSPI_CHSTAT_RXS)) {
+	if (!mcspi_wait_for_reg_bit(chstat_reg, OMAP2_MCSPI_CHSTAT_RXS)) {
 		u32 w;
 
 		w = mcspi_read_cs_reg(spi, OMAP2_MCSPI_RX0);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/spi/spi-sun6i.c linux-libre-3.18.101-gnu/drivers/spi/spi-sun6i.c
--- linux-libre-3.18.100-gnu/drivers/spi/spi-sun6i.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/spi/spi-sun6i.c	2018-03-22 04:37:18.000000000 -0400
@@ -457,7 +457,7 @@ err_free_master:
 
 static int sun6i_spi_remove(struct platform_device *pdev)
 {
-	pm_runtime_disable(&pdev->dev);
+	pm_runtime_force_suspend(&pdev->dev);
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/usb/gadget/udc/dummy_hcd.c linux-libre-3.18.101-gnu/drivers/usb/gadget/udc/dummy_hcd.c
--- linux-libre-3.18.100-gnu/drivers/usb/gadget/udc/dummy_hcd.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/usb/gadget/udc/dummy_hcd.c	2018-03-22 04:37:18.000000000 -0400
@@ -2001,16 +2001,13 @@ static int dummy_hub_control(
 			}
 			break;
 		case USB_PORT_FEAT_POWER:
-			if (hcd->speed == HCD_USB3) {
-				if (dum_hcd->port_status & USB_PORT_STAT_POWER)
-					dev_dbg(dummy_dev(dum_hcd),
-						"power-off\n");
-			} else
-				if (dum_hcd->port_status &
-							USB_SS_PORT_STAT_POWER)
-					dev_dbg(dummy_dev(dum_hcd),
-						"power-off\n");
-			/* FALLS THROUGH */
+			dev_dbg(dummy_dev(dum_hcd), "power-off\n");
+			if (hcd->speed == HCD_USB3)
+				dum_hcd->port_status &= ~USB_SS_PORT_STAT_POWER;
+			else
+				dum_hcd->port_status &= ~USB_PORT_STAT_POWER;
+			set_link_state(dum_hcd);
+			break;
 		default:
 			dum_hcd->port_status &= ~(1 << wValue);
 			set_link_state(dum_hcd);
@@ -2181,14 +2178,13 @@ static int dummy_hub_control(
 				if ((dum_hcd->port_status &
 				     USB_SS_PORT_STAT_POWER) != 0) {
 					dum_hcd->port_status |= (1 << wValue);
-					set_link_state(dum_hcd);
 				}
 			} else
 				if ((dum_hcd->port_status &
 				     USB_PORT_STAT_POWER) != 0) {
 					dum_hcd->port_status |= (1 << wValue);
-					set_link_state(dum_hcd);
 				}
+			set_link_state(dum_hcd);
 		}
 		break;
 	case GetPortErrorCount:
diff -druNp --no-dereference linux-libre-3.18.100-gnu/drivers/video/fbdev/amba-clcd.c linux-libre-3.18.101-gnu/drivers/video/fbdev/amba-clcd.c
--- linux-libre-3.18.100-gnu/drivers/video/fbdev/amba-clcd.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/drivers/video/fbdev/amba-clcd.c	2018-03-22 04:37:18.000000000 -0400
@@ -757,8 +757,8 @@ static int clcdfb_of_dma_setup(struct cl
 	if (err)
 		return err;
 
-	framesize = fb->panel->mode.xres * fb->panel->mode.yres *
-			fb->panel->bpp / 8;
+	framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres *
+			fb->panel->bpp / 8);
 	fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
 			&dma, GFP_KERNEL);
 	if (!fb->fb.screen_base)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/fs/aio.c linux-libre-3.18.101-gnu/fs/aio.c
--- linux-libre-3.18.100-gnu/fs/aio.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/fs/aio.c	2018-03-22 04:37:18.000000000 -0400
@@ -68,9 +68,9 @@ struct aio_ring {
 #define AIO_RING_PAGES	8
 
 struct kioctx_table {
-	struct rcu_head	rcu;
-	unsigned	nr;
-	struct kioctx	*table[];
+	struct rcu_head		rcu;
+	unsigned		nr;
+	struct kioctx __rcu	*table[];
 };
 
 struct kioctx_cpu {
@@ -110,7 +110,8 @@ struct kioctx {
 	struct page		**ring_pages;
 	long			nr_pages;
 
-	struct work_struct	free_work;
+	struct rcu_head		free_rcu;
+	struct work_struct	free_work;	/* see free_ioctx() */
 
 	/*
 	 * signals when all in-flight requests are done
@@ -505,6 +506,12 @@ static int kiocb_cancel(struct kiocb *ki
 	return cancel(kiocb);
 }
 
+/*
+ * free_ioctx() should be RCU delayed to synchronize against the RCU
+ * protected lookup_ioctx() and also needs process context to call
+ * aio_free_ring(), so the double bouncing through kioctx->free_rcu and
+ * ->free_work.
+ */
 static void free_ioctx(struct work_struct *work)
 {
 	struct kioctx *ctx = container_of(work, struct kioctx, free_work);
@@ -518,6 +525,14 @@ static void free_ioctx(struct work_struc
 	kmem_cache_free(kioctx_cachep, ctx);
 }
 
+static void free_ioctx_rcufn(struct rcu_head *head)
+{
+	struct kioctx *ctx = container_of(head, struct kioctx, free_rcu);
+
+	INIT_WORK(&ctx->free_work, free_ioctx);
+	schedule_work(&ctx->free_work);
+}
+
 static void free_ioctx_reqs(struct percpu_ref *ref)
 {
 	struct kioctx *ctx = container_of(ref, struct kioctx, reqs);
@@ -526,8 +541,8 @@ static void free_ioctx_reqs(struct percp
 	if (ctx->requests_done)
 		complete(ctx->requests_done);
 
-	INIT_WORK(&ctx->free_work, free_ioctx);
-	schedule_work(&ctx->free_work);
+	/* Synchronize against RCU protected table->table[] dereferences */
+	call_rcu(&ctx->free_rcu, free_ioctx_rcufn);
 }
 
 /*
@@ -568,9 +583,9 @@ static int ioctx_add_table(struct kioctx
 	while (1) {
 		if (table)
 			for (i = 0; i < table->nr; i++)
-				if (!table->table[i]) {
+				if (!rcu_access_pointer(table->table[i])) {
 					ctx->id = i;
-					table->table[i] = ctx;
+					rcu_assign_pointer(table->table[i], ctx);
 					spin_unlock(&mm->ioctx_lock);
 
 					/* While kioctx setup is in progress,
@@ -745,11 +760,11 @@ static int kill_ioctx(struct mm_struct *
 
 	spin_lock(&mm->ioctx_lock);
 	table = rcu_dereference_raw(mm->ioctx_table);
-	WARN_ON(ctx != table->table[ctx->id]);
-	table->table[ctx->id] = NULL;
+	WARN_ON(ctx != rcu_access_pointer(table->table[ctx->id]));
+	RCU_INIT_POINTER(table->table[ctx->id], NULL);
 	spin_unlock(&mm->ioctx_lock);
 
-	/* percpu_ref_kill() will do the necessary call_rcu() */
+	/* free_ioctx_reqs() will do the necessary RCU synchronization */
 	wake_up_all(&ctx->wait);
 
 	/*
@@ -802,7 +817,8 @@ void exit_aio(struct mm_struct *mm)
 		return;
 
 	for (i = 0; i < table->nr; ++i) {
-		struct kioctx *ctx = table->table[i];
+		struct kioctx *ctx =
+			rcu_dereference_protected(table->table[i], true);
 		struct completion requests_done =
 			COMPLETION_INITIALIZER_ONSTACK(requests_done);
 
@@ -988,7 +1004,7 @@ static struct kioctx *lookup_ioctx(unsig
 	if (!table || id >= table->nr)
 		goto out;
 
-	ctx = table->table[id];
+	ctx = rcu_dereference(table->table[id]);
 	if (ctx && ctx->user_id == ctx_id) {
 		percpu_ref_get(&ctx->users);
 		ret = ctx;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/fs/dcache.c linux-libre-3.18.101-gnu/fs/dcache.c
--- linux-libre-3.18.100-gnu/fs/dcache.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/fs/dcache.c	2018-03-22 04:37:18.000000000 -0400
@@ -581,11 +581,16 @@ again:
 		spin_unlock(&parent->d_lock);
 		goto again;
 	}
-	rcu_read_unlock();
-	if (parent != dentry)
+	if (parent != dentry) {
 		spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
-	else
+		if (unlikely(dentry->d_lockref.count < 0)) {
+			spin_unlock(&parent->d_lock);
+			parent = NULL;
+		}
+	} else {
 		parent = NULL;
+	}
+	rcu_read_unlock();
 	return parent;
 }
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/fs/reiserfs/journal.c linux-libre-3.18.101-gnu/fs/reiserfs/journal.c
--- linux-libre-3.18.100-gnu/fs/reiserfs/journal.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/fs/reiserfs/journal.c	2018-03-22 04:37:18.000000000 -0400
@@ -1961,7 +1961,7 @@ static int do_journal_release(struct rei
 	 * will be requeued because superblock is being shutdown and doesn't
 	 * have MS_ACTIVE set.
 	 */
-	cancel_delayed_work_sync(&REISERFS_SB(sb)->old_work);
+	reiserfs_cancel_old_flush(sb);
 	/* wait for all commits to finish */
 	cancel_delayed_work_sync(&SB_JOURNAL(sb)->j_work);
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/fs/reiserfs/reiserfs.h linux-libre-3.18.101-gnu/fs/reiserfs/reiserfs.h
--- linux-libre-3.18.100-gnu/fs/reiserfs/reiserfs.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/fs/reiserfs/reiserfs.h	2018-03-22 04:37:18.000000000 -0400
@@ -2946,6 +2946,7 @@ int reiserfs_allocate_list_bitmaps(struc
 				   struct reiserfs_list_bitmap *, unsigned int);
 
 void reiserfs_schedule_old_flush(struct super_block *s);
+void reiserfs_cancel_old_flush(struct super_block *s);
 void add_save_link(struct reiserfs_transaction_handle *th,
 		   struct inode *inode, int truncate);
 int remove_save_link(struct inode *inode, int truncate);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/fs/reiserfs/super.c linux-libre-3.18.101-gnu/fs/reiserfs/super.c
--- linux-libre-3.18.100-gnu/fs/reiserfs/super.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/fs/reiserfs/super.c	2018-03-22 04:37:18.000000000 -0400
@@ -89,7 +89,9 @@ static void flush_old_commits(struct wor
 	s = sbi->s_journal->j_work_sb;
 
 	spin_lock(&sbi->old_work_lock);
-	sbi->work_queued = 0;
+	/* Avoid clobbering the cancel state... */
+	if (sbi->work_queued == 1)
+		sbi->work_queued = 0;
 	spin_unlock(&sbi->old_work_lock);
 
 	reiserfs_sync_fs(s, 1);
@@ -116,21 +118,22 @@ void reiserfs_schedule_old_flush(struct
 	spin_unlock(&sbi->old_work_lock);
 }
 
-static void cancel_old_flush(struct super_block *s)
+void reiserfs_cancel_old_flush(struct super_block *s)
 {
 	struct reiserfs_sb_info *sbi = REISERFS_SB(s);
 
-	cancel_delayed_work_sync(&REISERFS_SB(s)->old_work);
 	spin_lock(&sbi->old_work_lock);
-	sbi->work_queued = 0;
+	/* Make sure no new flushes will be queued */
+	sbi->work_queued = 2;
 	spin_unlock(&sbi->old_work_lock);
+	cancel_delayed_work_sync(&REISERFS_SB(s)->old_work);
 }
 
 static int reiserfs_freeze(struct super_block *s)
 {
 	struct reiserfs_transaction_handle th;
 
-	cancel_old_flush(s);
+	reiserfs_cancel_old_flush(s);
 
 	reiserfs_write_lock(s);
 	if (!(s->s_flags & MS_RDONLY)) {
@@ -151,7 +154,13 @@ static int reiserfs_freeze(struct super_
 
 static int reiserfs_unfreeze(struct super_block *s)
 {
+	struct reiserfs_sb_info *sbi = REISERFS_SB(s);
+
 	reiserfs_allow_writes(s);
+	spin_lock(&sbi->old_work_lock);
+	/* Allow old_work to run again */
+	sbi->work_queued = 0;
+	spin_unlock(&sbi->old_work_lock);
 	return 0;
 }
 
@@ -2164,7 +2173,7 @@ error_unlocked:
 	if (sbi->commit_wq)
 		destroy_workqueue(sbi->commit_wq);
 
-	cancel_delayed_work_sync(&REISERFS_SB(s)->old_work);
+	reiserfs_cancel_old_flush(s);
 
 	reiserfs_free_bitmap_cache(s);
 	if (SB_BUFFER_WITH_SB(s))
diff -druNp --no-dereference linux-libre-3.18.100-gnu/include/linux/pagemap.h linux-libre-3.18.101-gnu/include/linux/pagemap.h
--- linux-libre-3.18.100-gnu/include/linux/pagemap.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/include/linux/pagemap.h	2018-03-22 04:37:18.000000000 -0400
@@ -146,7 +146,7 @@ static inline int page_cache_get_specula
 
 #ifdef CONFIG_TINY_RCU
 # ifdef CONFIG_PREEMPT_COUNT
-	VM_BUG_ON(!in_atomic());
+	VM_BUG_ON(!in_atomic() && !irqs_disabled());
 # endif
 	/*
 	 * Preempt must be disabled here - we rely on rcu_read_lock doing
@@ -184,7 +184,7 @@ static inline int page_cache_add_specula
 
 #if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
 # ifdef CONFIG_PREEMPT_COUNT
-	VM_BUG_ON(!in_atomic());
+	VM_BUG_ON(!in_atomic() && !irqs_disabled());
 # endif
 	VM_BUG_ON_PAGE(page_count(page) == 0, page);
 	atomic_add(count, &page->_count);
diff -druNp --no-dereference linux-libre-3.18.100-gnu/include/linux/platform_data/isl9305.h linux-libre-3.18.101-gnu/include/linux/platform_data/isl9305.h
--- linux-libre-3.18.100-gnu/include/linux/platform_data/isl9305.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/include/linux/platform_data/isl9305.h	2018-03-22 04:37:18.000000000 -0400
@@ -24,7 +24,7 @@
 struct regulator_init_data;
 
 struct isl9305_pdata {
-	struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR];
+	struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR + 1];
 };
 
 #endif
diff -druNp --no-dereference linux-libre-3.18.100-gnu/include/net/tcp.h linux-libre-3.18.101-gnu/include/net/tcp.h
--- linux-libre-3.18.100-gnu/include/net/tcp.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/include/net/tcp.h	2018-03-22 04:37:18.000000000 -0400
@@ -1099,9 +1099,11 @@ void tcp_select_initial_window(int __spa
 
 static inline int tcp_win_from_space(int space)
 {
-	return sysctl_tcp_adv_win_scale<=0 ?
-		(space>>(-sysctl_tcp_adv_win_scale)) :
-		space - (space>>sysctl_tcp_adv_win_scale);
+	int tcp_adv_win_scale = sysctl_tcp_adv_win_scale;
+
+	return tcp_adv_win_scale <= 0 ?
+		(space>>(-tcp_adv_win_scale)) :
+		space - (space>>tcp_adv_win_scale);
 }
 
 /* Note: caller must be prepared to deal with negative returns */ 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/kernel/printk/braille.c linux-libre-3.18.101-gnu/kernel/printk/braille.c
--- linux-libre-3.18.100-gnu/kernel/printk/braille.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/kernel/printk/braille.c	2018-03-22 04:37:18.000000000 -0400
@@ -2,12 +2,13 @@
 
 #include <linux/kernel.h>
 #include <linux/console.h>
+#include <linux/errno.h>
 #include <linux/string.h>
 
 #include "console_cmdline.h"
 #include "braille.h"
 
-char *_braille_console_setup(char **str, char **brl_options)
+int _braille_console_setup(char **str, char **brl_options)
 {
 	if (!memcmp(*str, "brl,", 4)) {
 		*brl_options = "";
@@ -15,14 +16,14 @@ char *_braille_console_setup(char **str,
 	} else if (!memcmp(str, "brl=", 4)) {
 		*brl_options = *str + 4;
 		*str = strchr(*brl_options, ',');
-		if (!*str)
+		if (!*str) {
 			pr_err("need port name after brl=\n");
-		else
-			*((*str)++) = 0;
-	} else
-		return NULL;
+			return -EINVAL;
+		}
+		*((*str)++) = 0;
+	}
 
-	return *str;
+	return 0;
 }
 
 int
diff -druNp --no-dereference linux-libre-3.18.100-gnu/kernel/printk/braille.h linux-libre-3.18.101-gnu/kernel/printk/braille.h
--- linux-libre-3.18.100-gnu/kernel/printk/braille.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/kernel/printk/braille.h	2018-03-22 04:37:18.000000000 -0400
@@ -9,7 +9,14 @@ braille_set_options(struct console_cmdli
 	c->brl_options = brl_options;
 }
 
-char *
+/*
+ * Setup console according to braille options.
+ * Return -EINVAL on syntax error, 0 on success (or no braille option was
+ * actually given).
+ * Modifies str to point to the serial options
+ * Sets brl_options to the parsed braille options.
+ */
+int
 _braille_console_setup(char **str, char **brl_options);
 
 int
@@ -25,10 +32,10 @@ braille_set_options(struct console_cmdli
 {
 }
 
-static inline char *
+static inline int
 _braille_console_setup(char **str, char **brl_options)
 {
-	return NULL;
+	return 0;
 }
 
 static inline int
diff -druNp --no-dereference linux-libre-3.18.100-gnu/kernel/sched/core.c linux-libre-3.18.101-gnu/kernel/sched/core.c
--- linux-libre-3.18.100-gnu/kernel/sched/core.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/kernel/sched/core.c	2018-03-22 04:37:18.000000000 -0400
@@ -633,7 +633,8 @@ void resched_cpu(int cpu)
 	unsigned long flags;
 
 	raw_spin_lock_irqsave(&rq->lock, flags);
-	resched_curr(rq);
+	if (cpu_online(cpu) || cpu == smp_processor_id())
+		resched_curr(rq);
 	raw_spin_unlock_irqrestore(&rq->lock, flags);
 }
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/kernel/time/sched_clock.c linux-libre-3.18.101-gnu/kernel/time/sched_clock.c
--- linux-libre-3.18.100-gnu/kernel/time/sched_clock.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/kernel/time/sched_clock.c	2018-03-22 04:37:18.000000000 -0400
@@ -146,6 +146,11 @@ void __init sched_clock_register(u64 (*r
 	cd.epoch_ns = ns;
 	raw_write_seqcount_end(&cd.seq);
 
+	if (sched_clock_timer.function != NULL) {
+		/* update timeout for clock wrap */
+		hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL);
+	}
+
 	r = rate;
 	if (r >= 4000000) {
 		r /= 1000000;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/Makefile linux-libre-3.18.101-gnu/Makefile
--- linux-libre-3.18.100-gnu/Makefile	2018-03-19 03:19:50.000000000 -0400
+++ linux-libre-3.18.101-gnu/Makefile	2018-03-22 15:56:11.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 100
+SUBLEVEL = 101
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/net/batman-adv/bridge_loop_avoidance.c linux-libre-3.18.101-gnu/net/batman-adv/bridge_loop_avoidance.c
--- linux-libre-3.18.100-gnu/net/batman-adv/bridge_loop_avoidance.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/net/batman-adv/bridge_loop_avoidance.c	2018-03-22 04:37:18.000000000 -0400
@@ -1596,10 +1596,22 @@ int batadv_bla_tx(struct batadv_priv *ba
 		/* if yes, the client has roamed and we have
 		 * to unclaim it.
 		 */
-		batadv_handle_unclaim(bat_priv, primary_if,
-				      primary_if->net_dev->dev_addr,
-				      ethhdr->h_source, vid);
-		goto allow;
+		if (batadv_has_timed_out(claim->lasttime, 100)) {
+			/* only unclaim if the last claim entry is
+			 * older than 100 ms to make sure we really
+			 * have a roaming client here.
+			 */
+			batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla_tx(): Roaming client %pM detected. Unclaim it.\n",
+				   ethhdr->h_source);
+			batadv_handle_unclaim(bat_priv, primary_if,
+					      primary_if->net_dev->dev_addr,
+					      ethhdr->h_source, vid);
+			goto allow;
+		} else {
+			batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla_tx(): Race for claim %pM detected. Drop packet.\n",
+				   ethhdr->h_source);
+			goto handled;
+		}
 	}
 
 	/* check if it is a multicast/broadcast frame */
diff -druNp --no-dereference linux-libre-3.18.100-gnu/net/mac80211/iface.c linux-libre-3.18.101-gnu/net/mac80211/iface.c
--- linux-libre-3.18.100-gnu/net/mac80211/iface.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/net/mac80211/iface.c	2018-03-22 04:37:18.000000000 -0400
@@ -1379,7 +1379,7 @@ static void ieee80211_setup_sdata(struct
 		break;
 	case NL80211_IFTYPE_UNSPECIFIED:
 	case NUM_NL80211_IFTYPES:
-		BUG();
+		WARN_ON(1);
 		break;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/net/sched/act_csum.c linux-libre-3.18.101-gnu/net/sched/act_csum.c
--- linux-libre-3.18.100-gnu/net/sched/act_csum.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/net/sched/act_csum.c	2018-03-22 04:37:18.000000000 -0400
@@ -176,6 +176,9 @@ static int tcf_csum_ipv4_tcp(struct sk_b
 	struct tcphdr *tcph;
 	const struct iphdr *iph;
 
+	if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
+		return 1;
+
 	tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
 	if (tcph == NULL)
 		return 0;
@@ -197,6 +200,9 @@ static int tcf_csum_ipv6_tcp(struct sk_b
 	struct tcphdr *tcph;
 	const struct ipv6hdr *ip6h;
 
+	if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
+		return 1;
+
 	tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph));
 	if (tcph == NULL)
 		return 0;
@@ -220,6 +226,9 @@ static int tcf_csum_ipv4_udp(struct sk_b
 	const struct iphdr *iph;
 	u16 ul;
 
+	if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+		return 1;
+
 	/*
 	 * Support both UDP and UDPLITE checksum algorithms, Don't use
 	 * udph->len to get the real length without any protocol check,
@@ -273,6 +282,9 @@ static int tcf_csum_ipv6_udp(struct sk_b
 	const struct ipv6hdr *ip6h;
 	u16 ul;
 
+	if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP)
+		return 1;
+
 	/*
 	 * Support both UDP and UDPLITE checksum algorithms, Don't use
 	 * udph->len to get the real length without any protocol check,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/net/xfrm/xfrm_policy.c linux-libre-3.18.101-gnu/net/xfrm/xfrm_policy.c
--- linux-libre-3.18.100-gnu/net/xfrm/xfrm_policy.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/net/xfrm/xfrm_policy.c	2018-03-22 04:37:18.000000000 -0400
@@ -1292,7 +1292,7 @@ EXPORT_SYMBOL(xfrm_policy_delete);
 
 int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
 {
-	struct net *net = xp_net(pol);
+	struct net *net = sock_net(sk);
 	struct xfrm_policy *old_pol;
 
 #ifdef CONFIG_XFRM_SUB_POLICY
diff -druNp --no-dereference linux-libre-3.18.100-gnu/net/xfrm/xfrm_state.c linux-libre-3.18.101-gnu/net/xfrm/xfrm_state.c
--- linux-libre-3.18.100-gnu/net/xfrm/xfrm_state.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/net/xfrm/xfrm_state.c	2018-03-22 04:37:18.000000000 -0400
@@ -1845,6 +1845,13 @@ int xfrm_user_policy(struct sock *sk, in
 	struct xfrm_mgr *km;
 	struct xfrm_policy *pol = NULL;
 
+	if (!optval && !optlen) {
+		xfrm_sk_policy_insert(sk, XFRM_POLICY_IN, NULL);
+		xfrm_sk_policy_insert(sk, XFRM_POLICY_OUT, NULL);
+		__sk_dst_reset(sk);
+		return 0;
+	}
+
 	if (optlen <= 0 || optlen > PAGE_SIZE)
 		return -EMSGSIZE;
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/security/apparmor/lsm.c linux-libre-3.18.101-gnu/security/apparmor/lsm.c
--- linux-libre-3.18.100-gnu/security/apparmor/lsm.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/security/apparmor/lsm.c	2018-03-22 04:37:18.000000000 -0400
@@ -735,7 +735,7 @@ module_param_named(logsyscall, aa_g_logs
 
 /* Maximum pathname length before accesses will start getting rejected */
 unsigned int aa_g_path_max = 2 * PATH_MAX;
-module_param_named(path_max, aa_g_path_max, aauint, S_IRUSR | S_IWUSR);
+module_param_named(path_max, aa_g_path_max, aauint, S_IRUSR);
 
 /* Determines how paranoid loading of policy is and how much verification
  * on the loaded policy is done.
diff -druNp --no-dereference linux-libre-3.18.100-gnu/security/integrity/ima/ima_appraise.c linux-libre-3.18.101-gnu/security/integrity/ima/ima_appraise.c
--- linux-libre-3.18.100-gnu/security/integrity/ima/ima_appraise.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/security/integrity/ima/ima_appraise.c	2018-03-22 04:37:18.000000000 -0400
@@ -206,7 +206,8 @@ int ima_appraise_measurement(int func, s
 		if (opened & FILE_CREATED)
 			iint->flags |= IMA_NEW_FILE;
 		if ((iint->flags & IMA_NEW_FILE) &&
-		    !(iint->flags & IMA_DIGSIG_REQUIRED))
+		    (!(iint->flags & IMA_DIGSIG_REQUIRED) ||
+		     (inode->i_size == 0)))
 			status = INTEGRITY_PASS;
 		goto out;
 	}
diff -druNp --no-dereference linux-libre-3.18.100-gnu/security/selinux/hooks.c linux-libre-3.18.101-gnu/security/selinux/hooks.c
--- linux-libre-3.18.100-gnu/security/selinux/hooks.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/security/selinux/hooks.c	2018-03-22 04:37:18.000000000 -0400
@@ -4061,10 +4061,18 @@ static int selinux_socket_bind(struct so
 		u32 sid, node_perm;
 
 		if (family == PF_INET) {
+			if (addrlen < sizeof(struct sockaddr_in)) {
+				err = -EINVAL;
+				goto out;
+			}
 			addr4 = (struct sockaddr_in *)address;
 			snum = ntohs(addr4->sin_port);
 			addrp = (char *)&addr4->sin_addr.s_addr;
 		} else {
+			if (addrlen < SIN6_LEN_RFC2133) {
+				err = -EINVAL;
+				goto out;
+			}
 			addr6 = (struct sockaddr_in6 *)address;
 			snum = ntohs(addr6->sin6_port);
 			addrp = (char *)&addr6->sin6_addr.s6_addr;
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/core/oss/pcm_oss.c linux-libre-3.18.101-gnu/sound/core/oss/pcm_oss.c
--- linux-libre-3.18.100-gnu/sound/core/oss/pcm_oss.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/core/oss/pcm_oss.c	2018-03-22 04:37:18.000000000 -0400
@@ -1815,10 +1815,9 @@ static int snd_pcm_oss_get_formats(struc
 		return -ENOMEM;
 	_snd_pcm_hw_params_any(params);
 	err = snd_pcm_hw_refine(substream, params);
-	format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 
-	kfree(params);
 	if (err < 0)
-		return err;
+		goto error;
+	format_mask = *hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
 	for (fmt = 0; fmt < 32; ++fmt) {
 		if (snd_mask_test(&format_mask, fmt)) {
 			int f = snd_pcm_oss_format_to(fmt);
@@ -1826,7 +1825,10 @@ static int snd_pcm_oss_get_formats(struc
 				formats |= f;
 		}
 	}
-	return formats;
+
+ error:
+	kfree(params);
+	return err < 0 ? err : formats;
 }
 
 static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int format)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/core/seq/seq_clientmgr.c linux-libre-3.18.101-gnu/sound/core/seq/seq_clientmgr.c
--- linux-libre-3.18.100-gnu/sound/core/seq/seq_clientmgr.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/core/seq/seq_clientmgr.c	2018-03-22 04:37:18.000000000 -0400
@@ -270,12 +270,12 @@ static int seq_free_client1(struct snd_s
 
 	if (!client)
 		return 0;
-	snd_seq_delete_all_ports(client);
-	snd_seq_queue_client_leave(client->number);
 	spin_lock_irqsave(&clients_lock, flags);
 	clienttablock[client->number] = 1;
 	clienttab[client->number] = NULL;
 	spin_unlock_irqrestore(&clients_lock, flags);
+	snd_seq_delete_all_ports(client);
+	snd_seq_queue_client_leave(client->number);
 	snd_use_lock_sync(&client->use_lock);
 	snd_seq_queue_client_termination(client->number);
 	if (client->pool)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/core/seq/seq_prioq.c linux-libre-3.18.101-gnu/sound/core/seq/seq_prioq.c
--- linux-libre-3.18.100-gnu/sound/core/seq/seq_prioq.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/core/seq/seq_prioq.c	2018-03-22 04:37:18.000000000 -0400
@@ -87,7 +87,7 @@ void snd_seq_prioq_delete(struct snd_seq
 	if (f->cells > 0) {
 		/* drain prioQ */
 		while (f->cells > 0)
-			snd_seq_cell_free(snd_seq_prioq_cell_out(f));
+			snd_seq_cell_free(snd_seq_prioq_cell_out(f, NULL));
 	}
 	
 	kfree(f);
@@ -214,8 +214,18 @@ int snd_seq_prioq_cell_in(struct snd_seq
 	return 0;
 }
 
+/* return 1 if the current time >= event timestamp */
+static int event_is_ready(struct snd_seq_event *ev, void *current_time)
+{
+	if ((ev->flags & SNDRV_SEQ_TIME_STAMP_MASK) == SNDRV_SEQ_TIME_STAMP_TICK)
+		return snd_seq_compare_tick_time(current_time, &ev->time.tick);
+	else
+		return snd_seq_compare_real_time(current_time, &ev->time.time);
+}
+
 /* dequeue cell from prioq */
-struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f,
+						  void *current_time)
 {
 	struct snd_seq_event_cell *cell;
 	unsigned long flags;
@@ -227,6 +237,8 @@ struct snd_seq_event_cell *snd_seq_prioq
 	spin_lock_irqsave(&f->lock, flags);
 
 	cell = f->head;
+	if (cell && current_time && !event_is_ready(&cell->event, current_time))
+		cell = NULL;
 	if (cell) {
 		f->head = cell->next;
 
@@ -252,18 +264,6 @@ int snd_seq_prioq_avail(struct snd_seq_p
 	return f->cells;
 }
 
-
-/* peek at cell at the head of the prioq */
-struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq * f)
-{
-	if (f == NULL) {
-		pr_debug("ALSA: seq: snd_seq_prioq_cell_in() called with NULL prioq\n");
-		return NULL;
-	}
-	return f->head;
-}
-
-
 static inline int prioq_match(struct snd_seq_event_cell *cell,
 			      int client, int timestamp)
 {
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/core/seq/seq_prioq.h linux-libre-3.18.101-gnu/sound/core/seq/seq_prioq.h
--- linux-libre-3.18.100-gnu/sound/core/seq/seq_prioq.h	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/core/seq/seq_prioq.h	2018-03-22 04:37:18.000000000 -0400
@@ -44,14 +44,12 @@ void snd_seq_prioq_delete(struct snd_seq
 int snd_seq_prioq_cell_in(struct snd_seq_prioq *f, struct snd_seq_event_cell *cell);
 
 /* dequeue cell from prioq */ 
-struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f);
+struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f,
+						  void *current_time);
 
 /* return number of events available in prioq */
 int snd_seq_prioq_avail(struct snd_seq_prioq *f);
 
-/* peek at cell at the head of the prioq */
-struct snd_seq_event_cell *snd_seq_prioq_cell_peek(struct snd_seq_prioq *f);
-
 /* client left queue */
 void snd_seq_prioq_leave(struct snd_seq_prioq *f, int client, int timestamp);        
 
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/core/seq/seq_queue.c linux-libre-3.18.101-gnu/sound/core/seq/seq_queue.c
--- linux-libre-3.18.100-gnu/sound/core/seq/seq_queue.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/core/seq/seq_queue.c	2018-03-22 04:37:18.000000000 -0400
@@ -271,30 +271,20 @@ void snd_seq_check_queue(struct snd_seq_
 
       __again:
 	/* Process tick queue... */
-	while ((cell = snd_seq_prioq_cell_peek(q->tickq)) != NULL) {
-		if (snd_seq_compare_tick_time(&q->timer->tick.cur_tick,
-					      &cell->event.time.tick)) {
-			cell = snd_seq_prioq_cell_out(q->tickq);
-			if (cell)
-				snd_seq_dispatch_event(cell, atomic, hop);
-		} else {
-			/* event remains in the queue */
+	for (;;) {
+		cell = snd_seq_prioq_cell_out(q->tickq,
+					      &q->timer->tick.cur_tick);
+		if (!cell)
 			break;
-		}
+		snd_seq_dispatch_event(cell, atomic, hop);
 	}
 
-
 	/* Process time queue... */
-	while ((cell = snd_seq_prioq_cell_peek(q->timeq)) != NULL) {
-		if (snd_seq_compare_real_time(&q->timer->cur_time,
-					      &cell->event.time.time)) {
-			cell = snd_seq_prioq_cell_out(q->timeq);
-			if (cell)
-				snd_seq_dispatch_event(cell, atomic, hop);
-		} else {
-			/* event remains in the queue */
+	for (;;) {
+		cell = snd_seq_prioq_cell_out(q->timeq, &q->timer->cur_time);
+		if (!cell)
 			break;
-		}
+		snd_seq_dispatch_event(cell, atomic, hop);
 	}
 
 	/* free lock */
diff -druNp --no-dereference linux-libre-3.18.100-gnu/sound/soc/nuc900/nuc900-ac97.c linux-libre-3.18.101-gnu/sound/soc/nuc900/nuc900-ac97.c
--- linux-libre-3.18.100-gnu/sound/soc/nuc900/nuc900-ac97.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/sound/soc/nuc900/nuc900-ac97.c	2018-03-22 04:37:18.000000000 -0400
@@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(s
 
 	/* polling the AC_R_FINISH */
 	while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH)
-								&& timeout--)
+								&& --timeout)
 		mdelay(1);
 
 	if (!timeout) {
@@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd
 
 	/* polling the AC_W_FINISH */
 	while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH)
-								&& timeout--)
+								&& --timeout)
 		mdelay(1);
 
 	if (!timeout)
diff -druNp --no-dereference linux-libre-3.18.100-gnu/tools/perf/util/event.c linux-libre-3.18.101-gnu/tools/perf/util/event.c
--- linux-libre-3.18.100-gnu/tools/perf/util/event.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/tools/perf/util/event.c	2018-03-22 04:37:18.000000000 -0400
@@ -167,8 +167,8 @@ int perf_event__synthesize_mmap_events(s
 	if (machine__is_default_guest(machine))
 		return 0;
 
-	snprintf(filename, sizeof(filename), "%s/proc/%d/maps",
-		 machine->root_dir, pid);
+	snprintf(filename, sizeof(filename), "%s/proc/%d/task/%d/maps",
+		 machine->root_dir, pid, pid);
 
 	fp = fopen(filename, "r");
 	if (fp == NULL) {
diff -druNp --no-dereference linux-libre-3.18.100-gnu/tools/perf/util/ordered-events.c linux-libre-3.18.101-gnu/tools/perf/util/ordered-events.c
--- linux-libre-3.18.100-gnu/tools/perf/util/ordered-events.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/tools/perf/util/ordered-events.c	2018-03-22 04:37:18.000000000 -0400
@@ -80,7 +80,7 @@ static union perf_event *dup_event(struc
 
 static void free_dup_event(struct ordered_events *oe, union perf_event *event)
 {
-	if (oe->copy_on_queue) {
+	if (event && oe->copy_on_queue) {
 		oe->cur_alloc_size -= event->header.size;
 		free(event);
 	}
@@ -151,6 +151,7 @@ void ordered_events__delete(struct order
 	list_move(&event->list, &oe->cache);
 	oe->nr_events--;
 	free_dup_event(oe, event->event);
+	event->event = NULL;
 }
 
 static int __ordered_events__flush(struct perf_session *s,
diff -druNp --no-dereference linux-libre-3.18.100-gnu/tools/perf/util/session.c linux-libre-3.18.101-gnu/tools/perf/util/session.c
--- linux-libre-3.18.100-gnu/tools/perf/util/session.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/tools/perf/util/session.c	2018-03-22 04:37:18.000000000 -0400
@@ -108,8 +108,14 @@ struct perf_session *perf_session__new(s
 			if (perf_session__open(session) < 0)
 				goto out_close;
 
-			perf_session__set_id_hdr_size(session);
-			perf_session__set_comm_exec(session);
+			/*
+			 * set session attributes that are present in perf.data
+			 * but not in pipe-mode.
+			 */
+			if (!file->is_pipe) {
+				perf_session__set_id_hdr_size(session);
+				perf_session__set_comm_exec(session);
+			}
 		}
 	}
 
@@ -122,7 +128,11 @@ struct perf_session *perf_session__new(s
 			pr_warning("Cannot read kernel map\n");
 	}
 
-	if (tool && tool->ordering_requires_timestamps &&
+	/*
+	 * In pipe-mode, evlist is empty until PERF_RECORD_HEADER_ATTR is
+	 * processed, so perf_evlist__sample_id_all is not meaningful here.
+	 */
+	if ((!file || !file->is_pipe) && tool && tool->ordering_requires_timestamps &&
 	    tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) {
 		dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
 		tool->ordered_events = false;
@@ -1080,6 +1090,7 @@ static int __perf_session__process_pipe_
 	buf = malloc(cur_size);
 	if (!buf)
 		return -errno;
+	ordered_events__set_copy_on_queue(oe, true);
 more:
 	event = buf;
 	err = readn(fd, event, sizeof(struct perf_event_header));
diff -druNp --no-dereference linux-libre-3.18.100-gnu/tools/testing/selftests/rcutorture/bin/configinit.sh linux-libre-3.18.101-gnu/tools/testing/selftests/rcutorture/bin/configinit.sh
--- linux-libre-3.18.100-gnu/tools/testing/selftests/rcutorture/bin/configinit.sh	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/tools/testing/selftests/rcutorture/bin/configinit.sh	2018-03-22 04:37:18.000000000 -0400
@@ -51,7 +51,7 @@ then
 			mkdir $builddir
 		fi
 	else
-		echo Bad build directory: \"$builddir\"
+		echo Bad build directory: \"$buildloc\"
 		exit 2
 	fi
 fi
diff -druNp --no-dereference linux-libre-3.18.100-gnu/tools/usb/usbip/src/usbipd.c linux-libre-3.18.101-gnu/tools/usb/usbip/src/usbipd.c
--- linux-libre-3.18.100-gnu/tools/usb/usbip/src/usbipd.c	2018-03-18 06:15:45.000000000 -0400
+++ linux-libre-3.18.101-gnu/tools/usb/usbip/src/usbipd.c	2018-03-22 04:37:18.000000000 -0400
@@ -453,7 +453,7 @@ static void set_signal(void)
 	sigaction(SIGTERM, &act, NULL);
 	sigaction(SIGINT, &act, NULL);
 	act.sa_handler = SIG_IGN;
-	sigaction(SIGCLD, &act, NULL);
+	sigaction(SIGCHLD, &act, NULL);
 }
 
 static const char *pid_file;
