3.16.72-rc1 review patch. If anyone has any objections, please let me know.
------------------ From: Colin Ian King <[email protected]> commit 0a2c34f18c94b596562bf3d019fceab998b8b584 upstream. Currently if a pci dma mapping failure is detected a free'd memblock address is returned rather than a NULL (that indicates an error). Fix this by ensuring NULL is returned on this error case. Addresses-Coverity: ("Use after free") Fixes: 528f727279ae ("vxge: code cleanup and reorganization") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <[email protected]> --- drivers/net/ethernet/neterion/vxge/vxge-config.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c @@ -2381,6 +2381,7 @@ static void *__vxge_hw_blockpool_malloc( vxge_os_dma_free(devh->pdev, memblock, &dma_object->acc_handle); status = VXGE_HW_ERR_OUT_OF_MEMORY; + memblock = NULL; goto exit; }

