Also lock the ->exit() function in rsrc_nostatic Signed-off-by: Dominik Brodowski Index: 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c =================================================================== --- 2.6.10-rc3.orig/drivers/pcmcia/rsrc_nonstatic.c 2004-12-05 10:26:08.773270464 +0100 +++ 2.6.10-rc3/drivers/pcmcia/rsrc_nonstatic.c 2004-12-05 10:26:08.918248424 +0100 @@ -791,6 +791,7 @@ struct socket_data *data = s->resource_data; struct resource_map_t *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); }