diff -druNp --no-dereference linux-libre-3.18.61-gnu/arch/parisc/include/asm/dma-mapping.h linux-libre-3.18.62-gnu/arch/parisc/include/asm/dma-mapping.h
--- linux-libre-3.18.61-gnu/arch/parisc/include/asm/dma-mapping.h	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/arch/parisc/include/asm/dma-mapping.h	2017-07-21 02:12:37.000000000 -0400
@@ -39,6 +39,8 @@ struct hppa_dma_ops {
 ** flush/purge and allocate "regular" cacheable pages for everything.
 */
 
+#define DMA_ERROR_CODE	(~(dma_addr_t)0)
+
 #ifdef CONFIG_PA11
 extern struct hppa_dma_ops pcxl_dma_ops;
 extern struct hppa_dma_ops pcx_dma_ops;
@@ -209,12 +211,13 @@ parisc_walk_tree(struct device *dev)
 			break;
 		}
 	}
-	BUG_ON(!dev->platform_data);
 	return dev->platform_data;
 }
-		
-#define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu)
-	
+
+#define GET_IOC(dev) ({					\
+	void *__pdata = parisc_walk_tree(dev);		\
+	__pdata ? HBA_DATA(__pdata)->iommu : NULL;	\
+})
 
 #ifdef CONFIG_IOMMU_CCIO
 struct parisc_device;
diff -druNp --no-dereference linux-libre-3.18.61-gnu/arch/parisc/include/asm/mmu_context.h linux-libre-3.18.62-gnu/arch/parisc/include/asm/mmu_context.h
--- linux-libre-3.18.61-gnu/arch/parisc/include/asm/mmu_context.h	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/arch/parisc/include/asm/mmu_context.h	2017-07-21 02:12:37.000000000 -0400
@@ -49,15 +49,26 @@ static inline void load_context(mm_conte
 	mtctl(__space_to_prot(context), 8);
 }
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
+static inline void switch_mm_irqs_off(struct mm_struct *prev,
+		struct mm_struct *next, struct task_struct *tsk)
 {
-
 	if (prev != next) {
 		mtctl(__pa(next->pgd), 25);
 		load_context(next->context);
 	}
 }
 
+static inline void switch_mm(struct mm_struct *prev,
+		struct mm_struct *next, struct task_struct *tsk)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	switch_mm_irqs_off(prev, next, tsk);
+	local_irq_restore(flags);
+}
+#define switch_mm_irqs_off switch_mm_irqs_off
+
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
 static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
diff -druNp --no-dereference linux-libre-3.18.61-gnu/arch/parisc/kernel/syscall_table.S linux-libre-3.18.62-gnu/arch/parisc/kernel/syscall_table.S
--- linux-libre-3.18.61-gnu/arch/parisc/kernel/syscall_table.S	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/arch/parisc/kernel/syscall_table.S	2017-07-21 02:12:37.000000000 -0400
@@ -361,7 +361,7 @@
 	ENTRY_SAME(ni_syscall)	/* 263: reserved for vserver */
 	ENTRY_SAME(add_key)
 	ENTRY_SAME(request_key)		/* 265 */
-	ENTRY_SAME(keyctl)
+	ENTRY_COMP(keyctl)
 	ENTRY_SAME(ioprio_set)
 	ENTRY_SAME(ioprio_get)
 	ENTRY_SAME(inotify_init)
diff -druNp --no-dereference linux-libre-3.18.61-gnu/arch/parisc/mm/fault.c linux-libre-3.18.62-gnu/arch/parisc/mm/fault.c
--- linux-libre-3.18.61-gnu/arch/parisc/mm/fault.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/arch/parisc/mm/fault.c	2017-07-21 02:12:37.000000000 -0400
@@ -303,7 +303,7 @@ bad_area:
 		case 15:	/* Data TLB miss fault/Data page fault */
 			/* send SIGSEGV when outside of vma */
 			if (!vma ||
-			    address < vma->vm_start || address > vma->vm_end) {
+			    address < vma->vm_start || address >= vma->vm_end) {
 				si.si_signo = SIGSEGV;
 				si.si_code = SEGV_MAPERR;
 				break;
diff -druNp --no-dereference linux-libre-3.18.61-gnu/arch/x86/crypto/sha1_ssse3_glue.c linux-libre-3.18.62-gnu/arch/x86/crypto/sha1_ssse3_glue.c
--- linux-libre-3.18.61-gnu/arch/x86/crypto/sha1_ssse3_glue.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/arch/x86/crypto/sha1_ssse3_glue.c	2017-07-21 02:12:37.000000000 -0400
@@ -224,7 +224,7 @@ static bool __init avx_usable(void)
 #ifdef CONFIG_AS_AVX2
 static bool __init avx2_usable(void)
 {
-	if (avx_usable() && cpu_has_avx2 && boot_cpu_has(X86_FEATURE_BMI1) &&
+	if (false && avx_usable() && cpu_has_avx2 && boot_cpu_has(X86_FEATURE_BMI1) &&
 	    boot_cpu_has(X86_FEATURE_BMI2))
 		return true;
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/base/power/sysfs.c linux-libre-3.18.62-gnu/drivers/base/power/sysfs.c
--- linux-libre-3.18.61-gnu/drivers/base/power/sysfs.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/base/power/sysfs.c	2017-07-21 02:12:37.000000000 -0400
@@ -269,6 +269,8 @@ static ssize_t pm_qos_latency_tolerance_
 			value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
 		else if (!strcmp(buf, "any") || !strcmp(buf, "any\n"))
 			value = PM_QOS_LATENCY_ANY;
+		else
+			return -EINVAL;
 	}
 	ret = dev_pm_qos_update_user_latency_tolerance(dev, value);
 	return ret < 0 ? ret : n;
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/crypto/atmel-sha.c linux-libre-3.18.62-gnu/drivers/crypto/atmel-sha.c
--- linux-libre-3.18.61-gnu/drivers/crypto/atmel-sha.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/crypto/atmel-sha.c	2017-07-21 02:12:37.000000000 -0400
@@ -957,7 +957,9 @@ static int atmel_sha_finup(struct ahash_
 	ctx->flags |= SHA_FLAGS_FINUP;
 
 	err1 = atmel_sha_update(req);
-	if (err1 == -EINPROGRESS || err1 == -EBUSY)
+	if (err1 == -EINPROGRESS ||
+	    (err1 == -EBUSY && (ahash_request_flags(req) &
+				CRYPTO_TFM_REQ_MAY_BACKLOG)))
 		return err1;
 
 	/*
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/crypto/caam/caamhash.c linux-libre-3.18.62-gnu/drivers/crypto/caam/caamhash.c
--- linux-libre-3.18.61-gnu/drivers/crypto/caam/caamhash.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/crypto/caam/caamhash.c	2017-07-21 02:12:37.000000000 -0400
@@ -490,7 +490,7 @@ static int hash_digest_key(struct caam_h
 	ret = caam_jr_enqueue(jrdev, desc, split_key_done, &result);
 	if (!ret) {
 		/* in progress */
-		wait_for_completion_interruptible(&result.completion);
+		wait_for_completion(&result.completion);
 		ret = result.err;
 #ifdef DEBUG
 		print_hex_dump(KERN_ERR,
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/crypto/caam/key_gen.c linux-libre-3.18.62-gnu/drivers/crypto/caam/key_gen.c
--- linux-libre-3.18.61-gnu/drivers/crypto/caam/key_gen.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/crypto/caam/key_gen.c	2017-07-21 02:12:37.000000000 -0400
@@ -103,7 +103,7 @@ int gen_split_key(struct device *jrdev,
 	ret = caam_jr_enqueue(jrdev, desc, split_key_done, &result);
 	if (!ret) {
 		/* in progress */
-		wait_for_completion_interruptible(&result.completion);
+		wait_for_completion(&result.completion);
 		ret = result.err;
 #ifdef DEBUG
 		print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ",
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/crypto/talitos.c linux-libre-3.18.62-gnu/drivers/crypto/talitos.c
--- linux-libre-3.18.61-gnu/drivers/crypto/talitos.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/crypto/talitos.c	2017-07-21 02:12:37.000000000 -0400
@@ -634,7 +634,7 @@ static void talitos_unregister_rng(struc
  * crypto alg
  */
 #define TALITOS_CRA_PRIORITY		3000
-#define TALITOS_MAX_KEY_SIZE		96
+#define TALITOS_MAX_KEY_SIZE		(AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)
 #define TALITOS_MAX_IV_LENGTH		16 /* max of AES_BLOCK_SIZE, DES3_EDE_BLOCK_SIZE */
 
 #define MD5_BLOCK_SIZE    64
@@ -1324,6 +1324,11 @@ static int ablkcipher_setkey(struct cryp
 {
 	struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
 
+	if (keylen > TALITOS_MAX_KEY_SIZE) {
+		crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
+		return -EINVAL;
+	}
+
 	memcpy(&ctx->key, key, keylen);
 	ctx->keylen = keylen;
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/irqchip/irq-gic-v3.c linux-libre-3.18.62-gnu/drivers/irqchip/irq-gic-v3.c
--- linux-libre-3.18.61-gnu/drivers/irqchip/irq-gic-v3.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/irqchip/irq-gic-v3.c	2017-07-21 02:12:37.000000000 -0400
@@ -531,6 +531,9 @@ static int gic_set_affinity(struct irq_d
 	int enabled;
 	u64 val;
 
+	if (cpu >= nr_cpu_ids)
+		return -EINVAL;
+
 	if (gic_irq_in_rdist(d))
 		return -EINVAL;
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c linux-libre-3.18.62-gnu/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
--- linux-libre-3.18.61-gnu/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c	2017-07-21 02:12:37.000000000 -0400
@@ -4108,6 +4108,11 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
 		cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,
 					GFP_KERNEL);
 	} else if (ieee80211_is_action(mgmt->frame_control)) {
+		if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
+			brcmf_err("invalid action frame length\n");
+			err = -EINVAL;
+			goto exit;
+		}
 		af_params = kzalloc(sizeof(*af_params), GFP_KERNEL);
 		if (af_params == NULL) {
 			brcmf_err("unable to allocate frame\n");
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/parisc/ccio-dma.c linux-libre-3.18.62-gnu/drivers/parisc/ccio-dma.c
--- linux-libre-3.18.61-gnu/drivers/parisc/ccio-dma.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/parisc/ccio-dma.c	2017-07-21 02:12:37.000000000 -0400
@@ -743,6 +743,8 @@ ccio_map_single(struct device *dev, void
 
 	BUG_ON(!dev);
 	ioc = GET_IOC(dev);
+	if (!ioc)
+		return DMA_ERROR_CODE;
 
 	BUG_ON(size <= 0);
 
@@ -807,6 +809,10 @@ ccio_unmap_single(struct device *dev, dm
 	
 	BUG_ON(!dev);
 	ioc = GET_IOC(dev);
+	if (!ioc) {
+		WARN_ON(!ioc);
+		return;
+	}
 
 	DBG_RUN("%s() iovp 0x%lx/%x\n",
 		__func__, (long)iova, size);
@@ -910,6 +916,8 @@ ccio_map_sg(struct device *dev, struct s
 	
 	BUG_ON(!dev);
 	ioc = GET_IOC(dev);
+	if (!ioc)
+		return 0;
 	
 	DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
 
@@ -982,6 +990,10 @@ ccio_unmap_sg(struct device *dev, struct
 
 	BUG_ON(!dev);
 	ioc = GET_IOC(dev);
+	if (!ioc) {
+		WARN_ON(!ioc);
+		return;
+	}
 
 	DBG_RUN_SG("%s() START %d entries,  %08lx,%x\n",
 		__func__, nents, sg_virt_addr(sglist), sglist->length);
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/parisc/dino.c linux-libre-3.18.62-gnu/drivers/parisc/dino.c
--- linux-libre-3.18.61-gnu/drivers/parisc/dino.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/parisc/dino.c	2017-07-21 02:12:37.000000000 -0400
@@ -154,7 +154,10 @@ struct dino_device
 };
 
 /* Looks nice and keeps the compiler happy */
-#define DINO_DEV(d) ((struct dino_device *) d)
+#define DINO_DEV(d) ({				\
+	void *__pdata = d;			\
+	BUG_ON(!__pdata);			\
+	(struct dino_device *)__pdata; })
 
 
 /*
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/parisc/lba_pci.c linux-libre-3.18.62-gnu/drivers/parisc/lba_pci.c
--- linux-libre-3.18.61-gnu/drivers/parisc/lba_pci.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/parisc/lba_pci.c	2017-07-21 02:12:37.000000000 -0400
@@ -111,8 +111,10 @@ static u32 lba_t32;
 
 
 /* Looks nice and keeps the compiler happy */
-#define LBA_DEV(d) ((struct lba_device *) (d))
-
+#define LBA_DEV(d) ({				\
+	void *__pdata = d;			\
+	BUG_ON(!__pdata);			\
+	(struct lba_device *)__pdata; })
 
 /*
 ** Only allow 8 subsidiary busses per LBA
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/parisc/sba_iommu.c linux-libre-3.18.62-gnu/drivers/parisc/sba_iommu.c
--- linux-libre-3.18.61-gnu/drivers/parisc/sba_iommu.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/parisc/sba_iommu.c	2017-07-21 02:12:37.000000000 -0400
@@ -691,6 +691,8 @@ static int sba_dma_supported( struct dev
 		return 0;
 
 	ioc = GET_IOC(dev);
+	if (!ioc)
+		return 0;
 
 	/*
 	 * check if mask is >= than the current max IO Virt Address
@@ -722,6 +724,8 @@ sba_map_single(struct device *dev, void
 	int pide;
 
 	ioc = GET_IOC(dev);
+	if (!ioc)
+		return DMA_ERROR_CODE;
 
 	/* save offset bits */
 	offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK;
@@ -803,6 +807,10 @@ sba_unmap_single(struct device *dev, dma
 	DBG_RUN("%s() iovp 0x%lx/%x\n", __func__, (long) iova, size);
 
 	ioc = GET_IOC(dev);
+	if (!ioc) {
+		WARN_ON(!ioc);
+		return;
+	}
 	offset = iova & ~IOVP_MASK;
 	iova ^= offset;        /* clear offset bits */
 	size += offset;
@@ -942,6 +950,8 @@ sba_map_sg(struct device *dev, struct sc
 	DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
 
 	ioc = GET_IOC(dev);
+	if (!ioc)
+		return 0;
 
 	/* Fast path single entry scatterlists. */
 	if (nents == 1) {
@@ -1028,6 +1038,10 @@ sba_unmap_sg(struct device *dev, struct
 		__func__, nents, sg_virt_addr(sglist), sglist->length);
 
 	ioc = GET_IOC(dev);
+	if (!ioc) {
+		WARN_ON(!ioc);
+		return;
+	}
 
 #ifdef SBA_COLLECT_STATS
 	ioc->usg_calls++;
diff -druNp --no-dereference linux-libre-3.18.61-gnu/drivers/tty/vt/vt.c linux-libre-3.18.62-gnu/drivers/tty/vt/vt.c
--- linux-libre-3.18.61-gnu/drivers/tty/vt/vt.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/drivers/tty/vt/vt.c	2017-07-21 02:12:37.000000000 -0400
@@ -2687,13 +2687,13 @@ int tioclinux(struct tty_struct *tty, un
 	 * related to the kernel should not use this.
 	 */
 			data = vt_get_shift_state();
-			ret = __put_user(data, p);
+			ret = put_user(data, p);
 			break;
 		case TIOCL_GETMOUSEREPORTING:
 			console_lock();	/* May be overkill */
 			data = mouse_reporting();
 			console_unlock();
-			ret = __put_user(data, p);
+			ret = put_user(data, p);
 			break;
 		case TIOCL_SETVESABLANK:
 			console_lock();
@@ -2702,7 +2702,7 @@ int tioclinux(struct tty_struct *tty, un
 			break;
 		case TIOCL_GETKMSGREDIRECT:
 			data = vt_get_kmsg_redirect();
-			ret = __put_user(data, p);
+			ret = put_user(data, p);
 			break;
 		case TIOCL_SETKMSGREDIRECT:
 			if (!capable(CAP_SYS_ADMIN)) {
diff -druNp --no-dereference linux-libre-3.18.61-gnu/fs/dcache.c linux-libre-3.18.62-gnu/fs/dcache.c
--- linux-libre-3.18.61-gnu/fs/dcache.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/fs/dcache.c	2017-07-21 02:12:37.000000000 -0400
@@ -1104,11 +1104,12 @@ void shrink_dcache_sb(struct super_block
 		LIST_HEAD(dispose);
 
 		freed = list_lru_walk(&sb->s_dentry_lru,
-			dentry_lru_isolate_shrink, &dispose, UINT_MAX);
+			dentry_lru_isolate_shrink, &dispose, 1024);
 
 		this_cpu_sub(nr_dentry_unused, freed);
 		shrink_dentry_list(&dispose);
-	} while (freed > 0);
+		cond_resched();
+	} while (list_lru_count(&sb->s_dentry_lru) > 0);
 }
 EXPORT_SYMBOL(shrink_dcache_sb);
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/fs/exec.c linux-libre-3.18.62-gnu/fs/exec.c
--- linux-libre-3.18.61-gnu/fs/exec.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/fs/exec.c	2017-07-21 02:12:37.000000000 -0400
@@ -199,8 +199,7 @@ static struct page *get_arg_page(struct
 
 	if (write) {
 		unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start;
-		unsigned long ptr_size;
-		struct rlimit *rlim;
+		unsigned long ptr_size, limit;
 
 		/*
 		 * Since the stack will hold pointers to the strings, we
@@ -229,14 +228,16 @@ static struct page *get_arg_page(struct
 			return page;
 
 		/*
-		 * Limit to 1/4-th the stack size for the argv+env strings.
+		 * Limit to 1/4 of the max stack size or 3/4 of _STK_LIM
+		 * (whichever is smaller) for the argv+env strings.
 		 * This ensures that:
 		 *  - the remaining binfmt code will not run out of stack space,
 		 *  - the program will have a reasonable amount of stack left
 		 *    to work from.
 		 */
-		rlim = current->signal->rlim;
-		if (size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur) / 4)
+		limit = _STK_LIM / 4 * 3;
+		limit = min(limit, rlimit(RLIMIT_STACK) / 4);
+		if (size > limit)
 			goto fail;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/kernel/extable.c linux-libre-3.18.62-gnu/kernel/extable.c
--- linux-libre-3.18.61-gnu/kernel/extable.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/kernel/extable.c	2017-07-21 02:12:37.000000000 -0400
@@ -66,7 +66,7 @@ static inline int init_kernel_text(unsig
 	return 0;
 }
 
-int core_kernel_text(unsigned long addr)
+int notrace core_kernel_text(unsigned long addr)
 {
 	if (addr >= (unsigned long)_stext &&
 	    addr < (unsigned long)_etext)
diff -druNp --no-dereference linux-libre-3.18.61-gnu/kernel/sched/core.c linux-libre-3.18.62-gnu/kernel/sched/core.c
--- linux-libre-3.18.61-gnu/kernel/sched/core.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/kernel/sched/core.c	2017-07-21 02:12:37.000000000 -0400
@@ -5852,6 +5852,9 @@ enum s_alloc {
  * Build an iteration mask that can exclude certain CPUs from the upwards
  * domain traversal.
  *
+ * Only CPUs that can arrive at this group should be considered to continue
+ * balancing.
+ *
  * Asymmetric node setups can result in situations where the domain tree is of
  * unequal depth, make sure to skip domains that already cover the entire
  * range.
@@ -5863,18 +5866,31 @@ enum s_alloc {
  */
 static void build_group_mask(struct sched_domain *sd, struct sched_group *sg)
 {
-	const struct cpumask *span = sched_domain_span(sd);
+	const struct cpumask *sg_span = sched_group_cpus(sg);
 	struct sd_data *sdd = sd->private;
 	struct sched_domain *sibling;
 	int i;
 
-	for_each_cpu(i, span) {
+	for_each_cpu(i, sg_span) {
 		sibling = *per_cpu_ptr(sdd->sd, i);
-		if (!cpumask_test_cpu(i, sched_domain_span(sibling)))
+
+		/*
+		 * Can happen in the asymmetric case, where these siblings are
+		 * unused. The mask will not be empty because those CPUs that
+		 * do have the top domain _should_ span the domain.
+		 */
+		if (!sibling->child)
+			continue;
+
+		/* If we would not end up here, we can't continue from here */
+		if (!cpumask_equal(sg_span, sched_domain_span(sibling->child)))
 			continue;
 
 		cpumask_set_cpu(i, sched_group_mask(sg));
 	}
+
+	/* We must not have empty masks here */
+	WARN_ON_ONCE(cpumask_empty(sched_group_mask(sg)));
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.18.61-gnu/kernel/trace/trace.c linux-libre-3.18.62-gnu/kernel/trace/trace.c
--- linux-libre-3.18.61-gnu/kernel/trace/trace.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/kernel/trace/trace.c	2017-07-21 02:12:37.000000000 -0400
@@ -1587,7 +1587,7 @@ tracing_generic_entry_update(struct trac
 		TRACE_FLAG_IRQS_NOSUPPORT |
 #endif
 		((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) |
-		((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
+		((pc & SOFTIRQ_OFFSET) ? TRACE_FLAG_SOFTIRQ : 0) |
 		(tif_need_resched() ? TRACE_FLAG_NEED_RESCHED : 0) |
 		(test_preempt_need_resched() ? TRACE_FLAG_PREEMPT_RESCHED : 0);
 }
diff -druNp --no-dereference linux-libre-3.18.61-gnu/Makefile linux-libre-3.18.62-gnu/Makefile
--- linux-libre-3.18.61-gnu/Makefile	2017-07-15 13:17:34.000000000 -0400
+++ linux-libre-3.18.62-gnu/Makefile	2017-07-21 04:53:48.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 61
+SUBLEVEL = 62
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/mm/mmap.c linux-libre-3.18.62-gnu/mm/mmap.c
--- linux-libre-3.18.61-gnu/mm/mmap.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/mm/mmap.c	2017-07-21 02:12:37.000000000 -0400
@@ -2179,7 +2179,7 @@ int expand_upwards(struct vm_area_struct
 
 	/* Guard against exceeding limits of the address space. */
 	address &= PAGE_MASK;
-	if (address >= TASK_SIZE)
+	if (address >= (TASK_SIZE & PAGE_MASK))
 		return -ENOMEM;
 	address += PAGE_SIZE;
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/net/core/dev.c linux-libre-3.18.62-gnu/net/core/dev.c
--- linux-libre-3.18.61-gnu/net/core/dev.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/net/core/dev.c	2017-07-21 02:12:37.000000000 -0400
@@ -6561,8 +6561,8 @@ struct rtnl_link_stats64 *dev_get_stats(
 	} else {
 		netdev_stats_to_stats64(storage, &dev->stats);
 	}
-	storage->rx_dropped += atomic_long_read(&dev->rx_dropped);
-	storage->tx_dropped += atomic_long_read(&dev->tx_dropped);
+	storage->rx_dropped += (unsigned long)atomic_long_read(&dev->rx_dropped);
+	storage->tx_dropped += (unsigned long)atomic_long_read(&dev->tx_dropped);
 	return storage;
 }
 EXPORT_SYMBOL(dev_get_stats);
diff -druNp --no-dereference linux-libre-3.18.61-gnu/net/ipv4/tcp.c linux-libre-3.18.62-gnu/net/ipv4/tcp.c
--- linux-libre-3.18.61-gnu/net/ipv4/tcp.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/net/ipv4/tcp.c	2017-07-21 02:12:37.000000000 -0400
@@ -2268,6 +2268,8 @@ int tcp_disconnect(struct sock *sk, int
 	tcp_init_send_head(sk);
 	memset(&tp->rx_opt, 0, sizeof(tp->rx_opt));
 	__sk_dst_reset(sk);
+	dst_release(sk->sk_rx_dst);
+	sk->sk_rx_dst = NULL;
 
 	WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/net/ipv6/addrconf.c linux-libre-3.18.62-gnu/net/ipv6/addrconf.c
--- linux-libre-3.18.61-gnu/net/ipv6/addrconf.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/net/ipv6/addrconf.c	2017-07-21 02:12:37.000000000 -0400
@@ -1613,17 +1613,7 @@ struct inet6_ifaddr *ipv6_get_ifaddr(str
 
 static void addrconf_dad_stop(struct inet6_ifaddr *ifp, int dad_failed)
 {
-	if (ifp->flags&IFA_F_PERMANENT) {
-		spin_lock_bh(&ifp->lock);
-		addrconf_del_dad_work(ifp);
-		ifp->flags |= IFA_F_TENTATIVE;
-		if (dad_failed)
-			ifp->flags |= IFA_F_DADFAILED;
-		spin_unlock_bh(&ifp->lock);
-		if (dad_failed)
-			ipv6_ifa_notify(0, ifp);
-		in6_ifa_put(ifp);
-	} else if (ifp->flags&IFA_F_TEMPORARY) {
+	if (ifp->flags&IFA_F_TEMPORARY) {
 		struct inet6_ifaddr *ifpub;
 		spin_lock_bh(&ifp->lock);
 		ifpub = ifp->ifpub;
@@ -1636,6 +1626,16 @@ static void addrconf_dad_stop(struct ine
 			spin_unlock_bh(&ifp->lock);
 		}
 		ipv6_del_addr(ifp);
+	} else if (ifp->flags&IFA_F_PERMANENT || !dad_failed) {
+		spin_lock_bh(&ifp->lock);
+		addrconf_del_dad_work(ifp);
+		ifp->flags |= IFA_F_TENTATIVE;
+		if (dad_failed)
+			ifp->flags |= IFA_F_DADFAILED;
+		spin_unlock_bh(&ifp->lock);
+		if (dad_failed)
+			ipv6_ifa_notify(0, ifp);
+		in6_ifa_put(ifp);
 	} else {
 		ipv6_del_addr(ifp);
 	}
@@ -2829,6 +2829,7 @@ static int addrconf_notify(struct notifi
 {
 	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 	struct inet6_dev *idev = __in6_dev_get(dev);
+	struct net *net = dev_net(dev);
 	int run_pending = 0;
 	int err;
 
@@ -2925,7 +2926,7 @@ static int addrconf_notify(struct notifi
 			 * IPV6_MIN_MTU stop IPv6 on this interface.
 			 */
 			if (dev->mtu < IPV6_MIN_MTU)
-				addrconf_ifdown(dev, 1);
+				addrconf_ifdown(dev, dev != net->loopback_dev);
 		}
 		break;
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/net/wireless/nl80211.c linux-libre-3.18.62-gnu/net/wireless/nl80211.c
--- linux-libre-3.18.61-gnu/net/wireless/nl80211.c	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/net/wireless/nl80211.c	2017-07-21 02:12:37.000000000 -0400
@@ -301,8 +301,7 @@ static const struct nla_policy nl80211_p
 	[NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 },
 	[NL80211_ATTR_PID] = { .type = NLA_U32 },
 	[NL80211_ATTR_4ADDR] = { .type = NLA_U8 },
-	[NL80211_ATTR_PMKID] = { .type = NLA_BINARY,
-				 .len = WLAN_PMKID_LEN },
+	[NL80211_ATTR_PMKID] = { .len = WLAN_PMKID_LEN },
 	[NL80211_ATTR_DURATION] = { .type = NLA_U32 },
 	[NL80211_ATTR_COOKIE] = { .type = NLA_U64 },
 	[NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED },
@@ -358,6 +357,7 @@ static const struct nla_policy nl80211_p
 	[NL80211_ATTR_SCAN_FLAGS] = { .type = NLA_U32 },
 	[NL80211_ATTR_P2P_CTWINDOW] = { .type = NLA_U8 },
 	[NL80211_ATTR_P2P_OPPPS] = { .type = NLA_U8 },
+	[NL80211_ATTR_LOCAL_MESH_POWER_MODE] = {. type = NLA_U32 },
 	[NL80211_ATTR_ACL_POLICY] = {. type = NLA_U32 },
 	[NL80211_ATTR_MAC_ADDRS] = { .type = NLA_NESTED },
 	[NL80211_ATTR_STA_CAPABILITY] = { .type = NLA_U16 },
@@ -5347,6 +5347,10 @@ static int validate_scan_freqs(struct nl
 	struct nlattr *attr1, *attr2;
 	int n_channels = 0, tmp1, tmp2;
 
+	nla_for_each_nested(attr1, freqs, tmp1)
+		if (nla_len(attr1) != sizeof(u32))
+			return 0;
+
 	nla_for_each_nested(attr1, freqs, tmp1) {
 		n_channels++;
 		/*
diff -druNp --no-dereference linux-libre-3.18.61-gnu/scripts/checkpatch.pl linux-libre-3.18.62-gnu/scripts/checkpatch.pl
--- linux-libre-3.18.61-gnu/scripts/checkpatch.pl	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/scripts/checkpatch.pl	2017-07-21 02:12:37.000000000 -0400
@@ -2985,7 +2985,7 @@ sub process {
 				$fixedline =~ s/\s*=\s*$/ = {/;
 				fix_insert_line($fixlinenr, $fixedline);
 				$fixedline = $line;
-				$fixedline =~ s/^(.\s*){\s*/$1/;
+				$fixedline =~ s/^(.\s*)\{\s*/$1/;
 				fix_insert_line($fixlinenr, $fixedline);
 			}
 		}
@@ -3301,7 +3301,7 @@ sub process {
 				my $fixedline = rtrim($prevrawline) . " {";
 				fix_insert_line($fixlinenr, $fixedline);
 				$fixedline = $rawline;
-				$fixedline =~ s/^(.\s*){\s*/$1\t/;
+				$fixedline =~ s/^(.\s*)\{\s*/$1\t/;
 				if ($fixedline !~ /^\+\s*$/) {
 					fix_insert_line($fixlinenr, $fixedline);
 				}
@@ -3748,7 +3748,7 @@ sub process {
 			if (ERROR("SPACING",
 				  "space required before the open brace '{'\n" . $herecurr) &&
 			    $fix) {
-				$fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/;
+				$fixed[$fixlinenr] =~ s/^(\+.*(?:do|\)))\{/$1 {/;
 			}
 		}
 
diff -druNp --no-dereference linux-libre-3.18.61-gnu/tools/lib/lockdep/uinclude/linux/lockdep.h linux-libre-3.18.62-gnu/tools/lib/lockdep/uinclude/linux/lockdep.h
--- linux-libre-3.18.61-gnu/tools/lib/lockdep/uinclude/linux/lockdep.h	2017-07-15 04:24:32.000000000 -0400
+++ linux-libre-3.18.62-gnu/tools/lib/lockdep/uinclude/linux/lockdep.h	2017-07-21 02:12:37.000000000 -0400
@@ -8,7 +8,7 @@
 #include <linux/utsname.h>
 
 
-#define MAX_LOCK_DEPTH 2000UL
+#define MAX_LOCK_DEPTH 255UL
 
 #define asmlinkage
 #define __visible
