Linus Torvalds writes: (Summary) wrote:
NAK.
NAK.
__get_user_pages_fast() returns the number of pages it gets. It has never returned an error code, and all the other versions of it (architecture-specific) don't either.
(architecture-specific) don't either.
If you ask for one page, and get zero pages, then that's an -EFAULT. Fix the docs, and fix the users.
docs, and fix the users.
The correct use has always been to check the number of pages returned. The actual get_user_pages() function itself is expressly being careful *not* to return an error code, it even has a comment to the effect ("Have to be a bit careful with return values").
[...]
through the vhost tree unless someone objects.NAK.
NAK.
__get_user_pages_fast() returns the number of pages it gets. It has never returned an error code, and all the other versions of it (architecture-specific) don't either.
(architecture-specific) don't either.
If you ask for one page, and get zero pages, then that's an -EFAULT. Fix the docs, and fix the users.
docs, and fix the users.
The correct use has always been to check the number of pages returned. The actual get_user_pages() function itself is expressly being careful *not* to return an error code, it even has a comment to the effect ("Have to be a bit careful with return values").