Re: /proc/sys/kernel/pid_max issues
From: Ingo Molnar (mingo_at_elte.hu)
Date: 09/12/04
- Previous message: Ingo Molnar: "Re: /proc/sys/kernel/pid_max issues"
- In reply to: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"
- Next in thread: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Previous message: Ingo Molnar: "Re: /proc/sys/kernel/pid_max issues"
- In reply to: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"
- Next in thread: William Lee Irwin III: "Re: /proc/sys/kernel/pid_max issues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|