[PATCH] Radeon 9/11 : Fix modelist list linkage

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Dec 5 02:00:05 PST 2004


RadeonValidateFPModes() has a bug where it could try to dereference
a NULL pointer in some cases when linking in modes. This fixes it.

Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
===================================================================
--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:22:11.921507352 +1100
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:22:15.015037064 +1100
@@ -3283,8 +3283,9 @@
 		new->next       = NULL;
 		new->prev       = last;
 
-		last->next = new;
+		if (last) last->next = new;
 		last = new;
+		if (!first) first = new;
 	    }
 	}
     }





More information about the xorg mailing list