Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933668AbdDZPRv (ORCPT ); Wed, 26 Apr 2017 11:17:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40284 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760431AbdDZPQU (ORCPT ); Wed, 26 Apr 2017 11:16:20 -0400 Date: Wed, 26 Apr 2017 08:14:51 -0700 From: "Paul E. McKenney" To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rkrcmar@redhat.com, ross.zwisler@linux.intel.com, jack@suse.cz, linux-ext4@vger.kernel.org, tytso@mit.edu, josh@joshtriplett.org, stable@vger.kernel.org Subject: Re: [PATCH] kvm: async_pf: fix rcu_irq_enter() with irqs enabled Reply-To: paulmck@linux.vnet.ibm.com References: <20170426145626.6407-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426145626.6407-1-pbonzini@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17042615-0052-0000-0000-000001E7C190 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006977; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00852775; UDB=6.00421561; IPR=6.00631612; BA=6.00005313; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015188; XFM=3.00000013; UTC=2017-04-26 15:16:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042615-0053-0000-0000-000050426C9C Message-Id: <20170426151451.GS3956@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-26_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704260262 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 33 On Wed, Apr 26, 2017 at 04:56:26PM +0200, Paolo Bonzini wrote: > native_safe_halt enables interrupts, and you just shouldn't > call rcu_irq_enter() with interrupts enabled. Reorder the > call with the following local_irq_disable() to respect the > invariant. > > Reported-by: Ross Zwisler > Cc: stable@vger.kernel.org > Signed-off-by: Paolo Bonzini Acked-by: Paul E. McKenney > --- > arch/x86/kernel/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > index 14f65a5f938e..2a7835932b71 100644 > --- a/arch/x86/kernel/kvm.c > +++ b/arch/x86/kernel/kvm.c > @@ -161,8 +161,8 @@ void kvm_async_pf_task_wait(u32 token) > */ > rcu_irq_exit(); > native_safe_halt(); > - rcu_irq_enter(); > local_irq_disable(); > + rcu_irq_enter(); > } > } > if (!n.halted) > -- > 2.9.3 >