OSDN Git Service

minigbm: ensure drm_prime_handle struct is correctly initialized
authorVincent Palatin <vpalatin@chromium.org>
Fri, 8 Apr 2016 17:03:52 +0000 (10:03 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 14 Apr 2016 01:37:16 +0000 (18:37 -0700)
commitab9e5e0d704c8e8171a797bd3be49ee90c92bef6
tree000517cf1540140e8eb18c21f9de56201c987426
parentb96ffe1983295492bc4b4f28b22d6f0e78af69ef
minigbm: ensure drm_prime_handle struct is correctly initialized

the 'prime_handle' variable has a 'flags' and the kernel code for
DRM_IOCTL_PRIME_FD_TO_HANDLE will fail if 'flags' contains something
else than DRM_CLOEXEC or 0.
Right now, the 'flags' field is uninitialized and DRM initialization
fails on some VM configs with kernel 4.4.

BUG=chromium:591626
TEST=run null_platform_test and Chrome browser using the arm64-llvmpipe
overlay and kernel 4.4 on QEMU VM.

Change-Id: Ieac8eb280fe14f1e268f8869dcc9fe46c1bb9599
Reviewed-on: https://chromium-review.googlesource.com/337970
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
gbm.c