From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Subject: Re: [PATCH -v5 6/5] context_tracking: fix exception_enter when already in IN_KERNEL Date: Thu, 12 Feb 2015 18:00:03 +0100 Message-ID: <20150212170002.GH18363@lerouge> References: <1423600074-2907-1-git-send-email-riel@redhat.com> <20150211144319.2a0c29d6@cuia.bos.redhat.com> <20150212154232.GE18363@lerouge> <54DCCAFE.7080206@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: paulmck@linux.vnet.ibm.com, luto@amacapital.net, will.deacon@arm.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, mtosatti@redhat.com, borntraeger@de.ibm.com, lcapitulino@redhat.com, pbonzini@redhat.com To: Rik van Riel Return-path: Content-Disposition: inline In-Reply-To: <54DCCAFE.7080206@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Feb 12, 2015 at 10:47:10AM -0500, Rik van Riel wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/12/2015 10:42 AM, Frederic Weisbecker wrote: > > On Wed, Feb 11, 2015 at 02:43:19PM -0500, Rik van Riel wrote: > >> If exception_enter happens when already in IN_KERNEL state, the > >> code still calls context_tracking_exit, which ends up in > >> rcu_eqs_exit_common, which explodes with a WARN_ON when it is > >> called in a situation where dynticks are not enabled. > > > > Fortunately context_tracking_exit() already has a current_state == > > IN_KERNEL check so this shouldn't be a problem. > > No, it had a hard-coded "current_state == IN_USER" check, > which is very close, but ... > > ... I replaced that with a state argument, and forgot to > ensure that it never gets called with state == IN_KERNEL. > This patch fixes that. Ah that's right! Well I'm going to merge this patch to 1/5 then to avoid breaking bisection. Thanks.