Any comments to this patch? Thanks, Randy
> -----Original Message----- > From: Xu, Randy > Sent: Tuesday, April 18, 2017 2:27 PM > To: mesa-dev@lists.freedesktop.org > Cc: Palli, Tapani <tapani.pa...@intel.com>; Xu, Randy <randy...@intel.com> > Subject: [PATCH] i965: Solve Android native fence fd double close issue > > The Android native fence in i965 driver has two fd, one is from App and > stored in _EGLSync.SyncFd; Another one brw_fence->sync_fd should be the > dup of the first one, not direct copy. > These two fds are closed in dri2_egl_unref_sync in sequence. > > Test: Run Vulkan and GLES stress test and no crash. > > Signed-off-by: Randy Xu <randy...@intel.com> > --- > src/mesa/drivers/dri/i965/brw_sync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_sync.c > b/src/mesa/drivers/dri/i965/brw_sync.c > index 5b78503..a8356c3 100644 > --- a/src/mesa/drivers/dri/i965/brw_sync.c > +++ b/src/mesa/drivers/dri/i965/brw_sync.c > @@ -470,7 +470,7 @@ brw_dri_create_fence_fd(__DRIcontext *dri_ctx, int > fd) > goto fail; > } else { > /* Import the sync fd as an in-fence. */ > - fence->sync_fd = fd; > + fence->sync_fd = dup(fd); > } > > assert(fence->sync_fd != -1); > -- > 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev