[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1106051216450.5792@sister.anvils>
Date: Sun, 5 Jun 2011 12:20:50 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Mel Gorman <mel@....ul.ie>
Subject: Re: [PATCH] mm: Fix wrong kunmap_atomic() pointer
On Fri, 3 Jun 2011, Steven Rostedt wrote:
>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Thanks, Steve: I'm afraid I left a number of those "pte - 1"
landmines around, and this isn't the first one to blow up.
Acked-by: Hugh Dickins <hughd@...gle.com>
> diff --git a/mm/memory.c b/mm/memory.c
> index 6953d39..922dcd6 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1112,11 +1112,13 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
> int force_flush = 0;
> int rss[NR_MM_COUNTERS];
> spinlock_t *ptl;
> + pte_t *start_pte;
> pte_t *pte;
>
> again:
> init_rss_vec(rss);
> - pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
> + start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
> + pte = start_pte;
> arch_enter_lazy_mmu_mode();
> do {
> pte_t ptent = *pte;
> @@ -1196,7 +1198,7 @@ again:
>
> add_mm_rss_vec(mm, rss);
> arch_leave_lazy_mmu_mode();
> - pte_unmap_unlock(pte - 1, ptl);
> + pte_unmap_unlock(start_pte, ptl);
>
> /*
> * mmu_gather ran out of room to batch pages, we break out of
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists