From: William Lee Irwin III <wli@holomorphy.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
"Mr. Berkley Shands" <bshands@exegy.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] general split_vma hugetlb fix
Date: Fri, 11 Feb 2005 12:43:21 -0800 [thread overview]
Message-ID: <20050211204321.GM13009@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0502112001070.16247@goblin.wat.veritas.com>
On Fri, Feb 11, 2005 at 08:06:08PM +0000, Hugh Dickins wrote:
> My recent do_munmap hugetlb fix has proved inadequate. There are
> other places (madvise, mbind, mlock, mprotect) where split_vma is
> called. Only mprotect excludes a hugetlb vma: the others are in
> danger of splitting at a misaligned address, causing later BUGs.
> So move the ~HPAGE_MASK check from do_munmap to split_vma itself;
> and fix up those places (madvise and mlock) which expect split_vma
> can fail only with -ENOMEM, and wish to convert that to -EAGAIN.
> (It appears genuine that some of these syscalls should be failing
> with -ENOMEM and some with -EAGAIN, so respect those behaviours.)
> madvise_dontneed doesn't use split_vma, but is equally in danger
> of causing a hugetlb BUG via zap_page_range. Whereas elsewhere the
> patch is permissive (allowing the operation on a hugetlb vma even when
> pointless, so long as it doesn't missplit it), here we must use -EINVAL
> on any hugetlb vma, since a page fault would hit the BUG in its nopage.
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
As usual, excellent work, Hugh. akpm, Linus, please apply.
Acked-by: William Irwin <wli@holomorphy.com>
-- wli
prev parent reply other threads:[~2005-02-11 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 20:06 [PATCH] general split_vma hugetlb fix Hugh Dickins
2005-02-11 20:43 ` William Lee Irwin III [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=20050211204321.GM13009@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=bshands@exegy.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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