diff -druNp --no-dereference linux-libre-3.18.41-gnu/arch/arc/include/asm/pgtable.h linux-libre-3.18.42-gnu/arch/arc/include/asm/pgtable.h
--- linux-libre-3.18.41-gnu/arch/arc/include/asm/pgtable.h	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/arch/arc/include/asm/pgtable.h	2016-09-17 18:55:26.000000000 -0400
@@ -98,7 +98,7 @@
 #define ___DEF (_PAGE_PRESENT | _PAGE_DEF_CACHEABLE)
 
 /* Set of bits not changed in pte_modify */
-#define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _PAGE_SPECIAL)
+#define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED)
 
 /* More Abbrevaited helpers */
 #define PAGE_U_NONE     __pgprot(___DEF)
diff -druNp --no-dereference linux-libre-3.18.41-gnu/arch/arm/kernel/sys_oabi-compat.c linux-libre-3.18.42-gnu/arch/arm/kernel/sys_oabi-compat.c
--- linux-libre-3.18.41-gnu/arch/arm/kernel/sys_oabi-compat.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/arch/arm/kernel/sys_oabi-compat.c	2016-09-17 18:55:26.000000000 -0400
@@ -193,15 +193,44 @@ struct oabi_flock64 {
 	pid_t	l_pid;
 } __attribute__ ((packed,aligned(4)));
 
-asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
+static long do_locks(unsigned int fd, unsigned int cmd,
 				 unsigned long arg)
 {
-	struct oabi_flock64 user;
 	struct flock64 kernel;
-	mm_segment_t fs = USER_DS; /* initialized to kill a warning */
-	unsigned long local_arg = arg;
-	int ret;
+	struct oabi_flock64 user;
+	mm_segment_t fs;
+	long ret;
 
+	if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
+			   sizeof(user)))
+		return -EFAULT;
+	kernel.l_type	= user.l_type;
+	kernel.l_whence	= user.l_whence;
+	kernel.l_start	= user.l_start;
+	kernel.l_len	= user.l_len;
+	kernel.l_pid	= user.l_pid;
+
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_fcntl64(fd, cmd, (unsigned long)&kernel);
+	set_fs(fs);
+
+	if (!ret && (cmd == F_GETLK64 || cmd == F_OFD_GETLK)) {
+		user.l_type	= kernel.l_type;
+		user.l_whence	= kernel.l_whence;
+		user.l_start	= kernel.l_start;
+		user.l_len	= kernel.l_len;
+		user.l_pid	= kernel.l_pid;
+		if (copy_to_user((struct oabi_flock64 __user *)arg,
+				 &user, sizeof(user)))
+			ret = -EFAULT;
+	}
+	return ret;
+}
+
+asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
+				 unsigned long arg)
+{
 	switch (cmd) {
 	case F_OFD_GETLK:
 	case F_OFD_SETLK:
@@ -209,39 +238,11 @@ asmlinkage long sys_oabi_fcntl64(unsigne
 	case F_GETLK64:
 	case F_SETLK64:
 	case F_SETLKW64:
-		if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
-				   sizeof(user)))
-			return -EFAULT;
-		kernel.l_type	= user.l_type;
-		kernel.l_whence	= user.l_whence;
-		kernel.l_start	= user.l_start;
-		kernel.l_len	= user.l_len;
-		kernel.l_pid	= user.l_pid;
-		local_arg = (unsigned long)&kernel;
-		fs = get_fs();
-		set_fs(KERNEL_DS);
-	}
-
-	ret = sys_fcntl64(fd, cmd, local_arg);
+		return do_locks(fd, cmd, arg);
 
-	switch (cmd) {
-	case F_GETLK64:
-		if (!ret) {
-			user.l_type	= kernel.l_type;
-			user.l_whence	= kernel.l_whence;
-			user.l_start	= kernel.l_start;
-			user.l_len	= kernel.l_len;
-			user.l_pid	= kernel.l_pid;
-			if (copy_to_user((struct oabi_flock64 __user *)arg,
-					 &user, sizeof(user)))
-				ret = -EFAULT;
-		}
-	case F_SETLK64:
-	case F_SETLKW64:
-		set_fs(fs);
+	default:
+		return sys_fcntl64(fd, cmd, arg);
 	}
-
-	return ret;
 }
 
 struct oabi_epoll_event {
diff -druNp --no-dereference linux-libre-3.18.41-gnu/arch/x86/kernel/cpu/amd.c linux-libre-3.18.42-gnu/arch/x86/kernel/cpu/amd.c
--- linux-libre-3.18.41-gnu/arch/x86/kernel/cpu/amd.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/arch/x86/kernel/cpu/amd.c	2016-09-17 18:55:26.000000000 -0400
@@ -603,6 +603,17 @@ static void init_amd_gh(struct cpuinfo_x
 		set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
 }
 
+#define MSR_AMD64_DE_CFG	0xC0011029
+
+static void init_amd_ln(struct cpuinfo_x86 *c)
+{
+	/*
+	 * Apply erratum 665 fix unconditionally so machines without a BIOS
+	 * fix work.
+	 */
+	msr_set_bit(MSR_AMD64_DE_CFG, 31);
+}
+
 static void init_amd_bd(struct cpuinfo_x86 *c)
 {
 	u64 value;
@@ -672,6 +683,7 @@ static void init_amd(struct cpuinfo_x86
 	case 6:	   init_amd_k7(c); break;
 	case 0xf:  init_amd_k8(c); break;
 	case 0x10: init_amd_gh(c); break;
+	case 0x12: init_amd_ln(c); break;
 	case 0x15: init_amd_bd(c); break;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.41-gnu/arch/x86/kernel/paravirt.c linux-libre-3.18.42-gnu/arch/x86/kernel/paravirt.c
--- linux-libre-3.18.41-gnu/arch/x86/kernel/paravirt.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/arch/x86/kernel/paravirt.c	2016-09-17 18:55:26.000000000 -0400
@@ -55,12 +55,12 @@ asm (".pushsection .entry.text, \"ax\"\n
      ".popsection");
 
 /* identity function, which can be inlined */
-u32 _paravirt_ident_32(u32 x)
+u32 notrace _paravirt_ident_32(u32 x)
 {
 	return x;
 }
 
-u64 _paravirt_ident_64(u64 x)
+u64 notrace _paravirt_ident_64(u64 x)
 {
 	return x;
 }
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/iio/accel/kxsd9.c linux-libre-3.18.42-gnu/drivers/iio/accel/kxsd9.c
--- linux-libre-3.18.41-gnu/drivers/iio/accel/kxsd9.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/iio/accel/kxsd9.c	2016-09-17 18:55:26.000000000 -0400
@@ -160,6 +160,7 @@ static int kxsd9_read_raw(struct iio_dev
 		if (ret < 0)
 			goto error_ret;
 		*val = ret;
+		ret = IIO_VAL_INT;
 		break;
 	case IIO_CHAN_INFO_SCALE:
 		ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/md/dm-crypt.c linux-libre-3.18.42-gnu/drivers/md/dm-crypt.c
--- linux-libre-3.18.41-gnu/drivers/md/dm-crypt.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/md/dm-crypt.c	2016-09-17 18:55:26.000000000 -0400
@@ -1401,7 +1401,7 @@ static int crypt_alloc_tfms(struct crypt
 	unsigned i;
 	int err;
 
-	cc->tfms = kmalloc(cc->tfms_count * sizeof(struct crypto_ablkcipher *),
+	cc->tfms = kzalloc(cc->tfms_count * sizeof(struct crypto_ablkcipher *),
 			   GFP_KERNEL);
 	if (!cc->tfms)
 		return -ENOMEM;
@@ -1842,6 +1842,13 @@ static int crypt_map(struct dm_target *t
 		return DM_MAPIO_REMAPPED;
 	}
 
+	/*
+	 * Check if bio is too large, split as needed.
+	 */
+	if (unlikely(bio->bi_iter.bi_size > (BIO_MAX_PAGES << PAGE_SHIFT)) &&
+	    bio_data_dir(bio) == WRITE)
+		dm_accept_partial_bio(bio, ((BIO_MAX_PAGES << PAGE_SHIFT) >> SECTOR_SHIFT));
+
 	io = dm_per_bio_data(bio, cc->per_bio_data_size);
 	crypt_io_init(io, cc, bio, dm_target_offset(ti, bio->bi_iter.bi_sector));
 	io->ctx.req = (struct ablkcipher_request *)(io + 1);
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/staging/comedi/drivers/daqboard2000.c linux-libre-3.18.42-gnu/drivers/staging/comedi/drivers/daqboard2000.c
--- linux-libre-3.18.41-gnu/drivers/staging/comedi/drivers/daqboard2000.c	2016-09-05 22:04:29.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/staging/comedi/drivers/daqboard2000.c	2016-09-18 23:35:17.000000000 -0400
@@ -637,7 +637,7 @@ static const void *daqboard2000_find_boa
 	const struct daq200_boardtype *board;
 	int i;
 
-	if (pcidev->subsystem_device != PCI_VENDOR_ID_IOTECH)
+	if (pcidev->subsystem_vendor != PCI_VENDOR_ID_IOTECH)
 		return NULL;
 
 	for (i = 0; i < ARRAY_SIZE(boardtypes); i++) {
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/staging/comedi/drivers/ni_mio_common.c linux-libre-3.18.42-gnu/drivers/staging/comedi/drivers/ni_mio_common.c
--- linux-libre-3.18.41-gnu/drivers/staging/comedi/drivers/ni_mio_common.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/staging/comedi/drivers/ni_mio_common.c	2016-09-17 18:55:26.000000000 -0400
@@ -3015,7 +3015,15 @@ static int ni_ao_inttrig(struct comedi_d
 	int i;
 	static const int timeout = 1000;
 
-	if (trig_num != cmd->start_arg)
+	/*
+	 * Require trig_num == cmd->start_arg when cmd->start_src == TRIG_INT.
+	 * For backwards compatibility, also allow trig_num == 0 when
+	 * cmd->start_src != TRIG_INT (i.e. when cmd->start_src == TRIG_EXT);
+	 * in that case, the internal trigger is being used as a pre-trigger
+	 * before the external trigger.
+	 */
+	if (!(trig_num == cmd->start_arg ||
+	      (trig_num == 0 && cmd->start_src != TRIG_INT)))
 		return -EINVAL;
 
 	/* Null trig at beginning prevent ao start trigger from executing more than
@@ -5674,7 +5682,7 @@ static int ni_E_init(struct comedi_devic
 		s->maxdata	= (devpriv->is_m_series) ? 0xffffffff
 							 : 0x00ffffff;
 		s->insn_read	= ni_tio_insn_read;
-		s->insn_write	= ni_tio_insn_read;
+		s->insn_write	= ni_tio_insn_write;
 		s->insn_config	= ni_tio_insn_config;
 #ifdef PCIDMA
 		if (dev->irq && devpriv->mite) {
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/usb/core/devio.c linux-libre-3.18.42-gnu/drivers/usb/core/devio.c
--- linux-libre-3.18.41-gnu/drivers/usb/core/devio.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/usb/core/devio.c	2016-09-17 18:55:26.000000000 -0400
@@ -1526,11 +1526,17 @@ static int proc_do_submiturb(struct usb_
 	as->urb->start_frame = uurb->start_frame;
 	as->urb->number_of_packets = number_of_packets;
 	as->urb->stream_id = stream_id;
-	if (uurb->type == USBDEVFS_URB_TYPE_ISO ||
-			ps->dev->speed == USB_SPEED_HIGH)
-		as->urb->interval = 1 << min(15, ep->desc.bInterval - 1);
-	else
-		as->urb->interval = ep->desc.bInterval;
+
+	if (ep->desc.bInterval) {
+		if (uurb->type == USBDEVFS_URB_TYPE_ISO ||
+				ps->dev->speed == USB_SPEED_HIGH ||
+				ps->dev->speed >= USB_SPEED_SUPER)
+			as->urb->interval = 1 <<
+					min(15, ep->desc.bInterval - 1);
+		else
+			as->urb->interval = ep->desc.bInterval;
+	}
+
 	as->urb->context = as;
 	as->urb->complete = async_completed;
 	for (totlen = u = 0; u < number_of_packets; u++) {
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/usb/serial/mos7720.c linux-libre-3.18.42-gnu/drivers/usb/serial/mos7720.c
--- linux-libre-3.18.41-gnu/drivers/usb/serial/mos7720.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/usb/serial/mos7720.c	2016-09-17 18:55:26.000000000 -0400
@@ -1239,7 +1239,7 @@ static int mos7720_write(struct tty_stru
 
 	if (urb->transfer_buffer == NULL) {
 		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
-					       GFP_KERNEL);
+					       GFP_ATOMIC);
 		if (!urb->transfer_buffer)
 			goto exit;
 	}
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/usb/serial/mos7840.c linux-libre-3.18.42-gnu/drivers/usb/serial/mos7840.c
--- linux-libre-3.18.41-gnu/drivers/usb/serial/mos7840.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/usb/serial/mos7840.c	2016-09-17 18:55:26.000000000 -0400
@@ -1369,8 +1369,8 @@ static int mos7840_write(struct tty_stru
 	}
 
 	if (urb->transfer_buffer == NULL) {
-		urb->transfer_buffer =
-		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
+		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
+					       GFP_ATOMIC);
 		if (!urb->transfer_buffer)
 			goto exit;
 	}
diff -druNp --no-dereference linux-libre-3.18.41-gnu/drivers/usb/serial/option.c linux-libre-3.18.42-gnu/drivers/usb/serial/option.c
--- linux-libre-3.18.41-gnu/drivers/usb/serial/option.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/drivers/usb/serial/option.c	2016-09-17 18:55:26.000000000 -0400
@@ -534,6 +534,13 @@ enum option_blacklist_reason {
 };
 
 #define MAX_BL_NUM  11
+
+/* WeTelecom products */
+#define WETELECOM_VENDOR_ID			0x22de
+#define WETELECOM_PRODUCT_WMD200		0x6801
+#define WETELECOM_PRODUCT_6802			0x6802
+#define WETELECOM_PRODUCT_WMD300		0x6803
+
 struct option_blacklist_info {
 	/* bitfield of interface numbers for OPTION_BLACKLIST_SENDSETUP */
 	const unsigned long sendsetup;
@@ -2000,6 +2007,9 @@ static const struct usb_device_id option
 	{ USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) },                /* OLICARD300 - MT6225 */
 	{ USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
 	{ USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/ext4/super.c linux-libre-3.18.42-gnu/fs/ext4/super.c
--- linux-libre-3.18.41-gnu/fs/ext4/super.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/ext4/super.c	2016-09-17 18:55:26.000000000 -0400
@@ -2057,6 +2057,7 @@ void ext4_group_desc_csum_set(struct sup
 
 /* Called at mount-time, super-block is locked */
 static int ext4_check_descriptors(struct super_block *sb,
+				  ext4_fsblk_t sb_block,
 				  ext4_group_t *first_not_zeroed)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -2087,6 +2088,11 @@ static int ext4_check_descriptors(struct
 			grp = i;
 
 		block_bitmap = ext4_block_bitmap(sb, gdp);
+		if (block_bitmap == sb_block) {
+			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
+				 "Block bitmap for group %u overlaps "
+				 "superblock", i);
+		}
 		if (block_bitmap < first_block || block_bitmap > last_block) {
 			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
 			       "Block bitmap for group %u not in group "
@@ -2094,6 +2100,11 @@ static int ext4_check_descriptors(struct
 			return 0;
 		}
 		inode_bitmap = ext4_inode_bitmap(sb, gdp);
+		if (inode_bitmap == sb_block) {
+			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
+				 "Inode bitmap for group %u overlaps "
+				 "superblock", i);
+		}
 		if (inode_bitmap < first_block || inode_bitmap > last_block) {
 			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
 			       "Inode bitmap for group %u not in group "
@@ -2101,6 +2112,11 @@ static int ext4_check_descriptors(struct
 			return 0;
 		}
 		inode_table = ext4_inode_table(sb, gdp);
+		if (inode_table == sb_block) {
+			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
+				 "Inode table for group %u overlaps "
+				 "superblock", i);
+		}
 		if (inode_table < first_block ||
 		    inode_table + sbi->s_itb_per_group - 1 > last_block) {
 			ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
@@ -3926,7 +3942,7 @@ static int ext4_fill_super(struct super_
 			goto failed_mount2;
 		}
 	}
-	if (!ext4_check_descriptors(sb, &first_not_zeroed)) {
+	if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
 		ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
 		goto failed_mount2;
 	}
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/kernfs/file.c linux-libre-3.18.42-gnu/fs/kernfs/file.c
--- linux-libre-3.18.41-gnu/fs/kernfs/file.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/kernfs/file.c	2016-09-17 18:55:26.000000000 -0400
@@ -828,21 +828,35 @@ repeat:
 	mutex_lock(&kernfs_mutex);
 
 	list_for_each_entry(info, &kernfs_root(kn)->supers, node) {
+		struct kernfs_node *parent;
 		struct inode *inode;
-		struct dentry *dentry;
 
+		/*
+		 * We want fsnotify_modify() on @kn but as the
+		 * modifications aren't originating from userland don't
+		 * have the matching @file available.  Look up the inodes
+		 * and generate the events manually.
+		 */
 		inode = ilookup(info->sb, kn->ino);
 		if (!inode)
 			continue;
 
-		dentry = d_find_any_alias(inode);
-		if (dentry) {
-			fsnotify_parent(NULL, dentry, FS_MODIFY);
-			fsnotify(inode, FS_MODIFY, inode, FSNOTIFY_EVENT_INODE,
-				 NULL, 0);
-			dput(dentry);
+		parent = kernfs_get_parent(kn);
+		if (parent) {
+			struct inode *p_inode;
+
+			p_inode = ilookup(info->sb, parent->ino);
+			if (p_inode) {
+				fsnotify(p_inode, FS_MODIFY | FS_EVENT_ON_CHILD,
+					 inode, FSNOTIFY_EVENT_INODE, kn->name, 0);
+				iput(p_inode);
+			}
+
+			kernfs_put(parent);
 		}
 
+		fsnotify(inode, FS_MODIFY, inode, FSNOTIFY_EVENT_INODE,
+			 kn->name, 0);
 		iput(inode);
 	}
 
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/nfs/callback.c linux-libre-3.18.42-gnu/fs/nfs/callback.c
--- linux-libre-3.18.41-gnu/fs/nfs/callback.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/nfs/callback.c	2016-09-17 18:55:26.000000000 -0400
@@ -303,6 +303,7 @@ static int nfs_callback_up_net(int minor
 err_socks:
 	svc_rpcb_cleanup(serv, net);
 err_bind:
+	nn->cb_users[minorversion]--;
 	dprintk("NFS: Couldn't create callback socket: err = %d; "
 			"net = %p\n", ret, net);
 	return ret;
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/overlayfs/copy_up.c linux-libre-3.18.42-gnu/fs/overlayfs/copy_up.c
--- linux-libre-3.18.41-gnu/fs/overlayfs/copy_up.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/overlayfs/copy_up.c	2016-09-17 18:55:26.000000000 -0400
@@ -48,6 +48,8 @@ int ovl_copy_xattr(struct dentry *old, s
 	}
 
 	for (name = buf; name < (buf + list_size); name += strlen(name) + 1) {
+		if (ovl_is_private_xattr(name))
+			continue;
 retry:
 		size = vfs_getxattr(old, name, value, value_size);
 		if (size == -ERANGE)
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/overlayfs/inode.c linux-libre-3.18.42-gnu/fs/overlayfs/inode.c
--- linux-libre-3.18.41-gnu/fs/overlayfs/inode.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/overlayfs/inode.c	2016-09-17 18:55:26.000000000 -0400
@@ -208,8 +208,7 @@ static int ovl_readlink(struct dentry *d
 	return realinode->i_op->readlink(realpath.dentry, buf, bufsiz);
 }
 
-
-static bool ovl_is_private_xattr(const char *name)
+bool ovl_is_private_xattr(const char *name)
 {
 	return strncmp(name, "trusted.overlay.", 14) == 0;
 }
@@ -264,7 +263,8 @@ ssize_t ovl_listxattr(struct dentry *den
 	struct path realpath;
 	enum ovl_path_type type = ovl_path_real(dentry, &realpath);
 	ssize_t res;
-	int off;
+	size_t len;
+	char *s;
 
 	res = vfs_listxattr(realpath.dentry, list, size);
 	if (res <= 0 || size == 0)
@@ -274,17 +274,19 @@ ssize_t ovl_listxattr(struct dentry *den
 		return res;
 
 	/* filter out private xattrs */
-	for (off = 0; off < res;) {
-		char *s = list + off;
-		size_t slen = strlen(s) + 1;
+	for (s = list, len = res; len;) {
+		size_t slen = strnlen(s, len) + 1;
 
-		BUG_ON(off + slen > res);
+		/* underlying fs providing us with an broken xattr list? */
+		if (WARN_ON(slen > len))
+			return -EIO;
 
+		len -= slen;
 		if (ovl_is_private_xattr(s)) {
 			res -= slen;
-			memmove(s, s + slen, res - off);
+			memmove(s, s + slen, len);
 		} else {
-			off += slen;
+			s += slen;
 		}
 	}
 
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/overlayfs/overlayfs.h linux-libre-3.18.42-gnu/fs/overlayfs/overlayfs.h
--- linux-libre-3.18.41-gnu/fs/overlayfs/overlayfs.h	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/overlayfs/overlayfs.h	2016-09-17 18:55:26.000000000 -0400
@@ -166,6 +166,7 @@ ssize_t ovl_getxattr(struct dentry *dent
 ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size);
 int ovl_removexattr(struct dentry *dentry, const char *name);
 struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags);
+bool ovl_is_private_xattr(const char *name);
 
 struct inode *ovl_new_inode(struct super_block *sb, umode_t mode,
 			    struct ovl_entry *oe);
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/overlayfs/super.c linux-libre-3.18.42-gnu/fs/overlayfs/super.c
--- linux-libre-3.18.41-gnu/fs/overlayfs/super.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/overlayfs/super.c	2016-09-17 18:55:26.000000000 -0400
@@ -545,6 +545,10 @@ retry:
 		struct kstat stat = {
 			.mode = S_IFDIR | 0,
 		};
+		struct iattr attr = {
+			.ia_valid = ATTR_MODE,
+			.ia_mode = stat.mode,
+		};
 
 		if (work->d_inode) {
 			err = -EEXIST;
@@ -560,6 +564,21 @@ retry:
 		err = ovl_create_real(dir, work, &stat, NULL, NULL, true);
 		if (err)
 			goto out_dput;
+
+		err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_DEFAULT);
+		if (err && err != -ENODATA)
+			goto out_dput;
+
+		err = vfs_removexattr(work, XATTR_NAME_POSIX_ACL_ACCESS);
+		if (err && err != -ENODATA)
+			goto out_dput;
+
+		/* Clear any inherited mode bits */
+		mutex_lock(&work->d_inode->i_mutex);
+		err = notify_change(work, &attr, NULL);
+		mutex_unlock(&work->d_inode->i_mutex);
+		if (err)
+			goto out_dput;
 	}
 out_unlock:
 	mutex_unlock(&dir->i_mutex);
diff -druNp --no-dereference linux-libre-3.18.41-gnu/fs/xfs/libxfs/xfs_sb.c linux-libre-3.18.42-gnu/fs/xfs/libxfs/xfs_sb.c
--- linux-libre-3.18.41-gnu/fs/xfs/libxfs/xfs_sb.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/fs/xfs/libxfs/xfs_sb.c	2016-09-17 18:55:26.000000000 -0400
@@ -606,7 +606,8 @@ xfs_sb_verify(
 	 * Only check the in progress field for the primary superblock as
 	 * mkfs.xfs doesn't clear it from secondary superblocks.
 	 */
-	return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,
+	return xfs_mount_validate_sb(mp, &sb,
+				     bp->b_maps[0].bm_bn == XFS_SB_DADDR,
 				     check_version);
 }
 
diff -druNp --no-dereference linux-libre-3.18.41-gnu/kernel/cpuset.c linux-libre-3.18.42-gnu/kernel/cpuset.c
--- linux-libre-3.18.41-gnu/kernel/cpuset.c	2016-09-02 23:42:21.000000000 -0400
+++ linux-libre-3.18.42-gnu/kernel/cpuset.c	2016-09-17 18:55:26.000000000 -0400
@@ -2045,6 +2045,20 @@ static void cpuset_bind(struct cgroup_su
 	mutex_unlock(&cpuset_mutex);
 }
 
+/*
+ * Make sure the new task conform to the current state of its parent,
+ * which could have been changed by cpuset just after it inherits the
+ * state from the parent and before it sits on the cgroup's task list.
+ */
+void cpuset_fork(struct task_struct *task)
+{
+	if (task_css_is_root(task, cpuset_cgrp_id))
+		return;
+
+	set_cpus_allowed_ptr(task, &current->cpus_allowed);
+	task->mems_allowed = current->mems_allowed;
+}
+
 struct cgroup_subsys cpuset_cgrp_subsys = {
 	.css_alloc	= cpuset_css_alloc,
 	.css_online	= cpuset_css_online,
@@ -2054,6 +2068,7 @@ struct cgroup_subsys cpuset_cgrp_subsys
 	.cancel_attach	= cpuset_cancel_attach,
 	.attach		= cpuset_attach,
 	.bind		= cpuset_bind,
+	.fork		= cpuset_fork,
 	.legacy_cftypes	= files,
 	.early_init	= 1,
 };
diff -druNp --no-dereference linux-libre-3.18.41-gnu/Makefile linux-libre-3.18.42-gnu/Makefile
--- linux-libre-3.18.41-gnu/Makefile	2016-09-05 21:49:03.000000000 -0400
+++ linux-libre-3.18.42-gnu/Makefile	2016-09-18 23:13:02.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 41
+SUBLEVEL = 42
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
