st/xa: Don't close the drm fd on failure v2
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 3 Jul 2014 09:07:36 +0000 (02:07 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 3 Jul 2014 09:55:00 +0000 (02:55 -0700)
commit35cf3831d71770211f29da6608313dc1f6213d7b
tree2c73b28bfbdc96025038ca6c31d264fd03095d49
parent370184e813b25b463ad3dc9ca814231c98b95864
st/xa: Don't close the drm fd on failure v2

If XA fails to initialize with pipe_loader enabled, the pipe_loader's
cleanup function will close the drm file descriptor. That's pretty bad
because the file descriptor will probably be the X server driver's only
connection to drm. Temporarily solve this by dup()'ing the file descriptor
before handing it over to the pipe loader.

This fixes freedesktop.org bugzilla bug #80645.

v2: Fix CC addresses.

Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/state_trackers/xa/xa_tracker.c