lkml.org 
[lkml]   [2004]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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?

    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/

    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:0.067 / U:0.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site