summaryrefslogtreecommitdiff
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorAlex Dewar <alex.dewar90@gmail.com>2020-08-25 19:45:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-28 13:31:39 +0300
commit90ca6333fd65f318c47bff425e1ea36c0a5539f6 (patch)
tree9d176dcafbd4d520ed292a583406396b85e2389a /drivers/char/lp.c
parentda0d6b3a536bc800cb46b35cc75327fd546b6272 (diff)
downloadlinux-90ca6333fd65f318c47bff425e1ea36c0a5539f6.tar.xz
VMCI: check return value of get_user_pages_fast() for errors
In a couple of places in qp_host_get_user_memory(), get_user_pages_fast() is called without properly checking for errors. If e.g. -EFAULT is returned, this negative value will then be passed on to qp_release_pages(), which expects a u64 as input. Fix this by only calling qp_release_pages() when we have a positive number returned. Fixes: 06164d2b72aa ("VMCI: queue pairs implementation.") Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Link: https://lore.kernel.org/r/20200825164522.412392-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/lp.c')
0 files changed, 0 insertions, 0 deletions