linux/drivers/misc/genwqe
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>
History 2015-01-16 06:59:31 -08:00
..
card_base.c GenWQE PCI support, health monitoring and recovery 2013-12-18 16:51:15 -08:00
card_base.h GenWQE: Fix compile problems for Alpha 2014-01-08 15:22:15 -08:00
card_ddcb.c GenWQE: Fix compile problems for Alpha 2014-01-08 15:22:15 -08:00
card_ddcb.h GenWQE Character device and DDCB queue 2013-12-18 16:51:15 -08:00
card_debugfs.c GenWQE Debugfs interfaces 2013-12-18 16:51:15 -08:00
card_dev.c misc: genwqe: Fix potential memory leak when pinning memory 2014-02-07 15:24:31 -08:00
card_sysfs.c GenWQE Sysfs interfaces 2013-12-18 16:51:15 -08:00
card_utils.c misc: genwqe: check for error from get_user_pages_fast() 2015-01-16 06:59:31 -08:00
genwqe_driver.h GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug 2013-12-20 08:47:29 -08:00
Kconfig GenWQE Enable driver 2013-12-18 16:51:15 -08:00
Makefile GenWQE Enable driver 2013-12-18 16:51:15 -08:00