lkml.org 
[lkml]   [2017]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v6,1/2] pid: Replace pid bitmap implementation with IDR API
On 10/19, Andrei Vagin wrote:
>
> Hi Gargi,
>
> This patch breaks CRIU, because it changes a meaning of ns_last_pid.

...

> > @@ -311,7 +297,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
> > * it should synchronize its usage with external means.
> > */
> >
> > - tmp.data = &pid_ns->last_pid;
> > + tmp.data = &pid_ns->idr.idr_next;

Ah, yes, off-by-one error...

Gargi, I don't think you need to make another version, I'd suggest you to send
the trivial fix to Andrew, afaics you just need to replace these 2 lines with

unsigned int last;
int err;

tmp.data = &last;
err = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
if (!err)
idr_set_cursor(&pid_ns->idr, last + 1);
return err;

Oleg.

\
 
 \ /
  Last update: 2017-10-22 17:27    [W:0.784 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site