diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/arc/include/asm/delay.h linux-libre-3.18.121-gnu/arch/arc/include/asm/delay.h
--- linux-libre-3.18.120-gnu/arch/arc/include/asm/delay.h	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/arc/include/asm/delay.h	2018-09-05 03:16:24.000000000 -0400
@@ -17,8 +17,11 @@
 #ifndef __ASM_ARC_UDELAY_H
 #define __ASM_ARC_UDELAY_H
 
+#include <asm-generic/types.h>
 #include <asm/param.h>		/* HZ */
 
+extern unsigned long loops_per_jiffy;
+
 static inline void __delay(unsigned long loops)
 {
 	__asm__ __volatile__(
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/arc/mm/cache_arc700.c linux-libre-3.18.121-gnu/arch/arc/mm/cache_arc700.c
--- linux-libre-3.18.120-gnu/arch/arc/mm/cache_arc700.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/arc/mm/cache_arc700.c	2018-09-05 03:16:24.000000000 -0400
@@ -642,7 +642,7 @@ void flush_cache_mm(struct mm_struct *mm
 void flush_cache_page(struct vm_area_struct *vma, unsigned long u_vaddr,
 		      unsigned long pfn)
 {
-	unsigned int paddr = pfn << PAGE_SHIFT;
+	phys_addr_t paddr = pfn << PAGE_SHIFT;
 
 	u_vaddr &= PAGE_MASK;
 
@@ -662,8 +662,9 @@ void flush_anon_page(struct vm_area_stru
 		     unsigned long u_vaddr)
 {
 	/* TBD: do we really need to clear the kernel mapping */
-	__flush_dcache_page(page_address(page), u_vaddr);
-	__flush_dcache_page(page_address(page), page_address(page));
+	__flush_dcache_page((phys_addr_t)page_address(page), u_vaddr);
+	__flush_dcache_page((phys_addr_t)page_address(page),
+			    (phys_addr_t)page_address(page));
 
 }
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/arm/kvm/mmu.c linux-libre-3.18.121-gnu/arch/arm/kvm/mmu.c
--- linux-libre-3.18.120-gnu/arch/arm/kvm/mmu.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/arm/kvm/mmu.c	2018-09-05 03:16:24.000000000 -0400
@@ -841,19 +841,35 @@ static int stage2_set_pmd_huge(struct kv
 	pmd = stage2_get_pmd(kvm, cache, addr);
 	VM_BUG_ON(!pmd);
 
-	/*
-	 * Mapping in huge pages should only happen through a fault.  If a
-	 * page is merged into a transparent huge page, the individual
-	 * subpages of that huge page should be unmapped through MMU
-	 * notifiers before we get here.
-	 *
-	 * Merging of CompoundPages is not supported; they should become
-	 * splitting first, unmapped, merged, and mapped back in on-demand.
-	 */
-	VM_BUG_ON(pmd_present(*pmd) && pmd_pfn(*pmd) != pmd_pfn(*new_pmd));
-
 	old_pmd = *pmd;
 	if (pmd_present(old_pmd)) {
+		/*
+		 * Multiple vcpus faulting on the same PMD entry, can
+		 * lead to them sequentially updating the PMD with the
+		 * same value. Following the break-before-make
+		 * (pmd_clear() followed by tlb_flush()) process can
+		 * hinder forward progress due to refaults generated
+		 * on missing translations.
+		 *
+		 * Skip updating the page table if the entry is
+		 * unchanged.
+		 */
+		if (pmd_val(old_pmd) == pmd_val(*new_pmd))
+			return 0;
+
+		/*
+		 * Mapping in huge pages should only happen through a
+		 * fault.  If a page is merged into a transparent huge
+		 * page, the individual subpages of that huge page
+		 * should be unmapped through MMU notifiers before we
+		 * get here.
+		 *
+		 * Merging of CompoundPages is not supported; they
+		 * should become splitting first, unmapped, merged,
+		 * and mapped back in on-demand.
+		 */
+		VM_BUG_ON(pmd_pfn(old_pmd) != pmd_pfn(*new_pmd));
+
 		pmd_clear(pmd);
 		kvm_tlb_flush_vmid_ipa(kvm, addr);
 	} else {
@@ -898,6 +914,10 @@ static int stage2_set_pte(struct kvm *kv
 	/* Create 2nd stage page table mapping - Level 3 */
 	old_pte = *pte;
 	if (pte_present(old_pte)) {
+		/* Skip page table update if there is no change */
+		if (pte_val(old_pte) == pte_val(*new_pte))
+			return 0;
+
 		kvm_set_pte(pte, __pte(0));
 		kvm_tlb_flush_vmid_ipa(kvm, addr);
 	} else {
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/arm64/mm/init.c linux-libre-3.18.121-gnu/arch/arm64/mm/init.c
--- linux-libre-3.18.120-gnu/arch/arm64/mm/init.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/arm64/mm/init.c	2018-09-05 03:16:24.000000000 -0400
@@ -116,7 +116,11 @@ static void __init zone_sizes_init(unsig
 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
 int pfn_valid(unsigned long pfn)
 {
-	return memblock_is_memory(pfn << PAGE_SHIFT);
+	phys_addr_t addr = pfn << PAGE_SHIFT;
+
+	if ((addr >> PAGE_SHIFT) != pfn)
+		return 0;
+	return memblock_is_memory(addr);
 }
 EXPORT_SYMBOL(pfn_valid);
 #endif
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/mips/bcm47xx/setup.c linux-libre-3.18.121-gnu/arch/mips/bcm47xx/setup.c
--- linux-libre-3.18.120-gnu/arch/mips/bcm47xx/setup.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/mips/bcm47xx/setup.c	2018-09-05 03:16:24.000000000 -0400
@@ -269,12 +269,6 @@ static int __init bcm47xx_cpu_fixes(void
 		 */
 		if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
 			cpu_wait = NULL;
-
-		/*
-		 * BCM47XX Erratum "R10: PCIe Transactions Periodically Fail"
-		 * Enable ExternalSync for sync instruction to take effect
-		 */
-		set_c0_config7(MIPS_CONF7_ES);
 		break;
 #endif
 	}
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/mips/include/asm/mipsregs.h linux-libre-3.18.121-gnu/arch/mips/include/asm/mipsregs.h
--- linux-libre-3.18.120-gnu/arch/mips/include/asm/mipsregs.h	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/mips/include/asm/mipsregs.h	2018-09-05 03:16:24.000000000 -0400
@@ -667,8 +667,6 @@
 #define MIPS_CONF7_WII		(_ULCAST_(1) << 31)
 
 #define MIPS_CONF7_RPS		(_ULCAST_(1) << 2)
-/* ExternalSync */
-#define MIPS_CONF7_ES		(_ULCAST_(1) << 8)
 
 #define MIPS_CONF7_IAR		(_ULCAST_(1) << 10)
 #define MIPS_CONF7_AR		(_ULCAST_(1) << 16)
@@ -1865,7 +1863,6 @@ __BUILD_SET_C0(status)
 __BUILD_SET_C0(cause)
 __BUILD_SET_C0(config)
 __BUILD_SET_C0(config5)
-__BUILD_SET_C0(config7)
 __BUILD_SET_C0(intcontrol)
 __BUILD_SET_C0(intctl)
 __BUILD_SET_C0(srsmap)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/mips/include/asm/processor.h linux-libre-3.18.121-gnu/arch/mips/include/asm/processor.h
--- linux-libre-3.18.120-gnu/arch/mips/include/asm/processor.h	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/mips/include/asm/processor.h	2018-09-05 03:16:24.000000000 -0400
@@ -143,7 +143,7 @@ struct mips_fpu_struct {
 
 #define NUM_DSP_REGS   6
 
-typedef __u32 dspreg_t;
+typedef unsigned long dspreg_t;
 
 struct mips_dsp_state {
 	dspreg_t	dspr[NUM_DSP_REGS];
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/mips/kernel/ptrace32.c linux-libre-3.18.121-gnu/arch/mips/kernel/ptrace32.c
--- linux-libre-3.18.120-gnu/arch/mips/kernel/ptrace32.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/mips/kernel/ptrace32.c	2018-09-05 03:16:24.000000000 -0400
@@ -140,7 +140,7 @@ long compat_arch_ptrace(struct task_stru
 				goto out;
 			}
 			dregs = __get_dsp_regs(child);
-			tmp = (unsigned long) (dregs[addr - DSP_BASE]);
+			tmp = dregs[addr - DSP_BASE];
 			break;
 		}
 		case DSP_CONTROL:
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/mips/kernel/ptrace.c linux-libre-3.18.121-gnu/arch/mips/kernel/ptrace.c
--- linux-libre-3.18.120-gnu/arch/mips/kernel/ptrace.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/mips/kernel/ptrace.c	2018-09-05 03:16:24.000000000 -0400
@@ -751,7 +751,7 @@ long arch_ptrace(struct task_struct *chi
 				goto out;
 			}
 			dregs = __get_dsp_regs(child);
-			tmp = (unsigned long) (dregs[addr - DSP_BASE]);
+			tmp = dregs[addr - DSP_BASE];
 			break;
 		}
 		case DSP_CONTROL:
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/s390/include/asm/qdio.h linux-libre-3.18.121-gnu/arch/s390/include/asm/qdio.h
--- linux-libre-3.18.120-gnu/arch/s390/include/asm/qdio.h	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/s390/include/asm/qdio.h	2018-09-05 03:16:24.000000000 -0400
@@ -271,7 +271,6 @@ struct qdio_outbuf_state {
 	void *user;
 };
 
-#define QDIO_OUTBUF_STATE_FLAG_NONE	0x00
 #define QDIO_OUTBUF_STATE_FLAG_PENDING	0x01
 
 #define CHSC_AC1_INITIATE_INPUTQ	0x80
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/s390/mm/fault.c linux-libre-3.18.121-gnu/arch/s390/mm/fault.c
--- linux-libre-3.18.120-gnu/arch/s390/mm/fault.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/s390/mm/fault.c	2018-09-05 03:16:24.000000000 -0400
@@ -494,6 +494,8 @@ retry:
 	/* No reason to continue if interrupted by SIGKILL. */
 	if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
 		fault = VM_FAULT_SIGNAL;
+		if (flags & FAULT_FLAG_RETRY_NOWAIT)
+			goto out_up;
 		goto out;
 	}
 	if (unlikely(fault & VM_FAULT_ERROR))
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/s390/pci/pci.c linux-libre-3.18.121-gnu/arch/s390/pci/pci.c
--- linux-libre-3.18.120-gnu/arch/s390/pci/pci.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/s390/pci/pci.c	2018-09-05 03:16:24.000000000 -0400
@@ -397,6 +397,8 @@ int arch_setup_msi_irqs(struct pci_dev *
 	hwirq = 0;
 	list_for_each_entry(msi, &pdev->msi_list, list) {
 		rc = -EIO;
+		if (hwirq >= msi_vecs)
+			break;
 		irq = irq_alloc_desc(0);	/* Alloc irq on node 0 */
 		if (irq < 0)
 			goto out_msi;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/arch/x86/kernel/process_64.c linux-libre-3.18.121-gnu/arch/x86/kernel/process_64.c
--- linux-libre-3.18.120-gnu/arch/x86/kernel/process_64.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/arch/x86/kernel/process_64.c	2018-09-05 03:16:24.000000000 -0400
@@ -438,6 +438,7 @@ __switch_to(struct task_struct *prev_p,
 
 	return prev_p;
 }
+EXPORT_SYMBOL_GPL(start_thread);
 
 void set_personality_64bit(void)
 {
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/cdrom/cdrom.c linux-libre-3.18.121-gnu/drivers/cdrom/cdrom.c
--- linux-libre-3.18.120-gnu/drivers/cdrom/cdrom.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/cdrom/cdrom.c	2018-09-05 03:16:24.000000000 -0400
@@ -2525,7 +2525,7 @@ static int cdrom_ioctl_drive_status(stru
 	if (!CDROM_CAN(CDC_SELECT_DISC) ||
 	    (arg == CDSL_CURRENT || arg == CDSL_NONE))
 		return cdi->ops->drive_status(cdi, CDSL_CURRENT);
-	if (((int)arg >= cdi->capacity))
+	if (arg >= cdi->capacity)
 		return -EINVAL;
 	return cdrom_slot_status(cdi, arg);
 }
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/gpu/drm/udl/udl_fb.c linux-libre-3.18.121-gnu/drivers/gpu/drm/udl/udl_fb.c
--- linux-libre-3.18.120-gnu/drivers/gpu/drm/udl/udl_fb.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/gpu/drm/udl/udl_fb.c	2018-09-05 03:16:24.000000000 -0400
@@ -341,7 +341,7 @@ static int udl_fb_open(struct fb_info *i
 
 		struct fb_deferred_io *fbdefio;
 
-		fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
+		fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL);
 
 		if (fbdefio) {
 			fbdefio->delay = DL_DEFIO_WRITE_DELAY;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/gpu/drm/udl/udl_main.c linux-libre-3.18.121-gnu/drivers/gpu/drm/udl/udl_main.c
--- linux-libre-3.18.120-gnu/drivers/gpu/drm/udl/udl_main.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/gpu/drm/udl/udl_main.c	2018-09-05 03:16:24.000000000 -0400
@@ -141,18 +141,13 @@ static void udl_free_urb_list(struct drm
 	struct list_head *node;
 	struct urb_node *unode;
 	struct urb *urb;
-	int ret;
 	unsigned long flags;
 
 	DRM_DEBUG("Waiting for completes and freeing all render urbs\n");
 
 	/* keep waiting and freeing, until we've got 'em all */
 	while (count--) {
-
-		/* Getting interrupted means a leak, but ok at shutdown*/
-		ret = down_interruptible(&udl->urbs.limit_sem);
-		if (ret)
-			break;
+		down(&udl->urbs.limit_sem);
 
 		spin_lock_irqsave(&udl->urbs.lock, flags);
 
@@ -176,17 +171,22 @@ static void udl_free_urb_list(struct drm
 static int udl_alloc_urb_list(struct drm_device *dev, int count, size_t size)
 {
 	struct udl_device *udl = dev->dev_private;
-	int i = 0;
 	struct urb *urb;
 	struct urb_node *unode;
 	char *buf;
+	size_t wanted_size = count * size;
 
 	spin_lock_init(&udl->urbs.lock);
 
+retry:
 	udl->urbs.size = size;
 	INIT_LIST_HEAD(&udl->urbs.list);
 
-	while (i < count) {
+	sema_init(&udl->urbs.limit_sem, 0);
+	udl->urbs.count = 0;
+	udl->urbs.available = 0;
+
+	while (udl->urbs.count * size < wanted_size) {
 		unode = kzalloc(sizeof(struct urb_node), GFP_KERNEL);
 		if (!unode)
 			break;
@@ -202,11 +202,16 @@ static int udl_alloc_urb_list(struct drm
 		}
 		unode->urb = urb;
 
-		buf = usb_alloc_coherent(udl->udev, MAX_TRANSFER, GFP_KERNEL,
+		buf = usb_alloc_coherent(udl->udev, size, GFP_KERNEL,
 					 &urb->transfer_dma);
 		if (!buf) {
 			kfree(unode);
 			usb_free_urb(urb);
+			if (size > PAGE_SIZE) {
+				size /= 2;
+				udl_free_urb_list(dev);
+				goto retry;
+			}
 			break;
 		}
 
@@ -217,16 +222,14 @@ static int udl_alloc_urb_list(struct drm
 
 		list_add_tail(&unode->entry, &udl->urbs.list);
 
-		i++;
+		up(&udl->urbs.limit_sem);
+		udl->urbs.count++;
+		udl->urbs.available++;
 	}
 
-	sema_init(&udl->urbs.limit_sem, i);
-	udl->urbs.count = i;
-	udl->urbs.available = i;
-
-	DRM_DEBUG("allocated %d %d byte urbs\n", i, (int) size);
+	DRM_DEBUG("allocated %d %d byte urbs\n", udl->urbs.count, (int) size);
 
-	return i;
+	return udl->urbs.count;
 }
 
 struct urb *udl_get_urb(struct drm_device *dev)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/can/mscan/mpc5xxx_can.c linux-libre-3.18.121-gnu/drivers/net/can/mscan/mpc5xxx_can.c
--- linux-libre-3.18.120-gnu/drivers/net/can/mscan/mpc5xxx_can.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/can/mscan/mpc5xxx_can.c	2018-09-05 03:16:24.000000000 -0400
@@ -86,6 +86,11 @@ static u32 mpc52xx_can_get_clock(struct
 		return 0;
 	}
 	cdm = of_iomap(np_cdm, 0);
+	if (!cdm) {
+		of_node_put(np_cdm);
+		dev_err(&ofdev->dev, "can't map clock node!\n");
+		return 0;
+	}
 
 	if (in_8(&cdm->ipb_clk_sel) & 0x1)
 		freq *= 2;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/ethernet/atheros/atl1c/atl1c_main.c linux-libre-3.18.121-gnu/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
--- linux-libre-3.18.120-gnu/drivers/net/ethernet/atheros/atl1c/atl1c_main.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/ethernet/atheros/atl1c/atl1c_main.c	2018-09-05 03:16:24.000000000 -0400
@@ -1674,6 +1674,7 @@ static struct sk_buff *atl1c_alloc_skb(s
 	skb = build_skb(page_address(page) + adapter->rx_page_offset,
 			adapter->rx_frag_size);
 	if (likely(skb)) {
+		skb_reserve(skb, NET_SKB_PAD);
 		adapter->rx_page_offset += adapter->rx_frag_size;
 		if (adapter->rx_page_offset >= PAGE_SIZE)
 			adapter->rx_page = NULL;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c linux-libre-3.18.121-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
--- linux-libre-3.18.120-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c	2018-09-05 03:16:24.000000000 -0400
@@ -3296,14 +3296,18 @@ static int bnx2x_set_rss_flags(struct bn
 			DP(BNX2X_MSG_ETHTOOL,
 			   "rss re-configured, UDP 4-tupple %s\n",
 			   udp_rss_requested ? "enabled" : "disabled");
-			return bnx2x_rss(bp, &bp->rss_conf_obj, false, true);
+			if (bp->state == BNX2X_STATE_OPEN)
+				return bnx2x_rss(bp, &bp->rss_conf_obj, false,
+						 true);
 		} else if ((info->flow_type == UDP_V6_FLOW) &&
 			   (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) {
 			bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested;
 			DP(BNX2X_MSG_ETHTOOL,
 			   "rss re-configured, UDP 4-tupple %s\n",
 			   udp_rss_requested ? "enabled" : "disabled");
-			return bnx2x_rss(bp, &bp->rss_conf_obj, false, true);
+			if (bp->state == BNX2X_STATE_OPEN)
+				return bnx2x_rss(bp, &bp->rss_conf_obj, false,
+						 true);
 		}
 		return 0;
 
@@ -3401,7 +3405,10 @@ static int bnx2x_set_rxfh(struct net_dev
 		bp->rss_conf_obj.ind_table[i] = indir[i] + bp->fp->cl_id;
 	}
 
-	return bnx2x_config_rss_eth(bp, false);
+	if (bp->state == BNX2X_STATE_OPEN)
+		return bnx2x_config_rss_eth(bp, false);
+
+	return 0;
 }
 
 /**
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/ethernet/cisco/enic/enic_main.c linux-libre-3.18.121-gnu/drivers/net/ethernet/cisco/enic/enic_main.c
--- linux-libre-3.18.120-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/ethernet/cisco/enic/enic_main.c	2018-09-05 03:16:24.000000000 -0400
@@ -1717,10 +1717,32 @@ static int enic_stop(struct net_device *
 	return 0;
 }
 
+static int _enic_change_mtu(struct net_device *netdev, int new_mtu)
+{
+	bool running = netif_running(netdev);
+	int err = 0;
+
+	ASSERT_RTNL();
+	if (running) {
+		err = enic_stop(netdev);
+		if (err)
+			return err;
+	}
+
+	netdev->mtu = new_mtu;
+
+	if (running) {
+		err = enic_open(netdev);
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
 static int enic_change_mtu(struct net_device *netdev, int new_mtu)
 {
 	struct enic *enic = netdev_priv(netdev);
-	int running = netif_running(netdev);
 
 	if (new_mtu < ENIC_MIN_MTU || new_mtu > ENIC_MAX_MTU)
 		return -EINVAL;
@@ -1728,20 +1750,12 @@ static int enic_change_mtu(struct net_de
 	if (enic_is_dynamic(enic) || enic_is_sriov_vf(enic))
 		return -EOPNOTSUPP;
 
-	if (running)
-		enic_stop(netdev);
-
-	netdev->mtu = new_mtu;
-
 	if (netdev->mtu > enic->port_mtu)
 		netdev_warn(netdev,
-			"interface MTU (%d) set higher than port MTU (%d)\n",
-			netdev->mtu, enic->port_mtu);
-
-	if (running)
-		enic_open(netdev);
+			    "interface MTU (%d) set higher than port MTU (%d)\n",
+			    netdev->mtu, enic->port_mtu);
 
-	return 0;
+	return _enic_change_mtu(netdev, new_mtu);
 }
 
 static void enic_change_mtu_work(struct work_struct *work)
@@ -1749,47 +1763,9 @@ static void enic_change_mtu_work(struct
 	struct enic *enic = container_of(work, struct enic, change_mtu_work);
 	struct net_device *netdev = enic->netdev;
 	int new_mtu = vnic_dev_mtu(enic->vdev);
-	int err;
-	unsigned int i;
-
-	new_mtu = max_t(int, ENIC_MIN_MTU, min_t(int, ENIC_MAX_MTU, new_mtu));
 
 	rtnl_lock();
-
-	/* Stop RQ */
-	del_timer_sync(&enic->notify_timer);
-
-	for (i = 0; i < enic->rq_count; i++)
-		napi_disable(&enic->napi[i]);
-
-	vnic_intr_mask(&enic->intr[0]);
-	enic_synchronize_irqs(enic);
-	err = vnic_rq_disable(&enic->rq[0]);
-	if (err) {
-		rtnl_unlock();
-		netdev_err(netdev, "Unable to disable RQ.\n");
-		return;
-	}
-	vnic_rq_clean(&enic->rq[0], enic_free_rq_buf);
-	vnic_cq_clean(&enic->cq[0]);
-	vnic_intr_clean(&enic->intr[0]);
-
-	/* Fill RQ with new_mtu-sized buffers */
-	netdev->mtu = new_mtu;
-	vnic_rq_fill(&enic->rq[0], enic_rq_alloc_buf);
-	/* Need at least one buffer on ring to get going */
-	if (vnic_rq_desc_used(&enic->rq[0]) == 0) {
-		rtnl_unlock();
-		netdev_err(netdev, "Unable to alloc receive buffers.\n");
-		return;
-	}
-
-	/* Start RQ */
-	vnic_rq_enable(&enic->rq[0]);
-	napi_enable(&enic->napi[0]);
-	vnic_intr_unmask(&enic->intr[0]);
-	enic_notify_timer_start(enic);
-
+	(void)_enic_change_mtu(netdev, new_mtu);
 	rtnl_unlock();
 
 	netdev_info(netdev, "interface MTU set as %d\n", netdev->mtu);
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c linux-libre-3.18.121-gnu/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
--- linux-libre-3.18.120-gnu/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c	2018-09-05 03:16:24.000000000 -0400
@@ -219,6 +219,7 @@ issue:
 	ret = of_mdiobus_register(bus, np1);
 	if (ret) {
 		mdiobus_free(bus);
+		lp->mii_bus = NULL;
 		return ret;
 	}
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/net/wan/lmc/lmc_main.c linux-libre-3.18.121-gnu/drivers/net/wan/lmc/lmc_main.c
--- linux-libre-3.18.120-gnu/drivers/net/wan/lmc/lmc_main.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/net/wan/lmc/lmc_main.c	2018-09-05 03:16:24.000000000 -0400
@@ -1384,7 +1384,7 @@ static irqreturn_t lmc_interrupt (int ir
             case 0x001:
                 printk(KERN_WARNING "%s: Master Abort (naughty)\n", dev->name);
                 break;
-            case 0x010:
+            case 0x002:
                 printk(KERN_WARNING "%s: Target Abort (not so naughty)\n", dev->name);
                 break;
             default:
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/pinctrl/freescale/pinctrl-imx1-core.c linux-libre-3.18.121-gnu/drivers/pinctrl/freescale/pinctrl-imx1-core.c
--- linux-libre-3.18.120-gnu/drivers/pinctrl/freescale/pinctrl-imx1-core.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/pinctrl/freescale/pinctrl-imx1-core.c	2018-09-05 03:16:24.000000000 -0400
@@ -435,7 +435,7 @@ static void imx1_pinconf_group_dbg_show(
 	const char *name;
 	int i, ret;
 
-	if (group > info->ngroups)
+	if (group >= info->ngroups)
 		return;
 
 	seq_puts(s, "\n");
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/s390/cio/qdio_main.c linux-libre-3.18.121-gnu/drivers/s390/cio/qdio_main.c
--- linux-libre-3.18.120-gnu/drivers/s390/cio/qdio_main.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/s390/cio/qdio_main.c	2018-09-05 03:16:24.000000000 -0400
@@ -640,21 +640,20 @@ static inline unsigned long qdio_aob_for
 	unsigned long phys_aob = 0;
 
 	if (!q->use_cq)
-		goto out;
+		return 0;
 
 	if (!q->aobs[bufnr]) {
 		struct qaob *aob = qdio_allocate_aob();
 		q->aobs[bufnr] = aob;
 	}
 	if (q->aobs[bufnr]) {
-		q->sbal_state[bufnr].flags = QDIO_OUTBUF_STATE_FLAG_NONE;
 		q->sbal_state[bufnr].aob = q->aobs[bufnr];
 		q->aobs[bufnr]->user1 = (u64) q->sbal_state[bufnr].user;
 		phys_aob = virt_to_phys(q->aobs[bufnr]);
 		WARN_ON_ONCE(phys_aob & 0xFF);
 	}
 
-out:
+	q->sbal_state[bufnr].flags = 0;
 	return phys_aob;
 }
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/scsi/fcoe/fcoe_ctlr.c linux-libre-3.18.121-gnu/drivers/scsi/fcoe/fcoe_ctlr.c
--- linux-libre-3.18.120-gnu/drivers/scsi/fcoe/fcoe_ctlr.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/scsi/fcoe/fcoe_ctlr.c	2018-09-05 03:16:24.000000000 -0400
@@ -752,9 +752,9 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr
 	case ELS_LOGO:
 		if (fip->mode == FIP_MODE_VN2VN) {
 			if (fip->state != FIP_ST_VNMP_UP)
-				return -EINVAL;
+				goto drop;
 			if (ntoh24(fh->fh_d_id) == FC_FID_FLOGI)
-				return -EINVAL;
+				goto drop;
 		} else {
 			if (fip->state != FIP_ST_ENABLED)
 				return 0;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/scsi/libiscsi.c linux-libre-3.18.121-gnu/drivers/scsi/libiscsi.c
--- linux-libre-3.18.120-gnu/drivers/scsi/libiscsi.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/scsi/libiscsi.c	2018-09-05 03:16:24.000000000 -0400
@@ -283,11 +283,11 @@ static int iscsi_check_tmf_restrictions(
 		 */
 		if (opcode != ISCSI_OP_SCSI_DATA_OUT) {
 			iscsi_conn_printk(KERN_INFO, conn,
-					  "task [op %x/%x itt "
+					  "task [op %x itt "
 					  "0x%x/0x%x] "
 					  "rejected.\n",
-					  task->hdr->opcode, opcode,
-					  task->itt, task->hdr_itt);
+					  opcode, task->itt,
+					  task->hdr_itt);
 			return -EACCES;
 		}
 		/*
@@ -296,10 +296,10 @@ static int iscsi_check_tmf_restrictions(
 		 */
 		if (conn->session->fast_abort) {
 			iscsi_conn_printk(KERN_INFO, conn,
-					  "task [op %x/%x itt "
+					  "task [op %x itt "
 					  "0x%x/0x%x] fast abort.\n",
-					  task->hdr->opcode, opcode,
-					  task->itt, task->hdr_itt);
+					  opcode, task->itt,
+					  task->hdr_itt);
 			return -EACCES;
 		}
 		break;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/scsi/scsi_sysfs.c linux-libre-3.18.121-gnu/drivers/scsi/scsi_sysfs.c
--- linux-libre-3.18.120-gnu/drivers/scsi/scsi_sysfs.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/scsi/scsi_sysfs.c	2018-09-05 03:16:24.000000000 -0400
@@ -676,8 +676,24 @@ static ssize_t
 sdev_store_delete(struct device *dev, struct device_attribute *attr,
 		  const char *buf, size_t count)
 {
-	if (device_remove_file_self(dev, attr))
-		scsi_remove_device(to_scsi_device(dev));
+	struct kernfs_node *kn;
+
+	kn = sysfs_break_active_protection(&dev->kobj, &attr->attr);
+	WARN_ON_ONCE(!kn);
+	/*
+	 * Concurrent writes into the "delete" sysfs attribute may trigger
+	 * concurrent calls to device_remove_file() and scsi_remove_device().
+	 * device_remove_file() handles concurrent removal calls by
+	 * serializing these and by ignoring the second and later removal
+	 * attempts.  Concurrent calls of scsi_remove_device() are
+	 * serialized. The second and later calls of scsi_remove_device() are
+	 * ignored because the first call of that function changes the device
+	 * state into SDEV_DEL.
+	 */
+	device_remove_file(dev, attr);
+	scsi_remove_device(to_scsi_device(dev));
+	if (kn)
+		sysfs_unbreak_active_protection(kn);
 	return count;
 };
 static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete);
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/scsi/vmw_pvscsi.c linux-libre-3.18.121-gnu/drivers/scsi/vmw_pvscsi.c
--- linux-libre-3.18.120-gnu/drivers/scsi/vmw_pvscsi.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/scsi/vmw_pvscsi.c	2018-09-05 03:16:24.000000000 -0400
@@ -567,9 +567,14 @@ static void pvscsi_complete_request(stru
 	    (btstat == BTSTAT_SUCCESS ||
 	     btstat == BTSTAT_LINKED_COMMAND_COMPLETED ||
 	     btstat == BTSTAT_LINKED_COMMAND_COMPLETED_WITH_FLAG)) {
-		cmd->result = (DID_OK << 16) | sdstat;
-		if (sdstat == SAM_STAT_CHECK_CONDITION && cmd->sense_buffer)
-			cmd->result |= (DRIVER_SENSE << 24);
+		if (sdstat == SAM_STAT_COMMAND_TERMINATED) {
+			cmd->result = (DID_RESET << 16);
+		} else {
+			cmd->result = (DID_OK << 16) | sdstat;
+			if (sdstat == SAM_STAT_CHECK_CONDITION &&
+			    cmd->sense_buffer)
+				cmd->result |= (DRIVER_SENSE << 24);
+		}
 	} else
 		switch (btstat) {
 		case BTSTAT_SUCCESS:
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/staging/imx-drm/imx-ldb.c linux-libre-3.18.121-gnu/drivers/staging/imx-drm/imx-ldb.c
--- linux-libre-3.18.120-gnu/drivers/staging/imx-drm/imx-ldb.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/staging/imx-drm/imx-ldb.c	2018-09-05 03:16:24.000000000 -0400
@@ -460,6 +460,9 @@ static int imx_ldb_bind(struct device *d
 		return PTR_ERR(imx_ldb->regmap);
 	}
 
+	/* disable LDB by resetting the control register to POR default */
+	regmap_write(imx_ldb->regmap, IOMUXC_GPR2, 0);
+
 	imx_ldb->dev = dev;
 
 	if (of_id)
@@ -497,14 +500,14 @@ static int imx_ldb_bind(struct device *d
 		if (ret || i < 0 || i > 1)
 			return -EINVAL;
 
+		if (!of_device_is_available(child))
+			continue;
+
 		if (dual && i > 0) {
 			dev_warn(dev, "dual-channel mode, ignoring second output\n");
 			continue;
 		}
 
-		if (!of_device_is_available(child))
-			continue;
-
 		channel = &imx_ldb->channel[i];
 		channel->ldb = imx_ldb;
 		channel->chno = i;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/staging/media/omap4iss/iss_video.c linux-libre-3.18.121-gnu/drivers/staging/media/omap4iss/iss_video.c
--- linux-libre-3.18.120-gnu/drivers/staging/media/omap4iss/iss_video.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/staging/media/omap4iss/iss_video.c	2018-09-05 03:16:24.000000000 -0400
@@ -11,7 +11,6 @@
  * (at your option) any later version.
  */
 
-#include <asm/cacheflush.h>
 #include <linux/clk.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
@@ -22,6 +21,8 @@
 #include <media/v4l2-dev.h>
 #include <media/v4l2-ioctl.h>
 
+#include <asm/cacheflush.h>
+
 #include "iss_video.h"
 #include "iss.h"
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/usb/gadget/function/f_uac2.c linux-libre-3.18.121-gnu/drivers/usb/gadget/function/f_uac2.c
--- linux-libre-3.18.120-gnu/drivers/usb/gadget/function/f_uac2.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/usb/gadget/function/f_uac2.c	2018-09-05 03:16:24.000000000 -0400
@@ -941,14 +941,14 @@ static struct usb_descriptor_header *hs_
 };
 
 struct cntrl_cur_lay3 {
-	__u32	dCUR;
+	__le32	dCUR;
 };
 
 struct cntrl_range_lay3 {
-	__u16	wNumSubRanges;
-	__u32	dMIN;
-	__u32	dMAX;
-	__u32	dRES;
+	__le16	wNumSubRanges;
+	__le32	dMIN;
+	__le32	dMAX;
+	__le32	dRES;
 } __packed;
 
 static inline void
@@ -1274,9 +1274,9 @@ in_rq_cur(struct usb_function *fn, const
 		struct cntrl_cur_lay3 c;
 
 		if (entity_id == USB_IN_CLK_ID)
-			c.dCUR = p_srate;
+			c.dCUR = cpu_to_le32(p_srate);
 		else if (entity_id == USB_OUT_CLK_ID)
-			c.dCUR = c_srate;
+			c.dCUR = cpu_to_le32(c_srate);
 
 		value = min_t(unsigned, w_length, sizeof c);
 		memcpy(req->buf, &c, value);
@@ -1314,15 +1314,15 @@ in_rq_range(struct usb_function *fn, con
 
 	if (control_selector == UAC2_CS_CONTROL_SAM_FREQ) {
 		if (entity_id == USB_IN_CLK_ID)
-			r.dMIN = p_srate;
+			r.dMIN = cpu_to_le32(p_srate);
 		else if (entity_id == USB_OUT_CLK_ID)
-			r.dMIN = c_srate;
+			r.dMIN = cpu_to_le32(c_srate);
 		else
 			return -EOPNOTSUPP;
 
 		r.dMAX = r.dMIN;
 		r.dRES = 0;
-		r.wNumSubRanges = 1;
+		r.wNumSubRanges = cpu_to_le16(1);
 
 		value = min_t(unsigned, w_length, sizeof r);
 		memcpy(req->buf, &r, value);
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/usb/gadget/udc/r8a66597-udc.c linux-libre-3.18.121-gnu/drivers/usb/gadget/udc/r8a66597-udc.c
--- linux-libre-3.18.120-gnu/drivers/usb/gadget/udc/r8a66597-udc.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/usb/gadget/udc/r8a66597-udc.c	2018-09-05 03:16:24.000000000 -0400
@@ -835,11 +835,11 @@ static void init_controller(struct r8a66
 
 		r8a66597_bset(r8a66597, XCKE, SYSCFG0);
 
-		msleep(3);
+		mdelay(3);
 
 		r8a66597_bset(r8a66597, PLLC, SYSCFG0);
 
-		msleep(1);
+		mdelay(1);
 
 		r8a66597_bset(r8a66597, SCKE, SYSCFG0);
 
@@ -1193,7 +1193,7 @@ __acquires(r8a66597->lock)
 	r8a66597->ep0_req->length = 2;
 	/* AV: what happens if we get called again before that gets through? */
 	spin_unlock(&r8a66597->lock);
-	r8a66597_queue(r8a66597->gadget.ep0, r8a66597->ep0_req, GFP_KERNEL);
+	r8a66597_queue(r8a66597->gadget.ep0, r8a66597->ep0_req, GFP_ATOMIC);
 	spin_lock(&r8a66597->lock);
 }
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/drivers/usb/phy/phy-fsl-usb.c linux-libre-3.18.121-gnu/drivers/usb/phy/phy-fsl-usb.c
--- linux-libre-3.18.120-gnu/drivers/usb/phy/phy-fsl-usb.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/drivers/usb/phy/phy-fsl-usb.c	2018-09-05 03:16:24.000000000 -0400
@@ -913,6 +913,7 @@ int usb_otg_start(struct platform_device
 	if (pdata->init && pdata->init(pdev) != 0)
 		return -EINVAL;
 
+#ifdef CONFIG_PPC32
 	if (pdata->big_endian_mmio) {
 		_fsl_readl = _fsl_readl_be;
 		_fsl_writel = _fsl_writel_be;
@@ -920,6 +921,7 @@ int usb_otg_start(struct platform_device
 		_fsl_readl = _fsl_readl_le;
 		_fsl_writel = _fsl_writel_le;
 	}
+#endif
 
 	/* request irq */
 	p_otg->irq = platform_get_irq(pdev, 0);
@@ -1010,7 +1012,7 @@ int usb_otg_start(struct platform_device
 /*
  * state file in sysfs
  */
-static int show_fsl_usb2_otg_state(struct device *dev,
+static ssize_t show_fsl_usb2_otg_state(struct device *dev,
 				   struct device_attribute *attr, char *buf)
 {
 	struct otg_fsm *fsm = &fsl_otg_dev->fsm;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/btrfs/extent-tree.c linux-libre-3.18.121-gnu/fs/btrfs/extent-tree.c
--- linux-libre-3.18.120-gnu/fs/btrfs/extent-tree.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/btrfs/extent-tree.c	2018-09-05 03:16:24.000000000 -0400
@@ -4281,7 +4281,7 @@ static int flush_space(struct btrfs_root
 		break;
 	}
 
-	return ret;
+	return 0;
 }
 
 static inline u64
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/cachefiles/namei.c linux-libre-3.18.121-gnu/fs/cachefiles/namei.c
--- linux-libre-3.18.120-gnu/fs/cachefiles/namei.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/cachefiles/namei.c	2018-09-05 03:16:24.000000000 -0400
@@ -193,7 +193,6 @@ wait_for_old_object:
 		pr_err("\n");
 		pr_err("Error: Unexpected object collision\n");
 		cachefiles_printk_object(object, xobject);
-		BUG();
 	}
 	atomic_inc(&xobject->usage);
 	write_unlock(&cache->active_lock);
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/cachefiles/rdwr.c linux-libre-3.18.121-gnu/fs/cachefiles/rdwr.c
--- linux-libre-3.18.120-gnu/fs/cachefiles/rdwr.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/cachefiles/rdwr.c	2018-09-05 03:16:24.000000000 -0400
@@ -27,6 +27,7 @@ static int cachefiles_read_waiter(wait_q
 	struct cachefiles_one_read *monitor =
 		container_of(wait, struct cachefiles_one_read, monitor);
 	struct cachefiles_object *object;
+	struct fscache_retrieval *op = monitor->op;
 	struct wait_bit_key *key = _key;
 	struct page *page = wait->private;
 
@@ -51,16 +52,22 @@ static int cachefiles_read_waiter(wait_q
 	list_del(&wait->task_list);
 
 	/* move onto the action list and queue for FS-Cache thread pool */
-	ASSERT(monitor->op);
+	ASSERT(op);
 
-	object = container_of(monitor->op->op.object,
-			      struct cachefiles_object, fscache);
+	/* We need to temporarily bump the usage count as we don't own a ref
+	 * here otherwise cachefiles_read_copier() may free the op between the
+	 * monitor being enqueued on the op->to_do list and the op getting
+	 * enqueued on the work queue.
+	 */
+	fscache_get_retrieval(op);
 
+	object = container_of(op->op.object, struct cachefiles_object, fscache);
 	spin_lock(&object->work_lock);
-	list_add_tail(&monitor->op_link, &monitor->op->to_do);
+	list_add_tail(&monitor->op_link, &op->to_do);
 	spin_unlock(&object->work_lock);
 
-	fscache_enqueue_retrieval(monitor->op);
+	fscache_enqueue_retrieval(op);
+	fscache_put_retrieval(op);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/ext4/namei.c linux-libre-3.18.121-gnu/fs/ext4/namei.c
--- linux-libre-3.18.120-gnu/fs/ext4/namei.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/ext4/namei.c	2018-09-05 03:16:24.000000000 -0400
@@ -1242,6 +1242,7 @@ static struct buffer_head * ext4_find_en
 			return bh;
 		dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, "
 			       "falling back\n"));
+		ret = NULL;
 	}
 	nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
 	if (!nblocks) {
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/fscache/operation.c linux-libre-3.18.121-gnu/fs/fscache/operation.c
--- linux-libre-3.18.120-gnu/fs/fscache/operation.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/fscache/operation.c	2018-09-05 03:16:24.000000000 -0400
@@ -37,7 +37,8 @@ void fscache_enqueue_operation(struct fs
 	ASSERT(op->processor != NULL);
 	ASSERT(fscache_object_is_available(op->object));
 	ASSERTCMP(atomic_read(&op->usage), >, 0);
-	ASSERTCMP(op->state, ==, FSCACHE_OP_ST_IN_PROGRESS);
+	ASSERTIFCMP(op->state != FSCACHE_OP_ST_IN_PROGRESS,
+		    op->state, ==,  FSCACHE_OP_ST_CANCELLED);
 
 	fscache_stat(&fscache_n_op_enqueue);
 	switch (op->flags & FSCACHE_OP_TYPE) {
@@ -401,7 +402,8 @@ void fscache_put_operation(struct fscach
 	struct fscache_cache *cache;
 
 	_enter("{OBJ%x OP%x,%d}",
-	       op->object->debug_id, op->debug_id, atomic_read(&op->usage));
+	       op->object ? op->object->debug_id : 0,
+	       op->debug_id, atomic_read(&op->usage));
 
 	ASSERTCMP(atomic_read(&op->usage), >, 0);
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/fuse/dev.c linux-libre-3.18.121-gnu/fs/fuse/dev.c
--- linux-libre-3.18.120-gnu/fs/fuse/dev.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/fuse/dev.c	2018-09-05 03:16:24.000000000 -0400
@@ -1913,11 +1913,14 @@ static ssize_t fuse_dev_splice_write(str
 	if (!fc)
 		return -EPERM;
 
+	pipe_lock(pipe);
+
 	bufs = kmalloc(pipe->buffers * sizeof(struct pipe_buffer), GFP_KERNEL);
-	if (!bufs)
+	if (!bufs) {
+		pipe_unlock(pipe);
 		return -ENOMEM;
+	}
 
-	pipe_lock(pipe);
 	nbuf = 0;
 	rem = 0;
 	for (idx = 0; idx < pipe->nrbufs && rem < len; idx++)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/fuse/file.c linux-libre-3.18.121-gnu/fs/fuse/file.c
--- linux-libre-3.18.120-gnu/fs/fuse/file.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/fuse/file.c	2018-09-05 03:16:24.000000000 -0400
@@ -910,6 +910,7 @@ static int fuse_readpages_fill(void *_da
 	}
 
 	if (WARN_ON(req->num_pages >= req->max_pages)) {
+		unlock_page(page);
 		fuse_put_request(fc, req);
 		return -EIO;
 	}
diff -druNp --no-dereference linux-libre-3.18.120-gnu/fs/sysfs/file.c linux-libre-3.18.121-gnu/fs/sysfs/file.c
--- linux-libre-3.18.120-gnu/fs/sysfs/file.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/fs/sysfs/file.c	2018-09-05 03:16:24.000000000 -0400
@@ -357,6 +357,50 @@ int sysfs_chmod_file(struct kobject *kob
 EXPORT_SYMBOL_GPL(sysfs_chmod_file);
 
 /**
+ * sysfs_break_active_protection - break "active" protection
+ * @kobj: The kernel object @attr is associated with.
+ * @attr: The attribute to break the "active" protection for.
+ *
+ * With sysfs, just like kernfs, deletion of an attribute is postponed until
+ * all active .show() and .store() callbacks have finished unless this function
+ * is called. Hence this function is useful in methods that implement self
+ * deletion.
+ */
+struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
+						  const struct attribute *attr)
+{
+	struct kernfs_node *kn;
+
+	kobject_get(kobj);
+	kn = kernfs_find_and_get(kobj->sd, attr->name);
+	if (kn)
+		kernfs_break_active_protection(kn);
+	return kn;
+}
+EXPORT_SYMBOL_GPL(sysfs_break_active_protection);
+
+/**
+ * sysfs_unbreak_active_protection - restore "active" protection
+ * @kn: Pointer returned by sysfs_break_active_protection().
+ *
+ * Undo the effects of sysfs_break_active_protection(). Since this function
+ * calls kernfs_put() on the kernfs node that corresponds to the 'attr'
+ * argument passed to sysfs_break_active_protection() that attribute may have
+ * been removed between the sysfs_break_active_protection() and
+ * sysfs_unbreak_active_protection() calls, it is not safe to access @kn after
+ * this function has returned.
+ */
+void sysfs_unbreak_active_protection(struct kernfs_node *kn)
+{
+	struct kobject *kobj = kn->parent->priv;
+
+	kernfs_unbreak_active_protection(kn);
+	kernfs_put(kn);
+	kobject_put(kobj);
+}
+EXPORT_SYMBOL_GPL(sysfs_unbreak_active_protection);
+
+/**
  * sysfs_remove_file_ns - remove an object attribute with a custom ns tag
  * @kobj: object we're acting for
  * @attr: attribute descriptor
diff -druNp --no-dereference linux-libre-3.18.120-gnu/include/linux/sysfs.h linux-libre-3.18.121-gnu/include/linux/sysfs.h
--- linux-libre-3.18.120-gnu/include/linux/sysfs.h	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/include/linux/sysfs.h	2018-09-05 03:16:24.000000000 -0400
@@ -200,6 +200,9 @@ int __must_check sysfs_create_files(stru
 				   const struct attribute **attr);
 int __must_check sysfs_chmod_file(struct kobject *kobj,
 				  const struct attribute *attr, umode_t mode);
+struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
+						  const struct attribute *attr);
+void sysfs_unbreak_active_protection(struct kernfs_node *kn);
 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
 			  const void *ns);
 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
@@ -299,6 +302,17 @@ static inline int sysfs_chmod_file(struc
 	return 0;
 }
 
+static inline struct kernfs_node *
+sysfs_break_active_protection(struct kobject *kobj,
+			      const struct attribute *attr)
+{
+	return NULL;
+}
+
+static inline void sysfs_unbreak_active_protection(struct kernfs_node *kn)
+{
+}
+
 static inline void sysfs_remove_file_ns(struct kobject *kobj,
 					const struct attribute *attr,
 					const void *ns)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/kernel/kprobes.c linux-libre-3.18.121-gnu/kernel/kprobes.c
--- linux-libre-3.18.120-gnu/kernel/kprobes.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/kernel/kprobes.c	2018-09-05 03:16:24.000000000 -0400
@@ -2425,7 +2425,7 @@ static int __init debugfs_kprobe_init(vo
 	if (!dir)
 		return -ENOMEM;
 
-	file = debugfs_create_file("list", 0444, dir, NULL,
+	file = debugfs_create_file("list", 0400, dir, NULL,
 				&debugfs_kprobes_operations);
 	if (!file)
 		goto error;
@@ -2435,7 +2435,7 @@ static int __init debugfs_kprobe_init(vo
 	if (!file)
 		goto error;
 
-	file = debugfs_create_file("blacklist", 0444, dir, NULL,
+	file = debugfs_create_file("blacklist", 0400, dir, NULL,
 				&debugfs_kprobe_blacklist_ops);
 	if (!file)
 		goto error;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/kernel/sysctl.c linux-libre-3.18.121-gnu/kernel/sysctl.c
--- linux-libre-3.18.120-gnu/kernel/sysctl.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/kernel/sysctl.c	2018-09-05 03:16:24.000000000 -0400
@@ -341,7 +341,8 @@ static struct ctl_table kern_table[] = {
 		.data		= &sysctl_sched_time_avg,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1		= &one,
 	},
 	{
 		.procname	= "sched_shares_window_ns",
diff -druNp --no-dereference linux-libre-3.18.120-gnu/Makefile linux-libre-3.18.121-gnu/Makefile
--- linux-libre-3.18.120-gnu/Makefile	2018-08-29 03:54:13.000000000 -0400
+++ linux-libre-3.18.121-gnu/Makefile	2018-09-06 20:09:36.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 120
+SUBLEVEL = 121
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.120-gnu/mm/memory.c linux-libre-3.18.121-gnu/mm/memory.c
--- linux-libre-3.18.120-gnu/mm/memory.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/mm/memory.c	2018-09-05 03:16:24.000000000 -0400
@@ -3522,6 +3522,9 @@ int generic_access_phys(struct vm_area_s
 		return -EINVAL;
 
 	maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot);
+	if (!maddr)
+		return -ENOMEM;
+
 	if (write)
 		memcpy_toio(maddr + offset, buf, len);
 	else
diff -druNp --no-dereference linux-libre-3.18.120-gnu/mm/zswap.c linux-libre-3.18.121-gnu/mm/zswap.c
--- linux-libre-3.18.120-gnu/mm/zswap.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/mm/zswap.c	2018-09-05 03:16:24.000000000 -0400
@@ -662,6 +662,15 @@ static int zswap_frontswap_store(unsigne
 			ret = -ENOMEM;
 			goto reject;
 		}
+
+		/* A second zswap_is_full() check after
+		 * zswap_shrink() to make sure it's now
+		 * under the max_pool_percent
+		 */
+		if (zswap_is_full()) {
+			ret = -ENOMEM;
+			goto reject;
+		}
 	}
 
 	/* allocate entry */
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/caif/caif_dev.c linux-libre-3.18.121-gnu/net/caif/caif_dev.c
--- linux-libre-3.18.120-gnu/net/caif/caif_dev.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/caif/caif_dev.c	2018-09-05 03:16:24.000000000 -0400
@@ -131,8 +131,10 @@ static void caif_flow_cb(struct sk_buff
 	caifd = caif_get(skb->dev);
 
 	WARN_ON(caifd == NULL);
-	if (caifd == NULL)
+	if (!caifd) {
+		rcu_read_unlock();
 		return;
+	}
 
 	caifd_hold(caifd);
 	rcu_read_unlock();
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/ipv4/cipso_ipv4.c linux-libre-3.18.121-gnu/net/ipv4/cipso_ipv4.c
--- linux-libre-3.18.120-gnu/net/ipv4/cipso_ipv4.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/ipv4/cipso_ipv4.c	2018-09-05 03:16:24.000000000 -0400
@@ -1591,9 +1591,17 @@ unsigned char *cipso_v4_optptr(const str
 	int taglen;
 
 	for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) {
-		if (optptr[0] == IPOPT_CIPSO)
+		switch (optptr[0]) {
+		case IPOPT_CIPSO:
 			return optptr;
-		taglen = optptr[1];
+		case IPOPT_END:
+			return NULL;
+		case IPOPT_NOOP:
+			taglen = 1;
+			break;
+		default:
+			taglen = optptr[1];
+		}
 		optlen -= taglen;
 		optptr += taglen;
 	}
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/mac80211/util.c linux-libre-3.18.121-gnu/net/mac80211/util.c
--- linux-libre-3.18.120-gnu/net/mac80211/util.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/mac80211/util.c	2018-09-05 03:16:24.000000000 -0400
@@ -1876,7 +1876,8 @@ int ieee80211_reconfig(struct ieee80211_
 		if (!sta->uploaded)
 			continue;
 
-		if (sta->sdata->vif.type != NL80211_IFTYPE_AP)
+		if (sta->sdata->vif.type != NL80211_IFTYPE_AP &&
+		    sta->sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
 			continue;
 
 		for (state = IEEE80211_STA_NOTEXIST;
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/wireless/nl80211.c linux-libre-3.18.121-gnu/net/wireless/nl80211.c
--- linux-libre-3.18.120-gnu/net/wireless/nl80211.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/wireless/nl80211.c	2018-09-05 03:16:24.000000000 -0400
@@ -3490,6 +3490,7 @@ static int parse_station_flags(struct ge
 		params->sta_flags_mask = BIT(NL80211_STA_FLAG_AUTHENTICATED) |
 					 BIT(NL80211_STA_FLAG_MFP) |
 					 BIT(NL80211_STA_FLAG_AUTHORIZED);
+		break;
 	default:
 		return -EINVAL;
 	}
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/xfrm/xfrm_policy.c linux-libre-3.18.121-gnu/net/xfrm/xfrm_policy.c
--- linux-libre-3.18.120-gnu/net/xfrm/xfrm_policy.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/xfrm/xfrm_policy.c	2018-09-05 03:16:24.000000000 -0400
@@ -2291,6 +2291,9 @@ struct dst_entry *xfrm_lookup_route(stru
 	if (IS_ERR(dst) && PTR_ERR(dst) == -EREMOTE)
 		return make_blackhole(net, dst_orig->ops->family, dst_orig);
 
+	if (IS_ERR(dst))
+		dst_release(dst_orig);
+
 	return dst;
 }
 EXPORT_SYMBOL(xfrm_lookup_route);
diff -druNp --no-dereference linux-libre-3.18.120-gnu/net/xfrm/xfrm_user.c linux-libre-3.18.121-gnu/net/xfrm/xfrm_user.c
--- linux-libre-3.18.120-gnu/net/xfrm/xfrm_user.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/net/xfrm/xfrm_user.c	2018-09-05 03:16:24.000000000 -0400
@@ -955,10 +955,12 @@ static inline int xfrm_nlmsg_multicast(s
 {
 	struct sock *nlsk = rcu_dereference(net->xfrm.nlsk);
 
-	if (nlsk)
-		return nlmsg_multicast(nlsk, skb, pid, group, GFP_ATOMIC);
-	else
-		return -1;
+	if (!nlsk) {
+		kfree_skb(skb);
+		return -EPIPE;
+	}
+
+	return nlmsg_multicast(nlsk, skb, pid, group, GFP_ATOMIC);
 }
 
 static inline size_t xfrm_spdinfo_msgsize(void)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/sound/soc/sirf/sirf-usp.c linux-libre-3.18.121-gnu/sound/soc/sirf/sirf-usp.c
--- linux-libre-3.18.120-gnu/sound/soc/sirf/sirf-usp.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/sound/soc/sirf/sirf-usp.c	2018-09-05 03:16:24.000000000 -0400
@@ -367,10 +367,9 @@ static int sirf_usp_pcm_probe(struct pla
 	platform_set_drvdata(pdev, usp);
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap(&pdev->dev, mem_res->start,
-		resource_size(mem_res));
-	if (base == NULL)
-		return -ENOMEM;
+	base = devm_ioremap_resource(&pdev->dev, mem_res);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
 	usp->regmap = devm_regmap_init_mmio(&pdev->dev, base,
 					    &sirf_usp_regmap_config);
 	if (IS_ERR(usp->regmap))
diff -druNp --no-dereference linux-libre-3.18.120-gnu/tools/power/x86/turbostat/turbostat.c linux-libre-3.18.121-gnu/tools/power/x86/turbostat/turbostat.c
--- linux-libre-3.18.120-gnu/tools/power/x86/turbostat/turbostat.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/tools/power/x86/turbostat/turbostat.c	2018-09-05 03:16:24.000000000 -0400
@@ -605,9 +605,7 @@ void format_all_counters(struct thread_d
 	if (!printed || !summary_only)
 		print_header();
 
-	if (topo.num_cpus > 1)
-		format_counters(&average.threads, &average.cores,
-			&average.packages);
+	format_counters(&average.threads, &average.cores, &average.packages);
 
 	printed = 1;
 
@@ -2011,7 +2009,9 @@ void check_cpuid()
 	family = (fms >> 8) & 0xf;
 	model = (fms >> 4) & 0xf;
 	stepping = fms & 0xf;
-	if (family == 6 || family == 0xf)
+	if (family == 0xf)
+		family += (fms >> 20) & 0xff;
+	if (family >= 6)
 		model += ((fms >> 16) & 0xf) << 4;
 
 	if (verbose)
diff -druNp --no-dereference linux-libre-3.18.120-gnu/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc linux-libre-3.18.121-gnu/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc
--- linux-libre-3.18.120-gnu/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc	1969-12-31 19:00:00.000000000 -0500
+++ linux-libre-3.18.121-gnu/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc	2018-09-05 03:16:24.000000000 -0400
@@ -0,0 +1,28 @@
+#!/bin/sh
+# description: Snapshot and tracing setting
+# flags: instance
+
+[ ! -f snapshot ] && exit_unsupported
+
+echo "Set tracing off"
+echo 0 > tracing_on
+
+echo "Allocate and take a snapshot"
+echo 1 > snapshot
+
+# Since trace buffer is empty, snapshot is also empty, but allocated
+grep -q "Snapshot is allocated" snapshot
+
+echo "Ensure keep tracing off"
+test `cat tracing_on` -eq 0
+
+echo "Set tracing on"
+echo 1 > tracing_on
+
+echo "Take a snapshot again"
+echo 1 > snapshot
+
+echo "Ensure keep tracing on"
+test `cat tracing_on` -eq 1
+
+exit 0
diff -druNp --no-dereference linux-libre-3.18.120-gnu/tools/usb/ffs-test.c linux-libre-3.18.121-gnu/tools/usb/ffs-test.c
--- linux-libre-3.18.120-gnu/tools/usb/ffs-test.c	2018-08-28 01:21:37.000000000 -0400
+++ linux-libre-3.18.121-gnu/tools/usb/ffs-test.c	2018-09-05 03:16:24.000000000 -0400
@@ -44,12 +44,25 @@
 
 /******************** Little Endian Handling ********************************/
 
-#define cpu_to_le16(x)  htole16(x)
-#define cpu_to_le32(x)  htole32(x)
+/*
+ * cpu_to_le16/32 are used when initializing structures, a context where a
+ * function call is not allowed. To solve this, we code cpu_to_le16/32 in a way
+ * that allows them to be used when initializing structures.
+ */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define cpu_to_le16(x)  (x)
+#define cpu_to_le32(x)  (x)
+#else
+#define cpu_to_le16(x)  ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+#define cpu_to_le32(x)  \
+	((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >>  8) | \
+	(((x) & 0x0000ff00u) <<  8) | (((x) & 0x000000ffu) << 24))
+#endif
+
 #define le32_to_cpu(x)  le32toh(x)
 #define le16_to_cpu(x)  le16toh(x)
 
-
 /******************** Messages and Errors ***********************************/
 
 static const char argv0[] = "ffs-test";
