Re: [PATCH libdrm] freedreno: zero is a valid fd number, treat it as such

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

 



On Mon, Jul 13, 2015 at 02:52:09PM +0100, Emil Velikov wrote:
> Abeit quite unlikely to get hit by this bug here, let just fix it.
> 
> v2: Correct conditional (do not call ioctl(DRM_IOCTL_PRIME_HANDLE_TO_FD)
> when we already have the fd).
> 
> Cc: freedreno@xxxxxxxxxxxxxxxxxxxxx
> Cc: Rob Clark <robdclark@xxxxxxxxx>
> Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
> ---
>  freedreno/freedreno_bo.c | 6 +++---
>  freedreno/kgsl/kgsl_bo.c | 1 +
>  freedreno/msm/msm_bo.c   | 1 +
>  3 files changed, 5 insertions(+), 3 deletions(-)

I think there's another one in kgsl_pipe_destroy(). With that fixed,
this is:

Reviewed-by: Thierry Reding <treding@xxxxxxxxxx>

There are also a couple more like this in omap_drm.c (I suspect Rob
copied from that =) that we may want to fix at the same time (in the
same patch or a separate one).

There's also a few places where an fd is compared to -1 directly, which
should be okay, but might be worth making consistent. I can send a patch
if you're not pedantic enough. =)

Thierry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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