From: Hugh Dickins <hughd@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH] mm: Fix wrong kunmap_atomic() pointer
Date: Sun, 5 Jun 2011 12:20:50 -0700 (PDT) [thread overview]
Message-ID: <alpine.LSU.2.00.1106051216450.5792@sister.anvils> (raw)
In-Reply-To: <1307158665.3667.86.camel@gandalf.stny.rr.com>
On Fri, 3 Jun 2011, Steven Rostedt wrote:
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.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@google.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
prev parent reply other threads:[~2011-06-05 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 3:37 Steven Rostedt
2011-06-04 3:54 ` Steven Rostedt
2011-06-04 4:14 ` Andrew Morton
2011-06-05 19:20 ` Hugh Dickins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.00.1106051216450.5792@sister.anvils \
--to=hughd@google.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®