[lkml]   [2004]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectproblems with alloc_disk in genhd.c

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?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:04    [W:0.040 / U:17.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site