]> git.baikalelectronics.ru Git - kernel.git/commit
vxge: fix return of a free'd memblock on a failed dma mapping
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Apr 2019 13:45:12 +0000 (14:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Apr 2019 23:54:41 +0000 (16:54 -0700)
commit96a9231ac834550dd2020720fff7eb7eaf7655d8
tree12148eca601733dc0c909d081100a819c2813b56
parentc3b9963d2690dedc992c423df175b6f4f05bf32f
vxge: fix return of a free'd memblock on a failed dma mapping

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: c06013f4be86 ("vxge: code cleanup and reorganization")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-config.c