Re: /proc/sys/kernel/pid_max issues

From: Ingo Molnar (mingo_at_elte.hu)
Date: 09/12/04

  • Next message: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"
    Date:	Sun, 12 Sep 2004 11:51:18 +0200
    To: William Lee Irwin III <wli@holomorphy.com>, Anton Blanchard <anton@samba.org>, linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
    
    

    * 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/


  • Next message: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"

    Relevant Pages

    • RE: Error mounting root fs on 72:01 using Promise FastTrak TX2000 (PDC20271)
      ... I think the patch should be included in the official kernel ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • [2.6 patch] cdrom.c: make several functions static (fwd)
      ... The patch forwarded below still applies and compiles against ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ... There had been need of rain for many days. ...
      (Linux-Kernel)
    • [2.6 patch] some parport_pc.c cleanups (fwd)
      ... The patch forwarded below still applies and compiles against ... extern struct parport *parport_pc_probe_port (unsigned long base, ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • RE: kernel BUG at kernel/timer.c:370!
      ... Subject: kernel BUG at kernel/timer.c:370! ... Could you please apply the below patch, wait for the problem to reoccur, ... Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.4 patch] fix a compile warning in tipar.c (fwd)
      ... [2.4 patch] fix a compile warning in tipar.c ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)