]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[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 a20d84d707d9bff7a264fa4646fa31aa4cb31cc7..21d83a895b21c2ed9d97c7bcaea5750c7671fb79 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);