Re: [PATCH] more ZERO_PAGE handling ( was 2.6.24 regression:deadlock on coredump of big process)

From: KAMEZAWA Hiroyuki
Date: Tue May 06 2008 - 22:10:01 EST


On Wed, 30 Apr 2008 08:11:25 +0200
Nick Piggin <npiggin@xxxxxxx> 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.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/