Re: [PATCH] dma-buf/udmabuf: Fix NULL pointer dereference in udmabuf_create

From: Gerd Hoffmann
Date: Wed Sep 05 2018 - 02:34:42 EST


On Tue, Sep 04, 2018 at 02:07:49PM -0500, Gustavo A. R. Silva wrote:
> There is a potential execution path in which pointer memfd is NULL when
> passed as argument to fput(), hence there is a NULL pointer dereference
> in fput().
>
> Fix this by null checking *memfd* before calling fput().
>
> Addresses-Coverity-ID: 1473174 ("Explicit null dereferenced")
> Fixes: fbb0de795078 ("Add udmabuf misc device")
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

Pushed to drm-misc-next.

thanks,
Gerd