From: Daniel Ritz Date: Sat, 25 Nov 2006 19:09:17 +0000 (-0800) Subject: [PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8e4d9dcb4205dd43c4297168022ed0c6874fb918;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices" Add required locking to dfbc9e9d33adb1ac9910dd7f8ceb911947039a52 Signed-off-by: Daniel Ritz Cc: Dominik Brodowski Cc: Pavol Gono Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index a20d84d707d9..21d83a895b21 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -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);