[PATCH] validate_mem without CONFIG_ISA - 2.4.x backport

Pavel Roskin proski at gnu.org
Wed May 14 19:48:19 BST 2003


Hello!

My patch to fix a crash in validate_mem() without CONFIG_ISA defined
(http://lists.infradead.org/pipermail/linux-pcmcia/2003-April/000039.html)
needs to be applied to 2.4.x kernels as well.  The patch against
2.4.21-rc2-ac2 is attached.

Can anybody apply or forward the patch or I should send it in Marcelo
and/or Alan myself?

-- 
Regards,
Pavel Roskin-------------- next part --------------
--- linux.orig/drivers/pcmcia/rsrc_mgr.c
+++ linux/drivers/pcmcia/rsrc_mgr.c
@@ -419,14 +419,17 @@ void validate_mem(int (*is_valid)(u_long
 void validate_mem(int (*is_valid)(u_long), int (*do_cksum)(u_long),
 		  int force_low, socket_info_t *s)
 {
-    resource_map_t *m;
+    resource_map_t *m, *n;
     static int done = 0;
     
     if (!probe_mem || done++)
 	return;
-    for (m = mem_db.next; m != &mem_db; m = m->next)
+
+    for (m = mem_db.next; m != &mem_db; m = n) {
+	n = m->next;
 	if (do_mem_probe(m->base, m->num, is_valid, do_cksum, s))
 	    return;
+    }
 }
 
 #endif /* CONFIG_ISA */


More information about the linux-pcmcia mailing list