[PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices"

Add required locking to dfbc9e9d33

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>
This commit is contained in:
Daniel Ritz 2006-11-25 11:09:17 -08:00 committed by Linus Torvalds
parent 1abbfb412b
commit 8e4d9dcb42
1 changed files with 2 additions and 0 deletions

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