All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20200603230053.3WZ4_914g%akpm@linux-foundation.org>

diff --git a/a/1.txt b/N1/1.txt
index b9f9f54..362e836 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -98,4 +98,23 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
 -	if (pud_huge(pud_entry) || !pud_present(pud_entry))
 +	if (sz == PUD_SIZE)
 +		/* must be pud huge, non-present or none */
- 		return (pte_t *)pud;
\ No newline at end of file
+ 		return (pte_t *)pud;
+-
+-	pmd = pmd_offset(pud, addr);
+-	pmd_entry = READ_ONCE(*pmd);
+-	if (sz != PMD_SIZE && pmd_none(pmd_entry))
++	if (!pud_present(*pud))
+ 		return NULL;
+-	/* hugepage or swap? */
+-	if (pmd_huge(pmd_entry) || !pmd_present(pmd_entry))
+-		return (pte_t *)pmd;
++	/* must have a valid entry and size to go further */
+ 
+-	return NULL;
++	pmd = pmd_offset(pud, addr);
++	/* must be pmd huge, non-present or none */
++	return (pte_t *)pmd;
+ }
+ 
+ #endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */
+_
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 9223a1f..7105b9e 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -128,7 +128,26 @@
   "-\tif (pud_huge(pud_entry) || !pud_present(pud_entry))\n",
   "+\tif (sz == PUD_SIZE)\n",
   "+\t\t/* must be pud huge, non-present or none */\n",
-  " \t\treturn (pte_t *)pud;"
+  " \t\treturn (pte_t *)pud;\n",
+  "-\n",
+  "-\tpmd = pmd_offset(pud, addr);\n",
+  "-\tpmd_entry = READ_ONCE(*pmd);\n",
+  "-\tif (sz != PMD_SIZE && pmd_none(pmd_entry))\n",
+  "+\tif (!pud_present(*pud))\n",
+  " \t\treturn NULL;\n",
+  "-\t/* hugepage or swap? */\n",
+  "-\tif (pmd_huge(pmd_entry) || !pmd_present(pmd_entry))\n",
+  "-\t\treturn (pte_t *)pmd;\n",
+  "+\t/* must have a valid entry and size to go further */\n",
+  " \n",
+  "-\treturn NULL;\n",
+  "+\tpmd = pmd_offset(pud, addr);\n",
+  "+\t/* must be pmd huge, non-present or none */\n",
+  "+\treturn (pte_t *)pmd;\n",
+  " }\n",
+  " \n",
+  " #endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */\n",
+  "_"
 ]
 
-8f157f8c70fd24379cf84488f04adf0f2de6fb5da41a8e5b6af52c3df748164d
+eeb51753ef276a2f09f2fa7521c145abe2f81c0a0fc10387b97bac5963857962

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.