[Nouveau] [PATCH] instmem/gk20a: fix crash during error path

Thierry Reding thierry.reding at gmail.com
Wed Mar 11 02:01:39 PDT 2015


On Tue, Mar 10, 2015 at 03:46:08PM +0900, Alexandre Courbot wrote:
> If a memory allocation fails when using the DMA allocator,
> gk20a_instobj_dtor_dma() will be called on the failed instmem object.
> At this time, node->handle might not be NULL despite the call to
> dma_alloc_attrs() having failed. node->cpuaddr is the right member to
> check for such a failure, so use it instead.

Indeed. The DMA address handle is in fact the very opposite of 0 in the
failure case (DMA_ERROR_CODE).

Reviewed-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20150311/988e9d97/attachment.sig>


More information about the Nouveau mailing list