Messages in this thread | | | Date | Sun, 12 Sep 2004 11:51:18 +0200 | From | Ingo Molnar <> | Subject | Re: /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/
| |