aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-10-30 07:44:56 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2011-12-22 13:54:58 -0500
commit40c34d042dc2f8954d5f619f6348a8659a4b416f (patch)
treec488dd68c7b146adc0e1de4f870208b9427ad42f
parent87499ffdcb1c70f66988cd8febc4ead0ba2f9118 (diff)
drm/i810: don't acces hw regs in lastclose
i810 uses a userspace provided mmio map using the drm core map infrastructure. By the time we reach lastclose, this is all gone and our mmio_map pointer points at freed memory. Depending upon luck that still works, most often it just oopses. Aside: drm maps aren't refcounted, so userspace can essentially oops the kernel any time it wants to. Who cares. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i810/i810_dma.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index 6b73c3e57d63..f7c17b239833 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -222,8 +222,6 @@ static int i810_dma_cleanup(struct drm_device *dev)
222 pci_free_consistent(dev->pdev, PAGE_SIZE, 222 pci_free_consistent(dev->pdev, PAGE_SIZE,
223 dev_priv->hw_status_page, 223 dev_priv->hw_status_page,
224 dev_priv->dma_status_page); 224 dev_priv->dma_status_page);
225 /* Need to rewrite hardware status page */
226 I810_WRITE(0x02080, 0x1ffff000);
227 } 225 }
228 kfree(dev->dev_private); 226 kfree(dev->dev_private);
229 dev->dev_private = NULL; 227 dev->dev_private = NULL;