From: Daniel Ann <ktdann@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: alloc_skb called nonatomically from interrupt
Date: Tue, 12 Apr 2005 14:24:24 +0900 [thread overview]
Message-ID: <9b7ca6570504112224dc532eb@mail.gmail.com> (raw)
Hiya folks
I'm trying to get a feel of notifier_call_chain(), but with no luck.
This is basically what I've done.
On 2.4.21, I've added dev_sample() function which I've declared and
implemented in include/linux/netdevice.h and net/core/dev.c
respectively.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
int dev_sample(struct net_device *dev)
{
notifier_call_chain(&netdev_chain, NETDEV_SAMPLE, dev);
return 0;
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Of course, I've defined NETDEV_SAMPLE in include/linux/notifier.h
Now up to this stage, its fine. Problem is when I try to call
dev_sample() from driver/net/natsemi.c (my network device driver).
natsemi.c has check_link function which runs periodically and checks
to see if cable is out. So I've placed my dev_sample() in this
function and have it called whenever status of cable changes. But as
soon as the status change, machine dies with "alloc_skb called
nonatomically from interrupt c00ba700", with some printk's I was able
to find out notifier_call_chain() was getting called. But it happens
when it traverses the &netdev_chain. (at the very first one in fact)
I've tried wrapping the dev_sample() with rtnl_lock and unlock but
with no luck. It looks to me its to do with accessing resource at a
wrong time, but I have no idea where to go from here.
Any suggestion would be appreciated.
Cheers,
--
Daniel
reply other threads:[~2005-04-12 5:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9b7ca6570504112224dc532eb@mail.gmail.com \
--to=ktdann@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.