From: Ben Skeggs <skeggsb@gmail.com>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: fix two regressions since move_notify changes
Date: Wed, 25 Jan 2012 18:38:44 +1000 [thread overview]
Message-ID: <1327480724.5189.10.camel@nisroch> (raw)
In-Reply-To: <CAPM=9ty2HVARN2kdQpbqO9RQLi_67cBRT00QU2sx75DrksuTVQ@mail.gmail.com>
On Wed, 2012-01-25 at 08:24 +0000, Dave Airlie wrote:
> On Wed, Jan 25, 2012 at 5:34 AM, Ben Skeggs <skeggsb@gmail.com> wrote:
> > From: Ben Skeggs <bskeggs@redhat.com>
> >
> > Both changes in dc97b3409a790d2a21aac6e5cdb99558b5944119 cause serious
> > regressions in the nouveau driver.
> >
> > move_notify() was originally able to presume that bo->mem is the old node,
> > and new_mem is the new node. The above commit moves the call to
> > move_notify() to after move() has been done, which means that now, sometimes,
> > new_mem isn't the new node at all, bo->mem is, and new_mem points at a
> > stale, possibly-just-been-killed-by-move node.
> >
> > This is clearly not a good situation. This patch reverts this change, and
> > replaces it with a cleanup in the move() failure path instead.
> >
> > The second issue is that the call to move_notify() from cleanup_memtype_use()
> > causes the TTM ghost objects to get passed into the driver. This is clearly
> > bad as the driver knows nothing about these "fake" TTM BOs, and ends up
> > accessing uninitialised memory.
>
> btw we've had this check in radeon for a long time.
> radeon_ttm_bo_is_radeon_bo
>
> not sure how you haven't gotten a ghost object in there up until now.
I don't believe there was any possible way a ghost object could've ended
up in move_notify() until recently.
I did notice radeon had checks a long time ago, and always wondered why
it bothered when the ghost object is only ever hooked onto the delayed
delete list and not really touched by the driver again..
Ben.
>
> Dave.
next prev parent reply other threads:[~2012-01-25 8:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 21:31 [next] Null pointer dereference in nouveau_vm_map_sg Martin Nyhus
2012-01-16 20:30 ` Jerome Glisse
2012-01-16 23:57 ` Martin Nyhus
2012-01-22 18:33 ` Konrad Rzeszutek Wilk
2012-01-24 22:33 ` Jerome Glisse
2012-01-25 0:12 ` Martin Nyhus
2012-01-25 16:54 ` Jerome Glisse
2012-01-25 5:34 ` [PATCH] drm/ttm: fix two regressions since move_notify changes Ben Skeggs
2012-01-25 7:43 ` Thomas Hellstrom
2012-01-25 8:05 ` Ben Skeggs
2012-01-25 8:39 ` Thomas Hellstrom
2012-01-25 9:41 ` Ben Skeggs
2012-01-25 14:33 ` Thomas Hellstrom
2012-01-25 15:21 ` Ben Skeggs
2012-01-25 15:37 ` Jerome Glisse
2012-01-25 17:15 ` Thomas Hellstrom
2012-01-25 17:19 ` Thomas Hellstrom
2012-01-25 18:12 ` Dave Airlie
2012-01-25 18:21 ` Thomas Hellstrom
2012-01-25 18:51 ` Jerome Glisse
2012-01-25 8:24 ` Dave Airlie
2012-01-25 8:38 ` Ben Skeggs [this message]
2012-01-25 17:32 ` Thomas Hellstrom
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=1327480724.5189.10.camel@nisroch \
--to=skeggsb@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@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.