Files
linux/drivers/misc
Ian Abbott 7de4a0e7fe misc: genwqe: check for error from get_user_pages_fast()
commit cf35d6e047 upstream.

`genwqe_user_vmap()` calls `get_user_pages_fast()` and if the return
value is less than the number of pages requested, it frees the pages and
returns an error (`-EFAULT`).  However, it fails to consider a negative
error return value from `get_user_pages_fast()`.  In that case, the test
`if (rc < m->nr_pages)` will be false (due to promotion of `rc` to a
large `unsigned int`) and the code will continue on to call
`genwqe_map_pages()` with an invalid list of page pointers.  Fix it by
bailing out if `get_user_pages_fast()` returns a negative error value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-16 06:59:31 -08:00
..
2013-05-28 12:02:13 +02:00
2013-08-27 08:28:01 -07:00
2012-11-21 12:53:32 -08:00
2013-12-18 16:51:15 -08:00
2013-03-02 08:52:17 -06:00
2013-12-18 16:51:15 -08:00