From: Andrew Morton <akpm@digeo.com>
To: Paul Larson <plars@linuxtestproject.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pte_alloc_kernel needs additional check
Date: Mon, 24 Feb 2003 14:33:41 -0800 [thread overview]
Message-ID: <20030224143341.0b3e1faa.akpm@digeo.com> (raw)
In-Reply-To: <1046123680.13919.67.camel@plars>
Paul Larson <plars@linuxtestproject.org> wrote:
>
> This applies against 2.5.63.
> pte_alloc_kernel needs a check for pmd_present(*pmd) at the end.
>
> Thanks,
> Paul Larson
>
> --- linux-2.5.63/mm/memory.c Mon Feb 24 13:05:31 2003
> +++ linux-2.5.63-fix/mm/memory.c Mon Feb 24 15:45:05 2003
> @@ -186,7 +186,9 @@
> pmd_populate_kernel(mm, pmd, new);
> }
> out:
> - return pte_offset_kernel(pmd, address);
> + if (pmd_present(*pmd))
> + return pte_offset_kernel(pmd, address);
> + return NULL;
> }
> #define PTE_TABLE_MASK ((PTRS_PER_PTE-1) * sizeof(pte_t))
> #define PMD_TABLE_MASK ((PTRS_PER_PMD-1) * sizeof(pmd_t))
Confused. I cannot see a codepath which makes this test necessary?
--
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:"aart@kvack.org">aart@kvack.org</a>
next prev parent reply other threads:[~2003-02-24 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-24 21:54 Paul Larson
2003-02-24 22:33 ` Andrew Morton [this message]
2003-02-24 23:45 ` William Lee Irwin III
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=20030224143341.0b3e1faa.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=plars@linuxtestproject.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