Hi...
Allow me to share my thought here..
As stated in LDD3 p.436 the function get_user_pages can return fewer
pages than requested (have already seen this during testing).
Though I have not been able to find an explanation why it would do it,
and how to act when it does.
After checking the code, I think there are some reasons:
1. You're asking for pages more than the available free pages.
2. You exceed the current length of the VMA where the pages should reside.
3. You exceed the maximum linear address of user space.
The thing is that I also don't know what the 'user' should do if this
error occurs.
Well, IMHO, user space code should bail out, or at least has backup plan
on what to do is the requested amount of memory can't be satisfied.
AFAIK, -ENOMEM usually lead to program termination.
regards,
Mulyadi
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ