Re: [PATCH libdrm] omap: Initialize DMA BUF file descriptor to -1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 August 2015 at 09:16, Thierry Reding <thierry.reding@xxxxxxxxx> wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
>
> Commit c86dabfc9f04 ("omap: zero is a valid fd number, treat it as
> such") corrected checks for valid file descriptors, but the OMAP buffer
> object code initializes the DMA-BUF file descriptor to 0 (as a result of
> calloc()'ing the structure). Obviously this isn't going to work because
> subsequent code will try to use file descriptor 0 (most likely stdin at
> that point) as a DMA-BUF. It may also try and close stdin when a buffer
> object is destroyed.
>
> Fix this by initializing the DMA-BUF file descriptor to -1, properly
> marking it as an invalid file descriptor.
>
Sorry about this guys. I should have gone to specsavers ...

> Fixes: c86dabfc9f04 ("omap: zero is a valid fd number, treat it as such")
> Reported-by: Robert Nelson <robertcnelson@xxxxxxxxx>
> Tested-by: Robert Nelson <robertcnelson@xxxxxxxxx>
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
Reviewed-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>

> ---
> Emil, I think this may warrant cutting a new release to unbreak OMAP. I
> can push the patch myself, but I've never done a libdrm release before,
> so maybe you want to do the honors?
>
I would have done it in a second if it wasn't for the lack of feedback
wrt the drmGetDevices API. I've been nudging people to take a look,
perhaps you can do so too :-)

Alternatively I'll cut a new release in a couple of days.

Cheers,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux