[Devel] [PATCH vz8 3/3] pid: Use proper ns in proc_dointvec_pidmax()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 11 21:14:53 MSK 2021


Reviewed and merged into previous patch.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 06/10/2021 02:52 PM, Valeriy Vdovin wrote:
> From: Kirill Tkhai <ktkhai at virtuozzo.com>
>
> Use current task pid ns instead of pid ns for future children
> https://jira.sw.ru/browse/PSBM-121530
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> (cherry-picked from d91a0dc984531d1b94800b56761a3c2559b5f81c)
> https://jira.sw.ru/browse/PSBM-127857
> Signed-off-by: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
> ---
>  kernel/sysctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index e7c9b0e23fbb..7051209d7ec9 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -344,7 +344,7 @@ static int proc_dointvec_pidmax(struct ctl_table *table, int write,
>  	struct ctl_table tmp;
>
>  	tmp = *table;
> -	tmp.data = &current->nsproxy->pid_ns->pid_max;
> +	tmp.data = &task_active_pid_ns(current)->pid_max;
>  	return proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
>  }
>
>


More information about the Devel mailing list