From: Paul Wagland <paul@kungfoocoder.org>
To: Linux SCSI mailing list <linux-scsi@vger.kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: *solved* megaraid /proc under kernel 2.6.2
Date: Tue, 17 Feb 2004 00:04:33 +0100 [thread overview]
Message-ID: <1076972673.2259.56.camel@morsel.kungfoocoder.org> (raw)
In-Reply-To: <1076890712.2943.276.camel@morsel.kungfoocoder.org>
Hi all,
OK, I now know what the problem is with the /proc entries and the
megaraid driver.
It turns out that pci_driver.probe member (in this case
megaraid_probe_one()) is called before the module_init() declared
function, in this case megaraid_init().
The problem is as follows: megaraid_probe_one calls
mega_create_proc_entry() which relies on the fact that megaraid_init()
has already been called. Except, that this fact isn't :-)
So, now that I know what the problem is, does anyone know where the bug
really lies? I.e;
Should megaraid_init() be called before megaraid_probe_one() is called?
That would make this a "kernel bug", for some suitable value of kernel.
or
Should megaraid_probe_one() not rely on megaraid_init() having been
previously called? This would then turn it into a driver bug.
If the latter, when I go in to fix this code, can I assume that
megaraid_probe_one() will only be called once at a time, i.e. that there
is a lock somewhere outside of me that guarantees that I don't have to
worry about re-entrancy issues. Please note that the code already
assumes this!
Should this be asked on linux-kernel?
Thanks in advance for all replies,
Paul
next prev parent reply other threads:[~2004-02-16 23:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-15 22:41 megaraid /proc under kernel 2.6.2 Paul Wagland
2004-02-16 0:18 ` Paul Wagland
2004-02-16 23:04 ` Paul Wagland [this message]
2004-02-17 16:57 ` *solved* " Matthew Wilcox
2004-02-17 17:36 ` Paul Wagland
2004-02-16 1:56 ` Jeff Garzik
2004-02-16 8:33 ` Paul Wagland
2004-02-16 9:59 ` Christoph Hellwig
2004-02-16 21:03 ` Paul Wagland
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=1076972673.2259.56.camel@morsel.kungfoocoder.org \
--to=paul@kungfoocoder.org \
--cc=hch@infradead.org \
--cc=jgarzik@pobox.com \
--cc=linux-scsi@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