From: mikem@beardog.cca.cpqcorp.net
To: linux-kernel@vger.kernel.org
Cc: viro@www.linux.org.uk, bob.montgomery@hp.com
Subject: problems with alloc_disk in genhd.c
Date: Wed, 23 Jun 2004 16:18:29 -0500 [thread overview]
Message-ID: <20040623211829.GC16336@beardog.cca.cpqcorp.net> (raw)
We've encountered a problem using one of our internal test tools. It calls
our CCISS_GETLUNINFO ioctl for partition info. In the *alloc_disk(int minors)
function it only tests for the max_number_of_parts - 1.
if (minors > 1) {
int size = (minors - 1) * sizeof(struct hd_struct *);
When we allocate space we pass in
for (n = 0; n < NWD; n++) {
disk[n] = alloc_disk(1 << NWD_SHIFT);
In the ioctl we are doing
/* count partitions 1 to 15 with sizes > 0 */
for(i=0; i <MAX_PART; i++) {
Depending on what lies beyond the array we have seen either Oops's or
a hard lock with a reboot about 30 seconds later. If we pass in MAX_PART - 1
we have no problems.
Is the entire disk no longer counted as partition zero?
Other drivers also pass in their max part value. Have any other problems
been reported?
Thanks,
mikem
next reply other threads:[~2004-06-23 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-23 21:18 mikem [this message]
2004-06-23 21:24 ` viro
2004-06-23 21:55 ` mikem
2004-06-23 22:03 ` viro
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=20040623211829.GC16336@beardog.cca.cpqcorp.net \
--to=mikem@beardog.cca.cpqcorp.net \
--cc=bob.montgomery@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@www.linux.org.uk \
/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®