All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brice Goglin <Brice.Goglin@inria.fr>
To: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Leon Woestenberg <leon.woestenberg@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: get_user_pages() on an mmap()ed file allowed? What to do if 0 <  get_user_pages(..., nr_pages, ...) < nr_pages?
Date: Tue, 04 Aug 2009 11:18:51 +0200	[thread overview]
Message-ID: <4A77FCFB.9020001@inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0908031724200.2296@sister.anvils>

Hugh Dickins wrote:
>> - what should a driver do when get_user_pages() returns less pages
>> than requested?
> 
> Probably put_page the pages gotten then report the surprise;
> perhaps, before putting the pages gotten, try get_user_pages
> on the next alone, to see what error code is returned for that.

I wonder if we should change get_user_pages to store ERR_PTR(ret)
in page[i] when it fails to get page #i.

Brice

  parent reply	other threads:[~2009-08-04  9:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 15:23 get_user_pages() on an mmap()ed file allowed? What to do if 0 < get_user_pages(..., nr_pages, ...) < nr_pages? Leon Woestenberg
2009-08-03 16:30 ` Hugh Dickins
2009-08-04  8:57   ` Leon Woestenberg
2009-08-04  9:50     ` KAMEZAWA Hiroyuki
2009-08-04 10:07       ` Leon Woestenberg
2009-08-04  9:18   ` Brice Goglin [this message]
2009-08-04  9:59     ` Leon Woestenberg
2009-08-04 10:39       ` [PATCH] mm: get_user_pages() stores ERR_PTR() in pages[i] on failure Brice Goglin
2009-08-04 11:20         ` Leon Woestenberg
2009-08-04 12:00         ` Hugh Dickins
2009-08-04 16:25           ` Leon Woestenberg

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=4A77FCFB.9020001@inria.fr \
    --to=brice.goglin@inria.fr \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=leon.woestenberg@gmail.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.