]> err.no Git - linux-2.6/commitdiff
[POWERPC] Make high hugepage areas preempt safe
authorHugh Dickins <hugh@veritas.com>
Tue, 31 Oct 2006 18:40:39 +0000 (18:40 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 1 Nov 2006 03:52:48 +0000 (14:52 +1100)
Checking source for other get_paca()->field preemption dangers found that
open_high_hpage_areas does a structure copy into its paca while preemption
is enabled: unsafe however gcc accomplishes it.  Just remove that copy:
it's done safely afterwards by on_each_cpu, as in open_low_hpage_areas.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/hugetlbpage.c

index 5615acc295279366e7ac448011cf41db92369ab4..fd68b74c07c3c4e5c457371c1dd54c52767cec8a 100644 (file)
@@ -480,9 +480,6 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 
        mm->context.high_htlb_areas |= newareas;
 
-       /* update the paca copy of the context struct */
-       get_paca()->context = mm->context;
-
        /* the context change must make it to memory before the flush,
         * so that further SLB misses do the right thing. */
        mb();