[patch] ac17: isa-pnp module unload bug

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Tue Jun 13 2000 - 05:51:41 EST


isapnp_proc_done() should be called before isapnp_free_card(),
otherwise it deals with already freed objects.

Ivan.

--- linux-2.4.0t1ac17/drivers/pnp/isapnp.c Mon Mar 20 05:19:22 2000
+++ linux/drivers/pnp/isapnp.c Mon Jun 12 18:43:11 2000
@@ -2059,14 +2059,14 @@
         if (isapnp_rdp >= 0x203 && isapnp_rdp <= 0x3ff)
                 release_resource(isapnp_rdp_res);
 #ifdef MODULE
+#ifdef CONFIG_PROC_FS
+ isapnp_proc_done();
+#endif
         while (!list_empty(&isapnp_cards)) {
                 struct list_head *list = isapnp_cards.next;
                 list_del(list);
                 isapnp_free_card(pci_bus_b(list));
         }
-#ifdef CONFIG_PROC_FS
- isapnp_proc_done();
-#endif
 #endif
 }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:27 EST