Patch "ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE" has been added to the 3.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE

to the 3.19-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:
     ppc-hugetlbfs-replace-access_once-with-read_once.patch
and it can be found in the queue-3.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From da1a288d8562739aa8ba0273d4fb6b73b856c0d3 Mon Sep 17 00:00:00 2001
From: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Date: Tue, 6 Jan 2015 22:47:41 +0100
Subject: ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE

From: Christian Borntraeger <borntraeger@xxxxxxxxxx>

commit da1a288d8562739aa8ba0273d4fb6b73b856c0d3 upstream.

ACCESS_ONCE does not work reliably on non-scalar types. For
example gcc 4.6 and 4.7 might remove the volatile tag for such
accesses during the SRA (scalar replacement of aggregates) step
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145)

Change the ppc/hugetlbfs code to replace ACCESS_ONCE with READ_ONCE.

Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/powerpc/mm/hugetlbpage.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -978,7 +978,7 @@ pte_t *find_linux_pte_or_hugepte(pgd_t *
 		 */
 		pdshift = PUD_SHIFT;
 		pudp = pud_offset(&pgd, ea);
-		pud  = ACCESS_ONCE(*pudp);
+		pud  = READ_ONCE(*pudp);
 
 		if (pud_none(pud))
 			return NULL;
@@ -990,7 +990,7 @@ pte_t *find_linux_pte_or_hugepte(pgd_t *
 		else {
 			pdshift = PMD_SHIFT;
 			pmdp = pmd_offset(&pud, ea);
-			pmd  = ACCESS_ONCE(*pmdp);
+			pmd  = READ_ONCE(*pmdp);
 			/*
 			 * A hugepage collapse is captured by pmd_none, because
 			 * it mark the pmd none and do a hpte invalidate.


Patches currently in stable-queue which might be from borntraeger@xxxxxxxxxx are

queue-3.19/x86-spinlocks-paravirt-fix-memory-corruption-on-unlock.patch
queue-3.19/ppc-hugetlbfs-replace-access_once-with-read_once.patch
queue-3.19/mm-gup-replace-access_once-with-read_once.patch
queue-3.19/kernel-make-read_once-valid-on-const-arguments.patch
queue-3.19/kvm-s390-base-hrtimer-on-a-monotonic-clock.patch
queue-3.19/kernel-tighten-rules-for-access-once.patch
queue-3.19/next-sh-fix-compile-error.patch
queue-3.19/kvm-s390-floating-irqs-fix-user-triggerable-endless-loop.patch
queue-3.19/kvm-s390-forward-hrtimer-if-guest-ckc-not-pending-yet.patch
queue-3.19/ppc-kvm-replace-access_once-with-read_once.patch
queue-3.19/kernel-fix-sparse-warning-for-access_once.patch
queue-3.19/kvm-s390-avoid-memory-leaks-if-__inject_vm-fails.patch
queue-3.19/x86-xen-p2m-replace-access_once-with-read_once.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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]