This is a note to let you know that I've just added the patch titled drm/gem: Always initialize the gem object in object_init to the 3.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-gem-always-initialize-the-gem-object-in-object_init.patch and it can be found in the queue-3.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6ab11a2635ce988ebc2e798947beb72cf7324119 Mon Sep 17 00:00:00 2001 From: Daniel Vetter <daniel.vetter@xxxxxxxx> Date: Mon, 20 Jan 2014 08:21:54 +0100 Subject: drm/gem: Always initialize the gem object in object_init From: Daniel Vetter <daniel.vetter@xxxxxxxx> commit 6ab11a2635ce988ebc2e798947beb72cf7324119 upstream. At least drm/i915 expects that the obj->dev pointer is set even in failure paths. Specifically when the shmem initialization fails we call i915_gem_object_free which needs to deref obj->base.dev to get at the slab pointer in the device private structure. And the shmem allocation can easily fail when userspace is hitting open file limits. Doing the structure init even when the shmem file allocation fails prevents this Oops. This is a regression from commit 89c8233f82d9c8af5b20e72e4a185a38a7d3c50b Author: David Herrmann <dh.herrmann@xxxxxxxxx> Date: Thu Jul 11 11:56:32 2013 +0200 drm/gem: simplify object initialization v2: Add regression note which Chris supplied. Testcase: igt/gem_fd_exhaustion Reported-and-Suggested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> References: http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx> Cc: David Herrmann <dh.herrmann@xxxxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -129,11 +129,12 @@ int drm_gem_object_init(struct drm_devic { struct file *filp; + drm_gem_private_object_init(dev, obj, size); + filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); if (IS_ERR(filp)) return PTR_ERR(filp); - drm_gem_private_object_init(dev, obj, size); obj->filp = filp; return 0; Patches currently in stable-queue which might be from daniel.vetter@xxxxxxxx are queue-3.12/drm-i915-flush-outstanding-requests-before-allocating-new-seqno.patch queue-3.12/drm-i915-vlv2-fix-hotplug-detect-bits.patch queue-3.12/drm-i915-fix-the-offset-issue-for-the-stolen-gem-objects.patch queue-3.12/drm-gem-always-initialize-the-gem-object-in-object_init.patch queue-3.12/i915-remove-pm_qos-request-on-error.patch queue-3.12/drm-i915-decouple-gpu-error-reporting-from-ring-initialisation.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html