From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753447AbdJSQSF (ORCPT ); Thu, 19 Oct 2017 12:18:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50540 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbdJSQSE (ORCPT ); Thu, 19 Oct 2017 12:18:04 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0B6F840250 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Thu, 19 Oct 2017 18:18:00 +0200 From: Oleg Nesterov To: Andrei Vagin Cc: Gargi Sharma , linux-kernel@vger.kernel.org, riel@surriel.com, julia.lawall@lip6.fr, akpm@linux-foundation.org, mingo@kernel.org, pasha.tatashin@oracle.com, ktkhai@virtuozzo.com, ebiederm@xmission.com, hch@infradead.org, lkp@intel.com, tony.luck@intel.com Subject: Re: [v6,1/2] pid: Replace pid bitmap implementation with IDR API Message-ID: <20171019161800.GA8886@redhat.com> References: <1507760379-21662-2-git-send-email-gs051095@gmail.com> <20171019073050.GC29091@outlook.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171019073050.GC29091@outlook.office365.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 19 Oct 2017 16:18:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.