Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb8236f2b978e8ed84e8b664882905fb5a7dd6c8
Commit:     bb8236f2b978e8ed84e8b664882905fb5a7dd6c8
Parent:     50d266a3a1b6a284aed7e06b599668ec23b28d6f
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 12 22:55:39 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Mar 12 22:55:39 2007 -0700

    [SPARC64]: Add missing HPAGE_MASK masks on address parameters.
    
    These pte loops all assume the passed in address is HPAGE
    aligned, make sure that is actually true.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/mm/hugetlbpage.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 33fd0b2..00677b5 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -248,6 +248,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long 
addr,
        if (!pte_present(*ptep) && pte_present(entry))
                mm->context.huge_pte_count++;
 
+       addr &= HPAGE_MASK;
        for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
                set_pte_at(mm, addr, ptep, entry);
                ptep++;
@@ -266,6 +267,8 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, 
unsigned long addr,
        if (pte_present(entry))
                mm->context.huge_pte_count--;
 
+       addr &= HPAGE_MASK;
+
        for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
                pte_clear(mm, addr, ptep);
                addr += PAGE_SIZE;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to