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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231550011.5317.72.camel@dax.rpnet.com>
Date:	Sat, 10 Jan 2009 01:13:31 +0000
From:	Richard Purdie <rpurdie@...ux.intel.com>
To:	Dave Airlie <airlied@...ux.ie>
Cc:	dri-devel@...ts.sf.net, linux-kernel@...r.kernel.org
Subject: Re: [git pull] drm

On Fri, 2009-01-09 at 18:03 +0000, Richard Purdie wrote:
> On Fri, 2009-01-09 at 15:07 +0000, Richard Purdie wrote:
> > I just updated to the latest kernel from git to test some other patches
> > and after logging into GDM the X server hangs before launching the
> > desktop (it appears to be trying to run glxinfo) on my Thinkpad T61
> > (i915 graphics). Bisection shows this happens after applying this
> > commit:
> > 
> > On Mon, 2008-12-29 at 08:32 +0000, Dave Airlie wrote:
> > > commit 7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a
> > > Author: Dave Airlie <airlied@...hat.com>
> > > Date:   Fri Nov 28 14:22:24 2008 +1000

The patch below gets my system working again with the latest kernels.
Was dropping the drm_addmap() call for i915 intentional or not?


drm: Fix userspace X lockups introduced in 7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a

Add back the drm_addmap() call that was dropped as part of commit
7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a for the i915 driver, fixing X
userspace lockups.

Signed-off-by: Richard Purdie <rpurdie@...ux.intel.com>

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 62a4bf7..db61d89 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -29,6 +29,7 @@
 #include "drmP.h"
 #include "drm.h"
 #include "drm_crtc_helper.h"
+#include "drm_sarea.h"
 #include "intel_drv.h"
 #include "i915_drm.h"
 #include "i915_drv.h"
@@ -1007,11 +1008,24 @@ out:
 int i915_master_create(struct drm_device *dev, struct drm_master *master)
 {
 	struct drm_i915_master_private *master_priv;
+	unsigned long sareapage;
+	int ret;
 
 	master_priv = drm_calloc(1, sizeof(*master_priv), DRM_MEM_DRIVER);
 	if (!master_priv)
 		return -ENOMEM;
 
+	/* prebuild the SAREA */
+	sareapage = max(SAREA_MAX, PAGE_SIZE);
+	ret = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK|_DRM_DRIVER,
+			 &master_priv->sarea);
+	if (ret) {
+		DRM_ERROR("SAREA setup failed\n");
+		return ret;
+	}
+
+	master_priv->sarea_priv = master_priv->sarea->handle + sizeof(struct drm_sarea);
+
 	master->driver_priv = master_priv;
 	return 0;
 }
@@ -1023,6 +1037,9 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master)
 	if (!master_priv)
 		return;
 
+	if (master_priv->sarea)
+		drm_rmmap(dev, master_priv->sarea);
+
 	drm_free(master_priv, sizeof(*master_priv), DRM_MEM_DRIVER);
 
 	master->driver_priv = NULL;


--
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