* re: drm/i915: Switch eviction code to use vmas
@ 2013-08-19 6:59 Dan Carpenter
2013-08-19 7:38 ` Chris Wilson
2013-08-19 22:15 ` Ben Widawsky
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-19 6:59 UTC (permalink / raw)
To: ben; +Cc: intel-gfx, dri-devel
Hello Ben Widawsky,
Here is another use after free warning. It's some new static checker
stuff that I haven't pushed because it has lots of false postives.
The patch f7795b1d0b47: "drm/i915: Switch eviction code to use vmas"
from Aug 14, 2013, leads to the following warning:
"drivers/gpu/drm/i915/i915_gem_evict.c:145 i915_gem_evict_something()
warn: 'vma' was already freed."
drivers/gpu/drm/i915/i915_gem_evict.c
137 /* Unbinding will emit any required flushes */
138 while (!list_empty(&eviction_list)) {
139 vma = list_first_entry(&eviction_list,
140 struct i915_vma,
141 exec_list);
142 if (ret == 0)
143 ret = i915_vma_unbind(vma);
^^^^^^^^^^^^^^^^^^^^
This often frees the "vma".
144
145 list_del_init(&vma->exec_list);
^^^^^^^^^^^^^^^
Dereference.
146 drm_gem_object_unreference(&vma->obj->base);
147 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: drm/i915: Switch eviction code to use vmas
2013-08-19 6:59 drm/i915: Switch eviction code to use vmas Dan Carpenter
@ 2013-08-19 7:38 ` Chris Wilson
2013-08-19 22:15 ` Ben Widawsky
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2013-08-19 7:38 UTC (permalink / raw)
To: Dan Carpenter; +Cc: ben, intel-gfx, dri-devel
On Mon, Aug 19, 2013 at 09:59:14AM +0300, Dan Carpenter wrote:
> Hello Ben Widawsky,
>
> Here is another use after free warning. It's some new static checker
> stuff that I haven't pushed because it has lots of false postives.
>
> The patch f7795b1d0b47: "drm/i915: Switch eviction code to use vmas"
> from Aug 14, 2013, leads to the following warning:
> "drivers/gpu/drm/i915/i915_gem_evict.c:145 i915_gem_evict_something()
> warn: 'vma' was already freed."
>
>
> drivers/gpu/drm/i915/i915_gem_evict.c
> 137 /* Unbinding will emit any required flushes */
> 138 while (!list_empty(&eviction_list)) {
> 139 vma = list_first_entry(&eviction_list,
> 140 struct i915_vma,
> 141 exec_list);
> 142 if (ret == 0)
> 143 ret = i915_vma_unbind(vma);
> ^^^^^^^^^^^^^^^^^^^^
> This often frees the "vma".
>
> 144
> 145 list_del_init(&vma->exec_list);
> ^^^^^^^^^^^^^^^
> Dereference.
>
> 146 drm_gem_object_unreference(&vma->obj->base);
> 147 }
Correct. Patch is en route already, thanks.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: drm/i915: Switch eviction code to use vmas
2013-08-19 6:59 drm/i915: Switch eviction code to use vmas Dan Carpenter
2013-08-19 7:38 ` Chris Wilson
@ 2013-08-19 22:15 ` Ben Widawsky
1 sibling, 0 replies; 3+ messages in thread
From: Ben Widawsky @ 2013-08-19 22:15 UTC (permalink / raw)
To: Dan Carpenter; +Cc: intel-gfx, dri-devel
On Mon, Aug 19, 2013 at 09:59:14AM +0300, Dan Carpenter wrote:
> Hello Ben Widawsky,
>
> Here is another use after free warning. It's some new static checker
> stuff that I haven't pushed because it has lots of false postives.
>
> The patch f7795b1d0b47: "drm/i915: Switch eviction code to use vmas"
> from Aug 14, 2013, leads to the following warning:
> "drivers/gpu/drm/i915/i915_gem_evict.c:145 i915_gem_evict_something()
> warn: 'vma' was already freed."
>
>
> drivers/gpu/drm/i915/i915_gem_evict.c
> 137 /* Unbinding will emit any required flushes */
> 138 while (!list_empty(&eviction_list)) {
> 139 vma = list_first_entry(&eviction_list,
> 140 struct i915_vma,
> 141 exec_list);
> 142 if (ret == 0)
> 143 ret = i915_vma_unbind(vma);
> ^^^^^^^^^^^^^^^^^^^^
> This often frees the "vma".
>
> 144
> 145 list_del_init(&vma->exec_list);
> ^^^^^^^^^^^^^^^
> Dereference.
>
> 146 drm_gem_object_unreference(&vma->obj->base);
> 147 }
>
> regards,
> dan carpenter
>
Hi Dan. This should already be fixed. Do we need to cc:stable this?
http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next-queued&id=a322b7c1fc7e491c797d8015da4c2e5178cada2d
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-19 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 6:59 drm/i915: Switch eviction code to use vmas Dan Carpenter
2013-08-19 7:38 ` Chris Wilson
2013-08-19 22:15 ` Ben Widawsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox