public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: alexander.riesen@synopsys.COM
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.5.69+bk: "sleeping function called from illegal context" on card release while shutting down
Date: 13 May 2003 12:28:11 -0500	[thread overview]
Message-ID: <1052846891.2255.31.camel@diemos> (raw)
In-Reply-To: <20030513172114.GH32559@Synopsys.COM>

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:
>  [<c0118bc8>] __might_sleep+0x58/0x70
>  [<c6a31eb6>] +0x82/0x58c [pcmcia_core]
>  [<c6a2d193>] undo_irq+0x23/0x90 [pcmcia_core]
>  [<c6a31eb6>] +0x82/0x58c [pcmcia_core]
>  [<c6a302f8>] pcmcia_release_irq+0xb8/0xe0 [pcmcia_core]
>  [<c6a25e00>] pcnet_release+0x0/0x80 [pcnet_cs]
>  [<c6a312d5>] CardServices+0x155/0x260 [pcmcia_core]
>  [<c6a312c9>] CardServices+0x149/0x260 [pcmcia_core]
>  [<c6a25e56>] pcnet_release+0x56/0x80 [pcnet_cs]
>  [<c01224a4>] run_timer_softirq+0xc4/0x1a0
>  [<c010a8b3>] handle_IRQ_event+0x33/0xf0
>  [<c011e889>] do_softirq+0xa9/0xb0
>  [<c010abb5>] do_IRQ+0x125/0x150
>  [<c01093a8>] 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



  reply	other threads:[~2003-05-13 17:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13 13:57 2.5.69+bk: "sleeping function called from illegal context" on card release while shutting down Alex Riesen
2003-05-13 14:58 ` Felipe Alfaro Solana
2003-05-13 15:31   ` Paul Fulghum
2003-05-13 16:08     ` Russell King
2003-05-13 17:21     ` Alex Riesen
2003-05-13 17:28       ` Paul Fulghum [this message]
2003-05-13 17:33       ` Alex Riesen
2003-05-13 21:52     ` Felipe Alfaro Solana
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13 18:46 Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1052846891.2255.31.camel@diemos \
    --to=paulkf@microgate.com \
    --cc=alexander.riesen@synopsys.COM \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox