From: Kirill Ratkin <kratkin@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: I can loop dev_base only once. Why?
Date: Fri, 12 Oct 2001 07:52:47 -0700 (PDT) [thread overview]
Message-ID: <20011012145247.62082.qmail@web11903.mail.yahoo.com> (raw)
Hi. I have a problem.
I write module which scans network device list.
I made:
int init(void)
{
struct net_device *dev, **dp;
printk("<1>Ok\n");
while ((dev = *dp) != NULL) {
printk("<1>Searching ...\n");
write_lock_bh(&dev_base_lock);
/* ... here I change one fileld ... */
*dp = dev->next;
write_unlock_bh(&dev_base_lock);
}
return 0;
}
void cleanup(void)
{
while ((dev = *dp) != NULL) {
write_lock_bh(&dev_base_lock);
/* ... here turn change back ... */
*dp = dev->next;
write_unlock_bh(&dev_base_lock);
}
}
The problem:
This code works only once. Then I remove module and
start it again I see only 'Ok' string. Could you
explain me where is problem?
Regards,
Kirill.
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
reply other threads:[~2001-10-12 14:52 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=20011012145247.62082.qmail@web11903.mail.yahoo.com \
--to=kratkin@yahoo.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
all inboxes | Powered by JetHome®