From: "dan carpenter" <error27@email.com>
To: linux-kernel@vger.kernel.org
Cc: rusty@rustcorp.com.au, torvalds@transmeta.com, davem@redhat.com
Subject: calling schedule() from interupt context
Date: Fri, 22 Nov 2002 03:54:41 -0500 [thread overview]
Message-ID: <20021122085441.2127.qmail@email.com> (raw)
I was running a script to find which functions call schedule() and I across something
strange.
In drivers/net/tokenring/3c359.c xl_interrupt() calls schedule().
The path from xl_interupt to schedule is:
xl_rx ==> netif_rx ==>
kfree_skb ==> __kfree_skb ==>
secpath_put ==> __secpath_destroy ==>
xfrm_state_put ==> __xfrm_state_destroy ==> xfrm_put_type ==>
module_put ==> put_cpu ==> preempt_schedule ==> schedule
The problem is that xl_interrupt is the interrupt handler for the 3c359 driver and
I did not think it was legal to call shedule() from interrupt context.
The second thing is that module_put() has a line that looks like it's decrementing
the module reference count (Is it supposed to do that?):
176 local_dec(&module->ref[cpu].count);
The third thing I was wondering is: xl_interupt is holding a
spin_lock(&xl_priv->xl_lock). I know that you're not supposed to call shedule()
while holding a spin lock, but is it ok to call preempt_schedule()?
thanks,
dan carpenter
--
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
One click access to the Top Search Engines
http://www.exactsearchbar.com/mailcom
next reply other threads:[~2002-11-22 9:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-22 8:54 dan carpenter [this message]
2002-11-22 9:09 ` David S. Miller
2002-11-22 9:16 ` Robert Love
2002-11-24 21:42 ` Rusty Russell
2002-11-24 22:41 ` Robert Love
2002-11-22 9:14 ` Robert Love
2002-11-22 16:04 dan carpenter
2002-11-22 16:11 ` Robert Love
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=20021122085441.2127.qmail@email.com \
--to=error27@email.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®