[CRIU] Re: [PATCH] kernel: limit a value of ns_last_pid to (0,
max_pid)
Andrey Wagin
avagin at gmail.com
Mon Sep 3 11:34:47 EDT 2012
2012/9/3 Cyrill Gorcunov <gorcunov at openvz.org>:
> On Mon, Sep 03, 2012 at 07:15:23PM +0400, Andrew Vagin wrote:
>> The kernel doesn't check pid on a negative values, so if
>> you would try to write -2 in /proc/sys/kernel/ns_last_pid,
>> you will get a kernel panic.
>>
>> In this case the next pid is -1, and alloc_pidmap will try to access
>> to a nonexistent pidmap.
>>
>> map = &pid_ns->pidmap[pid/BITS_PER_PAGE];
>
> Looks reasonable to me, thanks Andrew. Would you send it upstream?
Yes. I want to get yours and Pavel's acks
>
> Cyrill
More information about the CRIU
mailing list