Re: [PATCH] drm/gem: Always initialize the gem object in object_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 20, 2014 at 08:21:54AM +0100, Daniel Vetter wrote:
> 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.

Regression from 
commit 89c8233f82d9c8af5b20e72e4a185a38a7d3c50b
Author: David Herrmann <dh.herrmann@xxxxxxxxx>
Date:   Thu Jul 11 11:56:32 2013 +0200

    drm/gem: simplify object initialization

> 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
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: David Herrmann <dh.herrmann@xxxxxxxxx>

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux