[PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices"
authorDaniel Ritz <daniel.ritz-ml@swissonline.ch>
Sat, 25 Nov 2006 19:09:17 +0000 (11:09 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 25 Nov 2006 21:28:33 +0000 (13:28 -0800)
Add required locking to dfbc9e9d33adb1ac9910dd7f8ceb911947039a52

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Pavol Gono <Palo.Gono@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/ds.c

index a20d84d..21d83a8 100644 (file)
@@ -1272,7 +1272,9 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev,
        pccard_register_pcmcia(socket, NULL);
 
        /* unregister any unbound devices */
+       mutex_lock(&socket->skt_mutex);
        pcmcia_card_remove(socket, NULL);
+       mutex_unlock(&socket->skt_mutex);
 
        pcmcia_put_socket(socket);