From: Andreas Schwab <schwab@suse.de>
To: Johannes Weiner <hannes@saeurebad.de>
Cc: Roel Kluin <12o3l@tiscali.nl>,
linux-mm@kvack.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pagewalk: don't pte_unmap(NULL) in walk_pte_range()
Date: Thu, 10 Apr 2008 14:09:00 +0200 [thread overview]
Message-ID: <jer6dd9ajn.fsf@sykes.suse.de> (raw)
In-Reply-To: <87zls3qhop.fsf@saeurebad.de> (Johannes Weiner's message of "Wed\, 09 Apr 2008 15\:30\:30 +0200")
Johannes Weiner <hannes@saeurebad.de> writes:
>> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
>> ---
>> diff --git a/mm/pagewalk.c b/mm/pagewalk.c
>> index 1cf1417..6615f0b 100644
>> --- a/mm/pagewalk.c
>> +++ b/mm/pagewalk.c
>> @@ -15,7 +15,7 @@ static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
>> break;
>> } while (pte++, addr += PAGE_SIZE, addr != end);
>>
>> - pte_unmap(pte);
>> + pte_unmap(pte - 1);
>> return err;
>> }
>
> This does not make any sense to me.
There is something fishy here. If the loop ends because addr == end
then pte has been incremented past the pmd page for addr, no?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstrasse 5, 90409 Nurnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-04-10 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 10:08 Roel Kluin
2008-04-09 13:30 ` Johannes Weiner
2008-04-10 11:42 ` Roel Kluin
2008-04-10 12:09 ` Andreas Schwab [this message]
2008-04-10 14:01 ` [PATCH] Stay below upper pmd boundary on pte range walk Johannes Weiner
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=jer6dd9ajn.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=12o3l@tiscali.nl \
--cc=hannes@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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