This is a note to let you know that I've just added the patch titled powerpc/thp: Use ACCESS_ONCE when loading pmdp to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-thp-use-access_once-when-loading-pmdp.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7e467245bf5226db34c4b12d3cbacfa2f7a15a8b Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Date: Wed, 13 Aug 2014 12:32:02 +0530 Subject: powerpc/thp: Use ACCESS_ONCE when loading pmdp From: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> commit 7e467245bf5226db34c4b12d3cbacfa2f7a15a8b upstream. We would get wrong results in compiler recomputed old_pmd. Avoid that by using ACCESS_ONCE Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/powerpc/mm/hugepage-hash64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/arch/powerpc/mm/hugepage-hash64.c +++ b/arch/powerpc/mm/hugepage-hash64.c @@ -84,7 +84,9 @@ int __hash_page_thp(unsigned long ea, un * atomically mark the linux large page PMD busy and dirty */ do { - old_pmd = pmd_val(*pmdp); + pmd_t pmd = ACCESS_ONCE(*pmdp); + + old_pmd = pmd_val(pmd); /* If PMD busy, retry the access */ if (unlikely(old_pmd & _PAGE_BUSY)) return 0; Patches currently in stable-queue which might be from aneesh.kumar@xxxxxxxxxxxxxxxxxx are queue-3.14/powerpc-thp-use-access_once-when-loading-pmdp.patch queue-3.14/powerpc-thp-add-write-barrier-after-updating-the-valid-bit.patch queue-3.14/powerpc-mm-use-read-barrier-when-creating-real_pte.patch queue-3.14/powerpc-thp-handle-combo-pages-in-invalidate.patch queue-3.14/powerpc-thp-invalidate-old-64k-based-hash-page-mapping-before-insert-of-4k-pte.patch queue-3.14/powerpc-thp-invalidate-with-vpn-in-loop.patch queue-3.14/powerpc-thp-don-t-recompute-vsid-and-ssize-in-loop-on-invalidate.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html