lkml.org 
[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: /proc/sys/kernel/pid_max issues

    * William Lee Irwin III <wli@holomorphy.com> wrote:

    > + if (map > &pidmap_array[pid_max/BITS_PER_PAGE])
    > + map = pidmap_array;

    > - if (offset >= BITS_PER_PAGE)
    > + pid = (map - pidmap_array) * BITS_PER_PAGE + offset;
    > + if (offset >= BITS_PER_PAGE || pid >= pid_max)
    > goto next_map;
    > if (test_and_set_bit(offset, map->page))
    > goto scan_more;
    > -
    > /* we got the PID: */
    > - pid = (map - pidmap_array) * BITS_PER_PAGE + offset;
    > goto return_pid;

    i missed the wrapping, so your patch is the right one:

    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    Ingo
    -
    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:06    [W:0.021 / U:61.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site