diff mbox

i915 driver fails on i686 userspace + x86_64 kernel

Message ID 20131015140050.0496aedd@IRBT4585 (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Roskin Oct. 15, 2013, 6 p.m. UTC
Hi Chris,

It's almost certainly stack corruption.  This "patch" fixes X for me.
The first DRM_IOCTL_MODE_GETCONNECTOR in sna_output_init() must be
overwriting the implied memory bounds.
diff mbox

Patch

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 28151ab..dac834f 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2588,6 +2588,7 @@  sna_output_init(ScrnInfoPtr scrn, struct sna_mode *mode, int num)
 	struct sna *sna = to_sna(scrn);
 	xf86OutputPtr output;
 	struct drm_mode_get_connector conn;
+	int enc_protect[16];
 	struct drm_mode_get_encoder enc;
 	struct drm_mode_modeinfo dummy;
 	struct sna_output *sna_output;
@@ -2600,6 +2601,7 @@  sna_output_init(ScrnInfoPtr scrn, struct sna_mode *mode, int num)
 
 	VG_CLEAR(conn);
 	VG_CLEAR(enc);
+	&enc_protect;
 
 	conn.connector_id = mode->kmode->connectors[num];
 	conn.count_props = 0;