Messages in this thread | | | Date | Wed, 23 Jun 2004 16:18:29 -0500 | From | mikem@beardog ... | Subject | problems 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?
Thanks, mikem
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |