Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758338AbWK2WDu (ORCPT ); Wed, 29 Nov 2006 17:03:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758284AbWK2WD0 (ORCPT ); Wed, 29 Nov 2006 17:03:26 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:46548 "EHLO sous-sol.org") by vger.kernel.org with ESMTP id S1758270AbWK2WDQ (ORCPT ); Wed, 29 Nov 2006 17:03:16 -0500 Message-Id: <20061129220453.517238000@sous-sol.org> References: <20061129220111.137430000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Wed, 29 Nov 2006 14:00:23 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, Daniel Ritz , Daniel Ritz , Dominik Brodowski , Pavol Gono Subject: [patch 12/23] pcmcia: fix rmmod pcmcia with unbound devices Content-Disposition: inline; filename=pcmcia-fix-rmmod-pcmcia-with-unbound-devices.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 44 -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/