diff -druNp --no-dereference linux-libre-4.4.152-gnu/arch/x86/include/asm/mmu_context.h linux-libre-4.4.153-gnu/arch/x86/include/asm/mmu_context.h
--- linux-libre-4.4.152-gnu/arch/x86/include/asm/mmu_context.h	2018-08-24 07:27:02.000000000 -0400
+++ linux-libre-4.4.153-gnu/arch/x86/include/asm/mmu_context.h	2018-08-28 01:23:44.000000000 -0400
@@ -109,8 +109,7 @@ static inline int init_new_context(struc
 				   struct mm_struct *mm)
 {
 	mm->context.ctx_id = atomic64_inc_return(&last_mm_ctx_id);
-	init_new_context_ldt(tsk, mm);
-	return 0;
+	return init_new_context_ldt(tsk, mm);
 }
 static inline void destroy_context(struct mm_struct *mm)
 {
diff -druNp --no-dereference linux-libre-4.4.152-gnu/arch/x86/mm/pageattr.c linux-libre-4.4.153-gnu/arch/x86/mm/pageattr.c
--- linux-libre-4.4.152-gnu/arch/x86/mm/pageattr.c	2018-08-24 07:27:02.000000000 -0400
+++ linux-libre-4.4.153-gnu/arch/x86/mm/pageattr.c	2018-08-28 01:23:44.000000000 -0400
@@ -1006,7 +1006,7 @@ static int populate_pmd(struct cpa_data
 
 		pmd = pmd_offset(pud, start);
 
-		set_pmd(pmd, pmd_mkhuge(pfn_pmd(cpa->pfn,
+		set_pmd(pmd, pmd_mkhuge(pfn_pmd(cpa->pfn >> PAGE_SHIFT,
 					canon_pgprot(pmd_pgprot))));
 
 		start	  += PMD_SIZE;
diff -druNp --no-dereference linux-libre-4.4.152-gnu/fs/overlayfs/overlayfs.h linux-libre-4.4.153-gnu/fs/overlayfs/overlayfs.h
--- linux-libre-4.4.152-gnu/fs/overlayfs/overlayfs.h	2018-08-24 07:27:02.000000000 -0400
+++ linux-libre-4.4.153-gnu/fs/overlayfs/overlayfs.h	2018-08-28 01:23:44.000000000 -0400
@@ -163,6 +163,7 @@ extern const struct file_operations ovl_
 int ovl_check_empty_dir(struct dentry *dentry, struct list_head *list);
 void ovl_cleanup_whiteouts(struct dentry *upper, struct list_head *list);
 void ovl_cache_free(struct list_head *list);
+int ovl_check_d_type_supported(struct path *realpath);
 
 /* inode.c */
 int ovl_setattr(struct dentry *dentry, struct iattr *attr);
diff -druNp --no-dereference linux-libre-4.4.152-gnu/fs/overlayfs/readdir.c linux-libre-4.4.153-gnu/fs/overlayfs/readdir.c
--- linux-libre-4.4.152-gnu/fs/overlayfs/readdir.c	2018-08-24 07:27:02.000000000 -0400
+++ linux-libre-4.4.153-gnu/fs/overlayfs/readdir.c	2018-08-28 01:23:44.000000000 -0400
@@ -43,6 +43,7 @@ struct ovl_readdir_data {
 	struct ovl_cache_entry *first_maybe_whiteout;
 	int count;
 	int err;
+	bool d_type_supported;
 };
 
 struct ovl_dir_file {
@@ -581,3 +582,39 @@ void ovl_cleanup_whiteouts(struct dentry
 	}
 	mutex_unlock(&upper->d_inode->i_mutex);
 }
+
+static int ovl_check_d_type(struct dir_context *ctx, const char *name,
+			  int namelen, loff_t offset, u64 ino,
+			  unsigned int d_type)
+{
+	struct ovl_readdir_data *rdd =
+		container_of(ctx, struct ovl_readdir_data, ctx);
+
+	/* Even if d_type is not supported, DT_DIR is returned for . and .. */
+	if (!strncmp(name, ".", namelen) || !strncmp(name, "..", namelen))
+		return 0;
+
+	if (d_type != DT_UNKNOWN)
+		rdd->d_type_supported = true;
+
+	return 0;
+}
+
+/*
+ * Returns 1 if d_type is supported, 0 not supported/unknown. Negative values
+ * if error is encountered.
+ */
+int ovl_check_d_type_supported(struct path *realpath)
+{
+	int err;
+	struct ovl_readdir_data rdd = {
+		.ctx.actor = ovl_check_d_type,
+		.d_type_supported = false,
+	};
+
+	err = ovl_dir_read(realpath, &rdd);
+	if (err)
+		return err;
+
+	return rdd.d_type_supported;
+}
diff -druNp --no-dereference linux-libre-4.4.152-gnu/fs/overlayfs/super.c linux-libre-4.4.153-gnu/fs/overlayfs/super.c
--- linux-libre-4.4.152-gnu/fs/overlayfs/super.c	2018-08-24 07:27:02.000000000 -0400
+++ linux-libre-4.4.153-gnu/fs/overlayfs/super.c	2018-08-28 01:23:44.000000000 -0400
@@ -1054,6 +1054,26 @@ static int ovl_fill_super(struct super_b
 			sb->s_flags |= MS_RDONLY;
 			ufs->workdir = NULL;
 		}
+
+		/*
+		 * Upper should support d_type, else whiteouts are visible.
+		 * Given workdir and upper are on same fs, we can do
+		 * iterate_dir() on workdir. This check requires successful
+		 * creation of workdir in previous step.
+		 */
+		if (ufs->workdir) {
+			err = ovl_check_d_type_supported(&workpath);
+			if (err < 0)
+				goto out_put_workdir;
+
+			/*
+			 * We allowed this configuration and don't want to
+			 * break users over kernel upgrade. So warn instead
+			 * of erroring out.
+			 */
+			if (!err)
+				pr_warn("overlayfs: upper fs needs to support d_type.\n");
+		}
 	}
 
 	err = -ENOMEM;
diff -druNp --no-dereference linux-libre-4.4.152-gnu/Makefile linux-libre-4.4.153-gnu/Makefile
--- linux-libre-4.4.152-gnu/Makefile	2018-08-24 11:43:10.000000000 -0400
+++ linux-libre-4.4.153-gnu/Makefile	2018-08-29 03:54:39.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 152
+SUBLEVEL = 153
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
