From: Dan Carpenter <dan.carpenter@oracle.com>
To: ben@bwidawsk.net
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: re: drm/i915: Switch eviction code to use vmas
Date: Mon, 19 Aug 2013 09:59:14 +0300 [thread overview]
Message-ID: <20130819065914.GD28591@elgon.mountain> (raw)
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
next reply other threads:[~2013-08-19 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 6:59 Dan Carpenter [this message]
2013-08-19 7:38 ` drm/i915: Switch eviction code to use vmas Chris Wilson
2013-08-19 22:15 ` Ben Widawsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130819065914.GD28591@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=ben@bwidawsk.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.