linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Cc: Andrew Morton <akpm@digeo.com>, linux-mm@kvack.org
Subject: Re: [PATCH] Really start using the page walking API
Date: Mon, 25 Nov 2002 08:37:59 +0100	[thread overview]
Message-ID: <20021125083759.G5263@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <20021124233449.F5263@nightmaster.csn.tu-chemnitz.de>; from ingo.oeser@informatik.tu-chemnitz.de on Sun, Nov 24, 2002 at 11:34:49PM +0100

Hi Andrew,
hi lkmm,

On Sun, Nov 24, 2002 at 11:34:49PM +0100, Ingo Oeser wrote:
> First: make_pages_present() would do an infinite recursion, if
>    used in find_extend_vma(). I fixed this. Might as well have
>    caused the ntp crash, that has been observed. 
>    So these make_pages_present parts are really important.

Ok, I looked deeper and saw, that the original code had the same
"problem", but it was always ensured, that this recursion is not
triggered.

find_extend_vma() returns right before calling make_pages_present(), if
that vma is not a growable stack. For the second call of
find_extend_vma() (in old get_user_pages() code) this vma has
already been successfully grown, so recursion is limited to one
level and it works by magic ;-)

My latest patch just made that more explicit, by passing the vma
directly from the make_pages_present caller down to the
walk_user_pages() and thus skipping the vma search.

If sth. goes wrong we still catch the BUG_ON() checks, so no harm
will be done to data.

In short: I made deep magic more visible here and reduced stack
   usage again. But I did NOT fix the ntp BUG, because it wasn't
   caused by this code.

Regards
-- 
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
--
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/

  reply	other threads:[~2002-11-25  7:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-24 22:34 Ingo Oeser
2002-11-25  7:37 ` Ingo Oeser [this message]
2002-11-25 13:10 ` Gerd Knorr
2002-11-26  8:40   ` Andrew Morton
2002-11-27 12:33 ` Douglas Gilbert

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=20021125083759.G5263@nightmaster.csn.tu-chemnitz.de \
    --to=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=akpm@digeo.com \
    --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