VMCI: Guard against overflow in queue pair allocation
authorJorgen Hansen <jhansen@vmware.com>
Mon, 2 Mar 2015 16:19:11 +0000 (08:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2015 10:32:15 +0000 (11:32 +0100)
commitaa6467f190d32b263f7144239c89c63c922d9ff8
tree31c580c58722854adb00b2bd991f8ca17913869c
parent74b5c297f5ecbef0ca128fa7b385b43f036a7984
VMCI: Guard against overflow in queue pair allocation

The current maximum size of a queue in a queue pair is 128 MB. If
we increase that in the future, the queue pair allocation routines
may run into overflow issues. This change adds additional checks
to guard against this.

Acked-by: Andy King <acking@vmware.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_driver.c
drivers/misc/vmw_vmci/vmci_queue_pair.c