public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: David Hinds <dahinds@users.sourceforge.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: PCMCIA 2.5.X sleeping from illegal context
Date: 12 May 2003 16:35:32 -0500	[thread overview]
Message-ID: <1052775331.1995.49.camel@diemos> (raw)

The 2.5.X PCMCIA kernel support seems to have a problem
with drivers/pcmcia/rsrc_mgr.c in function undo_irq().

This function is called from pcmcia_release_irq() in
drivers/pcmcia/cs.c

pcmcia_release_irq() is called by individual drivers
when releasing resources.

When a device gets a CS_EVENT_CARD_REMOVAL event from
cs.c, the device sets a timer to call the release
function defined in the device driver to release resources.
This is the convention used with all PCMCIA drivers I
can see.

The release timer function is running in a context where it
is illegal to call a sleeping function.

undo_irq() has added semaphore calls down(rsrc_sem)/up(rsrc_sem)
in 2.5.X which generates the kernel 'sleeping function called
from illegal context at include/asm/semaphore.h' message.

So, are all the PCMCIA drivers supposed to be changed to not
release resources in the timer context? And if so, what
is the new convention?

Or should the synchronization used in undo_irq() be
changed to something that is legal from a timer context.


Thanks,
Paul

-- 
Paul Fulghum, paulkf@microgate.com
Microgate Corporation, http://www.microgate.com



             reply	other threads:[~2003-05-12 21:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12 21:35 Paul Fulghum [this message]
2003-05-12 21:07 ` PCMCIA 2.5.X sleeping from illegal context Alan Cox
2003-05-12 12:36   ` Paul Fulghum
2003-05-12 22:48     ` Russell King
2003-05-13 15:23       ` Paul Fulghum
2003-05-13 16:00         ` David Hinds
2003-05-12 22:31   ` Russell King
2003-05-12 23:16     ` Felipe Alfaro Solana
2003-05-12 23:36       ` Richard B. Johnson
2003-05-12 23:52         ` Paul Fulghum
2003-05-13 13:37         ` Alan Cox
2003-05-13 23:33           ` Andrew Morton
2003-05-14 13:25             ` Henning P. Schmiedehausen
2003-05-13  2:07       ` Thomas Molina
2003-05-13  0:36         ` Felipe Alfaro Solana
2003-05-12 23:11   ` Felipe Alfaro Solana
2003-05-12 22:06 ` David Hinds
2003-05-12 12:37   ` Paul Fulghum
2003-05-12 22:44 ` Andrew Morton
2003-05-12 23:10   ` David Hinds

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=1052775331.1995.49.camel@diemos \
    --to=paulkf@microgate.com \
    --cc=dahinds@users.sourceforge.net \
    --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