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

    mm/hugetlb: set PTE as huge in hugetlb_change_protection and 
remove_migration_pte

to the 3.7-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:
     
mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch
and it can be found in the queue-3.7 subdirectory.

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


>From be7517d6ab9722f0abad6ba5ffd39cfced95549c Mon Sep 17 00:00:00 2001
From: Tony Lu <z...@tilera.com>
Date: Mon, 4 Feb 2013 14:28:46 -0800
Subject: mm/hugetlb: set PTE as huge in hugetlb_change_protection and 
remove_migration_pte

From: Tony Lu <z...@tilera.com>

commit be7517d6ab9722f0abad6ba5ffd39cfced95549c upstream.

When setting a huge PTE, besides calling pte_mkhuge(), we also need to
call arch_make_huge_pte(), which we indeed do in make_huge_pte(), but we
forget to do in hugetlb_change_protection() and remove_migration_pte().

Signed-off-by: Zhigang Lu <z...@tilera.com>
Signed-off-by: Chris Metcalf <cmetc...@tilera.com>
Reviewed-by: Michal Hocko <mho...@suse.cz>
Acked-by: Hillf Danton <dhi...@gmail.com>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 mm/hugetlb.c |    1 +
 mm/migrate.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3028,6 +3028,7 @@ void hugetlb_change_protection(struct vm
                if (!huge_pte_none(huge_ptep_get(ptep))) {
                        pte = huge_ptep_get_and_clear(mm, address, ptep);
                        pte = pte_mkhuge(pte_modify(pte, newprot));
+                       pte = arch_make_huge_pte(pte, vma, NULL, 0);
                        set_huge_pte_at(mm, address, ptep, pte);
                }
        }
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -143,8 +143,10 @@ static int remove_migration_pte(struct p
        if (is_write_migration_entry(entry))
                pte = pte_mkwrite(pte);
 #ifdef CONFIG_HUGETLB_PAGE
-       if (PageHuge(new))
+       if (PageHuge(new)) {
                pte = pte_mkhuge(pte);
+               pte = arch_make_huge_pte(pte, vma, new, 0);
+       }
 #endif
        flush_cache_page(vma, addr, pte_pfn(pte));
        set_pte_at(mm, addr, ptep, pte);


Patches currently in stable-queue which might be from z...@tilera.com are

queue-3.7/mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to