Re: get_user_pages() on an mmap()ed file allowed? What to do if 0< get_user_pages(..., nr_pages, ...) < nr_pages?

From: Brice Goglin
Date: Tue Aug 04 2009 - 05:18:47 EST


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
--
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/