From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Nick Piggin" <npiggin@suse.de>,
"Mika Penttilä" <mika.penttila@kolumbus.fi>,
"Tony Battersby" <tonyb@cybernetics.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH] more ZERO_PAGE handling ( was 2.6.24 regression: deadlock on coredump of big process)
Date: Wed, 7 May 2008 11:27:07 +0900 [thread overview]
Message-ID: <20080507112708.623bc8fd.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20080507111404.871b8990.kamezawa.hiroyu@jp.fujitsu.com>
On Wed, 7 May 2008 11:14:04 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > pte = *ptep;
> > > - if (!pte_present(pte))
> > > + if (!pte_present(pte)) {
> > > + if (!(flags & FOLL_WRITE) && pte_none(pte)) {
> > > + pte_unmap_unlock(ptep, ptl);
> > > + goto null_or_zeropage;
> > > + }
> > > goto unlock;
> > > + }
> >
> > Just a small nitpick: I guess you don't need this FOLL_WRITE test because
> > null_or_zeropage will test FOLL_ANON which implies !FOLL_WRITE. It should give
> > slightly smaller code.
> >
> > Otherwise, looks good to me:
> >
> Hmm, but
>
> do_execve()
> -> copy_strings()
> -> get_arg_page()
> -> get_user_pages()
>
> can do write-page-fault in ANON (and it's a valid ops.)
>
> So, I think it's safe not to remove FOLL_WRITE check here.
>
BTW, in above case, returning ZERO_PAGE() when pgd/pud/pmd is not available is
safe ? (above path is expanding-stack at exec.)
Thanks,
-Kame
--
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-05-07 2:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 15:11 2.6.24 regression: deadlock on coredump of big process Tony Battersby
2008-04-29 1:00 ` KAMEZAWA Hiroyuki
2008-04-29 14:10 ` Tony Battersby
2008-04-30 4:25 ` [PATCH] more ZERO_PAGE handling ( was 2.6.24 regression: deadlock on coredump of big process) KAMEZAWA Hiroyuki
2008-04-30 4:46 ` Nick Piggin
2008-04-30 5:03 ` Mika Penttilä
2008-04-30 5:09 ` Nick Piggin
2008-04-30 5:17 ` KAMEZAWA Hiroyuki
2008-04-30 5:19 ` Nick Piggin
2008-04-30 5:35 ` KAMEZAWA Hiroyuki
2008-04-30 6:11 ` Nick Piggin
2008-05-07 2:14 ` KAMEZAWA Hiroyuki
2008-05-07 2:27 ` KAMEZAWA Hiroyuki [this message]
2008-04-30 13:57 ` Tony Battersby
2008-05-01 8:39 ` kamezawa.hiroyu
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=20080507112708.623bc8fd.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mika.penttila@kolumbus.fi \
--cc=npiggin@suse.de \
--cc=tonyb@cybernetics.com \
/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