[patch 2/2] pcmcia: grab lock in resource_release

Dominik Brodowski linux at dominikbrodowski.de
Thu Dec 23 09:20:00 EST 2004


Also lock the ->exit() function in rsrc_nostatic

Signed-off-by: Dominik Brodowski <linux at brodo.de>
---

 drivers/pcmcia/rsrc_nonstatic.c |    2 ++
 1 files changed, 2 insertions(+)

Index: 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c
===================================================================
--- 2.6.10-rc3.orig/drivers/pcmcia/rsrc_nonstatic.c	2004-12-19 00:12:49.697396718 +0100
+++ 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c	2004-12-19 00:14:37.349376304 +0100
@@ -791,6 +791,7 @@
 	struct socket_data *data = s->resource_data;
 	struct resource_map *p, *q;
 
+	down(&rsrc_sem);
 	for (p = data->mem_db.next; p != &data->mem_db; p = q) {
 		q = p->next;
 		kfree(p);
@@ -799,6 +800,7 @@
 		q = p->next;
 		kfree(p);
 	}
+	up(&rsrc_sem);
 }
 
 



More information about the linux-pcmcia mailing list