iris: Avoid abort() if kernel can't allocate memory
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 4 Jun 2021 04:13:04 +0000 (12:13 +0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 17 Jun 2021 09:04:17 +0000 (09:04 +0000)
commitf9d8d9acbb6a620684fb4dac4affe25816587d92
tree851b7d842c1418c5cbaa915eac6b1aa385b2c7ef
parentd873e30d3b29582880b23a34e047d965849ae590
iris: Avoid abort() if kernel can't allocate memory

When the system doesn't have enough memory, GNOME Shell may be crashed
by iris:
gnome-shell[1161]: iris: Failed to submit batchbuffer: Cannot allocate memory
gnome-shell[1161]: GNOME Shell crashed with signal 6

So don't abort() when kernel can't allocate memory to avoid crashing the
entire desktop.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11178>
src/gallium/drivers/iris/iris_batch.c