Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261678AbTEMRQr (ORCPT ); Tue, 13 May 2003 13:16:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261832AbTEMRQr (ORCPT ); Tue, 13 May 2003 13:16:47 -0400 Received: from h-68-165-86-241.DLLATX37.covad.net ([68.165.86.241]:35625 "EHLO sol.microgate.com") by vger.kernel.org with ESMTP id S261678AbTEMRQk (ORCPT ); Tue, 13 May 2003 13:16:40 -0400 Subject: Re: 2.5.69+bk: "sleeping function called from illegal context" on card release while shutting down From: Paul Fulghum To: alexander.riesen@synopsys.COM Cc: LKML In-Reply-To: <20030513172114.GH32559@Synopsys.COM> References: <20030513135759.GG32559@Synopsys.COM> <1052837896.1000.2.camel@teapot.felipe-alfaro.com> <1052839860.2255.19.camel@diemos> <20030513172114.GH32559@Synopsys.COM> Content-Type: text/plain Organization: Message-Id: <1052846891.2255.31.camel@diemos> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 13 May 2003 12:28:11 -0500 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 44 On Tue, 2003-05-13 at 12:21, Alex Riesen wrote: > Paul Fulghum, Tue, May 13, 2003 17:31:01 +0200: > > Similar to this patch for synclink_cs.c: > ... > > - mod_timer(&link->release, jiffies + HZ/20); > > + mgslpc_release((u_long)link); > > Tried that. This time the trace looks different: > > Debug: sleeping function called from illegal context at include/asm/semaphore.h:119 > Call Trace: > [] __might_sleep+0x58/0x70 > [] +0x82/0x58c [pcmcia_core] > [] undo_irq+0x23/0x90 [pcmcia_core] > [] +0x82/0x58c [pcmcia_core] > [] pcmcia_release_irq+0xb8/0xe0 [pcmcia_core] > [] pcnet_release+0x0/0x80 [pcnet_cs] > [] CardServices+0x155/0x260 [pcmcia_core] > [] CardServices+0x149/0x260 [pcmcia_core] > [] pcnet_release+0x56/0x80 [pcnet_cs] > [] run_timer_softirq+0xc4/0x1a0 > [] handle_IRQ_event+0x33/0xf0 > [] do_softirq+0xa9/0xb0 > [] do_IRQ+0x125/0x150 > [] common_interrupt+0x18/0x20 Hmmm... the pcnet_release() function is still being called from a timer context. Looking at pcnet_cs.c I see that in function pcnet_close() that the release function is being being run from a timer. Try changing that instance to calling pcnet_release() directly as you did in the CS_EVENT handler. -- Paul Fulghum, paulkf@microgate.com Microgate Corporation, http://www.microgate.com - 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/