-stable review patch. If anyone has any objections, please let us know. ------------------ From: Daniel Ritz Having unbound PCMCIA devices: doing a 'find /sys' after a 'rmmod pcmcia' gives an oops because the pcmcia_device is not unregisterd from the driver core. fixes bugzilla #7481 Signed-off-by: Daniel Ritz Acked-by: Dominik Brodowski Cc: Pavol Gono Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [chrisw: add subsequent mutex fix] Signed-off-by: Chris Wright --- drivers/pcmcia/ds.c | 5 +++++ 1 file changed, 5 insertions(+) --- linux-2.6.18.4.orig/drivers/pcmcia/ds.c +++ linux-2.6.18.4/drivers/pcmcia/ds.c @@ -1264,6 +1264,11 @@ static void pcmcia_bus_remove_socket(str socket->pcmcia_state.dead = 1; 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); return; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/