From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948499AbdEZRkk (ORCPT ); Fri, 26 May 2017 13:40:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1948487AbdEZRis (ORCPT ); Fri, 26 May 2017 13:38:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2297A19CF25 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2297A19CF25 Date: Fri, 26 May 2017 12:38:46 -0500 From: Josh Poimboeuf To: Miroslav Benes Cc: jeyu@redhat.com, jikos@kernel.org, pmladek@suse.com, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] livepatch: force transition process to finish Message-ID: <20170526173846.euu6dmmo6ghc3bky@treble> References: <20170518120043.7205-1-mbenes@suse.cz> <20170518120043.7205-4-mbenes@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170518120043.7205-4-mbenes@suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 26 May 2017 17:38:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 18, 2017 at 02:00:43PM +0200, Miroslav Benes wrote: > @@ -591,3 +591,19 @@ void klp_send_fake_signal(void) > } > read_unlock(&tasklist_lock); > } > + > +/* > + * Drop TIF_PATCH_PENDING of all tasks on admin's request. This forces an > + * existing transition to finish. > + */ > +void klp_unmark_tasks(void) > +{ > + struct task_struct *g, *task; > + > + pr_warn("all tasks marked as migrated on admin's request\n"); > + > + read_lock(&tasklist_lock); > + for_each_process_thread(g, task) > + klp_update_patch_state(task); > + read_unlock(&tasklist_lock); > +} Should this also force the idle tasks to transition? -- Josh