i915, fix oops after killing X Null sarea_priv, because next lastclose would have bad address in it if initialization is not called in the meantime.
This is a problem in setups, where drm are closed after X starts. Next lastclose is invoked on X kill. Newer intel drivers (2.2) with EXA support hold the device whole time while X runs. Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> Cc: Dave Airlie <[EMAIL PROTECTED]> --- commit c50f4766654ec13d8dc35f96a8d2c199d6ae5c91 tree 3e3a65f44bedf6d846cbb43a315d2f0bce8b7da2 parent f2e573d8a1b391584c76e95f287010b38867de64 author Jiri Slaby <[EMAIL PROTECTED]> Sun, 16 Dec 2007 19:24:13 +0100 committer Jiri Slaby <[EMAIL PROTECTED]> Sun, 16 Dec 2007 19:24:13 +0100 drivers/char/drm/i915_dma.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index b274554..7a97eea 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c @@ -1335,6 +1335,12 @@ void i915_driver_lastclose(struct drm_device * dev) i915_mem_takedown(&(dev_priv->agp_heap)); i915_dma_cleanup(dev); + + /* Mapping won't survive to the next firstopen anyways. It will + * probably oops without it on next lastclose if we not null it + * here, if it will be mapped anywhere else, but without dma being + * initialized -js */ + dev_priv->sarea_priv = NULL; } void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/