Re: [PATCH] vxge: fix return of a free'd memblock on a failed dma mapping

From: David Miller
Date: Fri Apr 12 2019 - 19:55:02 EST


From: Colin King <colin.king@xxxxxxxxxxxxx>
Date: Fri, 12 Apr 2019 14:45:12 +0100

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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 <colin.king@xxxxxxxxxxxxx>

Applied, thanks.