lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 16 Dec 2007 13:45:46 -0500
From:	Jiri Slaby <jirislaby@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Wang Zhenyu <zhenyu.z.wang@...el.com>
Subject: [PATCH 2/2] DRM: i915, fix oops after killing X

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 <jirislaby@...il.com>
Cc: Dave Airlie <airlied@...ux.ie>

---
commit c50f4766654ec13d8dc35f96a8d2c199d6ae5c91
tree 3e3a65f44bedf6d846cbb43a315d2f0bce8b7da2
parent f2e573d8a1b391584c76e95f287010b38867de64
author Jiri Slaby <jirislaby@...il.com> Sun, 16 Dec 2007 19:24:13 +0100
committer Jiri Slaby <jirislaby@...il.com> 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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ