From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zRx1x24ChzDr1h for ; Thu, 25 Jan 2018 20:04:53 +1100 (AEDT) Date: Thu, 25 Jan 2018 10:04:44 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: Jessica Yu , Jiri Kosina , Miroslav Benes , Petr Mladek , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michael Ellerman , Heiko Carstens , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Vojtech Pavlik , Jiri Slaby , Chris J Arges , Andy Lutomirski , Ingo Molnar , Kamalesh Babulal , Balbir Singh Subject: Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model Message-ID: <20180125090444.GB2339@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Feb 13, 2017 at 07:42:40PM -0600, Josh Poimboeuf wrote: > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index 6a4bae0..a8b3f1a 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > > #include > > @@ -264,6 +265,9 @@ static void do_idle(void) > > sched_ttwu_pending(); > schedule_preempt_disabled(); > + > + if (unlikely(klp_patch_pending(current))) > + klp_update_patch_state(current); > } Can someone explain this one? This is a very weird place to add things. What was the expectation?