[PATCH] drm, i915: Fix memory leak in i915_gem_busy_ioctl().

Chris Wilson chris at chris-wilson.co.uk
Sat Nov 26 08:53:23 PST 2011


On Sat, 26 Nov 2011 22:29:12 +0600, Rakib Mullick <rakib.mullick at gmail.com> wrote:
> Yes, no real problem with current code. I was just thinking from code
> cleanup's pov. Is BUG_ON really needed in i915_add_request() ?

No, just documentation as a reminder that the request should be
preallocated, ideally so that we can fail gracefully without touching
hardware and leaving it in an inconsistent state wrt to our bookkeeping.
(This is more apparent in the overlay code which could hang the
chip/driver if we hit a malloc error too late.)

The BUG_ON has certainly outlived its usefulness.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list