[Intel-gfx] [PATCH] drm/i915: Don't try to deref an unbound VMA

Daniel Vetter daniel at ffwll.ch
Thu Jul 18 08:47:18 CEST 2013


On Wed, Jul 17, 2013 at 07:32:33PM -0700, Ben Widawsky wrote:
> This was actually correct in the original series, and is also fixed
> later in the patch series, but was broken in this middle state.
> 
> I'm not really certain how I didn't hit it sooner.
> 
> This patch should be squashed into:
> commit 8f588cfc349bbbd8ae62a13679b9efba41645064
> Author: Ben Widawsky <ben at bwidawsk.net>
> Date:   Wed Jul 17 12:19:03 2013 -0700
> 
>     drm/i915: Create VMAs
> 
> CC: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

Squashed in, thanks for the quick fixup.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a9fa2bb..c9487bb 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3314,7 +3314,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
>  		return -EBUSY;
>  	}
>  
> -	if (!i915_gem_valid_gtt_space(dev, &vma->node, cache_level)) {
> +	if (vma && !i915_gem_valid_gtt_space(dev, &vma->node, cache_level)) {
>  		ret = i915_gem_object_unbind(obj);
>  		if (ret)
>  			return ret;
> -- 
> 1.8.3.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list