drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 May 2017 22:55:14 +0000 (15:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 00:15:10 +0000 (17:15 -0700)
commit146180c052a00172f4dc08eaade836fd02f61fb5
treebe2f06a42ba18154515a2efb78db06e14db5201a
parent780cbcf28781511d2cb235c375127265209796a8
drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests

The "DIV_ROUND_UP(size, PAGE_SIZE)" operation can overflow if "size" is
more than ULLONG_MAX - PAGE_SIZE.

Link: http://lkml.kernel.org/r/20170322111950.GA11279@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jorgen Hansen <jhansen@vmware.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/vmw_vmci/vmci_queue_pair.c