commit | 378f79cab12b669928f3a4037f023837ead2ce0c | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Sat Sep 30 11:15:52 2017 +0300 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Wed Oct 04 10:39:28 2017 +0200 |
tree | 3c1e44ce1b50659550a0a956c2b81d7d8b778b69 | |
parent | a120fbddd59a3d04a63800824ea032dbf1c21b83 [diff] |
misc: pci_endpoint_test: Prevent some integer overflows "size + max" can have an arithmetic overflow when we're allocating: orig_src_addr = dma_alloc_coherent(dev, size + alignment, ... I've added a few checks to prevent that. Fixes: 13107c60681f ("misc: pci_endpoint_test: Add support to provide aligned buffer addresses") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>