[lkml]   [2019]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.16 082/157] vxge: fix return of a free'd memblock on a failed dma mapping
3.16.72-rc1 review patch.  If anyone has any objections, please let me know.


From: Colin Ian King <>

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 <>
Signed-off-by: David S. Miller <>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <>
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,
+ memblock = NULL;
goto exit;

 \ /
  Last update: 2019-08-10 22:47    [W:0.350 / U:23.236 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site