[Mesa-dev] [Mesa-stable] [PATCH] egl/drm, gallium: replace all calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

Emil Velikov emil.l.velikov at gmail.com
Fri Sep 30 13:35:29 UTC 2016


On 30 September 2016 at 06:47, Matt Whitlock
<freedesktop at mattwhitlock.name> wrote:
> Without this fix, duplicated file descriptors leak into child processes.
> See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance
> where the same fix was employed.
>
> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Matt Whitlock <freedesktop at mattwhitlock.name>
> ---
>  src/egl/drivers/dri2/platform_android.c             | 3 ++-
>  src/gallium/auxiliary/vl/vl_winsys_drm.c            | 3 ++-
>  src/gallium/state_trackers/dri/dri2.c               | 5 +++--
>  src/gallium/state_trackers/xa/xa_tracker.c          | 3 ++-
>  src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 3 ++-
>  src/gallium/winsys/radeon/drm/radeon_drm_winsys.c   | 3 ++-
>  src/gallium/winsys/svga/drm/vmw_screen.c            | 3 ++-
>  src/gallium/winsys/vc4/drm/vc4_drm_winsys.c         | 3 ++-
>  src/gallium/winsys/virgl/drm/virgl_drm_winsys.c     | 2 +-
>  9 files changed, 18 insertions(+), 10 deletions(-)
>
Being the author of some of these - thanks for correction.
Out of curiosity - did you notice some of these by inspection or you
were hit my the leak ?

As the above list, and lengthy one-line summary, indicates this
could/should be split up a bit, even though it's quite trivial fix.
Please do either - one per subsystem (file effectively) or egl,
gallium/auxiliary, st/dri, st/xa & gallium/winsys ?

Thanks again !
Emil


More information about the mesa-dev mailing list