diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-04-15 00:42:34 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-05-18 23:15:14 -0400 |
commit | 90af89b93c664f42096ef89edc8f7c7fc776d426 (patch) | |
tree | cdab535b4dbae38cb222ef5cbfd4bdadf8e5035e /drivers | |
parent | de1f46a4b97ad93870a06065cc2ef72e2c89fe35 (diff) |
drm/nouveau: fix a nouveau_bo dereference after it's been destroyed
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index fb164efada3b..6f3c19522377 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -160,11 +160,11 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
160 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, | 160 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, |
161 | ttm_bo_type_device, &nvbo->placement, align, 0, | 161 | ttm_bo_type_device, &nvbo->placement, align, 0, |
162 | false, NULL, size, nouveau_bo_del_ttm); | 162 | false, NULL, size, nouveau_bo_del_ttm); |
163 | nvbo->channel = NULL; | ||
164 | if (ret) { | 163 | if (ret) { |
165 | /* ttm will call nouveau_bo_del_ttm if it fails.. */ | 164 | /* ttm will call nouveau_bo_del_ttm if it fails.. */ |
166 | return ret; | 165 | return ret; |
167 | } | 166 | } |
167 | nvbo->channel = NULL; | ||
168 | 168 | ||
169 | spin_lock(&dev_priv->ttm.bo_list_lock); | 169 | spin_lock(&dev_priv->ttm.bo_list_lock); |
170 | list_add_tail(&nvbo->head, &dev_priv->ttm.bo_list); | 170 | list_add_tail(&nvbo->head, &dev_priv->ttm.bo_list); |