Also lock the ->exit() function in rsrc_nostatic Signed-off-by: Dominik Brodowski drivers/pcmcia/rsrc_nonstatic.c | 2 ++ 1 files changed, 2 insertions(+) diff -ruN linux-original/drivers/pcmcia/rsrc_nonstatic.c linux/drivers/pcmcia/rsrc_nonstatic.c --- linux-original/drivers/pcmcia/rsrc_nonstatic.c 2004-11-07 20:48:48.000000000 +0100 +++ linux/drivers/pcmcia/rsrc_nonstatic.c 2004-11-07 20:49:00.000000000 +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); }