]> www.infradead.org Git - users/dwmw2/linux.git/commit
vmci: type promotion bug in qp_host_get_user_memory()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:33:34 +0000 (12:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:03 +0000 (16:59 -0700)
commite83bd606a14e2e423db7b161907eae6fb4b80976
tree62280d7df9b12f429a0545a6c0b0b533dfca88cc
parent46ba8d1156e78b4d05c3f05d8d902832bfb33965
vmci: type promotion bug in qp_host_get_user_memory()

[ Upstream commit 7fb2fd4e25fc1fb10dcb30b5519de257cfeae84c ]

The problem is that if get_user_pages_fast() fails and returns a
negative error code, it gets type promoted to a high positive value and
treated as a success.

Fixes: 06164d2b72aa ("VMCI: queue pairs implementation.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_queue_pair.c