In the Linux kernel, the following vulnerability has been resolved:
drm/i915: Fix potential context UAFs
gemcontextregister() makes the context visible to userspace, and which point a separate thread can trigger the I915GEMCONTEXTDESTROY ioctl. So we need to ensure that nothing uses the ctx ptr after this. And we need to ensure that adding the ctx to the xarray is the *last* thing that gemcontext_register() does with the ctx pointer.
[tursulin: Stable and fixes tags add/tidy.] (cherry picked from commit bed4b455cf5374e68879be56971c1da563bcd90c)