gallium/rtasm: handle mmap failures appropriately
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 10 Jan 2014 18:00:17 +0000 (18:00 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 27 Jan 2014 13:24:51 +0000 (13:24 +0000)
commit4dd445f1cf80292f10eda53665cefc2a674d838d
tree9b3694b5cdac5b0ed6dbb29a2cc0601d870e2ea2
parente5e4120723f7aa927faadca96910d4e8cbd99f40
gallium/rtasm: handle mmap failures appropriately

For a variety of reasons mmap (selinux and pax to name
a few) and can fail and with current code. This will
result in a crash in the driver, if not worse.

This has been the case since the inception of the
gallium copy of rtasm.

Cc: 9.1 9.2 10.0 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73473
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/auxiliary/rtasm/rtasm_execmem.c