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-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); }