linux/drivers/misc/genwqe
Ian Abbott 1a5773af11 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>
History 2015-01-16 06:59:50 -08:00
..
card_base.c GenWQE: Fix checkpatch complaints 2014-09-23 23:15:47 -07:00
card_base.h GenWQE: Support blocking when DDCB queue is busy 2014-09-23 23:15:47 -07:00
card_ddcb.c GenWQE: Support blocking when DDCB queue is busy 2014-09-23 23:15:47 -07:00
card_ddcb.h GenWQE: Update author information 2014-09-23 23:15:46 -07:00
card_debugfs.c GenWQE: Support blocking when DDCB queue is busy 2014-09-23 23:15:47 -07:00
card_dev.c GenWQE: Support blocking when DDCB queue is busy 2014-09-23 23:15:47 -07:00
card_sysfs.c GenWQE: Update author information 2014-09-23 23:15:46 -07:00
card_utils.c misc: genwqe: check for error from get_user_pages_fast() 2015-01-16 06:59:50 -08:00
genwqe_driver.h GenWQE: Update author information 2014-09-23 23:15:46 -07:00
Kconfig GenWQE: Add support for EEH error recovery 2014-07-09 14:14:27 -07:00
Makefile GenWQE Enable driver 2013-12-18 16:51:15 -08:00