Message ID | 1435661350-8060-3-git-send-email-shannon.zhao@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCOL5N4BVYCBBV7IZGWAKGQEGZU67DY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 16D9C229DF for <linaro@patches.linaro.org>; Tue, 30 Jun 2015 10:50:00 +0000 (UTC) Received: by widjy10 with SMTP id jy10sf5180226wid.3 for <linaro@patches.linaro.org>; Tue, 30 Jun 2015 03:49:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=lzYLZX8mWvqrmQ5AjOPeU3CQo8a92bqS8zVB7gup+g0=; b=P87Pa/PIlGlk+e/ob1HGrBDvX953rNyrXm4ZEJACFxGalRGVZ9LMlSvoVS4lrd39Ph bJBZvMEGFLXrXNQ+Sl4itA6TIUsT2xsPo6coLR00iL7KZeNBKE8OrqyEQ/URjBhc08rJ aC5XcA02gZwK9bzxXFng3CXZXTJSP2n1eDHE+rySqhqpq9nqcLc7IrhtVDO/sEngE+IB Iem+hm3KFuMRLR9F96+nnVPmO5MkA5x/Sc1MSFNGG7cL5ufb1xOjnonVwHcEFa+eU+rH WX01DpwYSjySyUEMzRD7nq5iOnDbH7DoOfDPnlbPxHhHfkcqErJ8EGVEHR/voCgjXVQt EGMw== X-Gm-Message-State: ALoCoQl1uXgHPQyhZcpnmHrjoN81BDP3cDhhn319em9otWsye0phrQs01yXSvTCL996RTIVpOH8J X-Received: by 10.152.88.70 with SMTP id be6mr13702540lab.9.1435661399298; Tue, 30 Jun 2015 03:49:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.202 with SMTP id 10ls26876law.79.gmail; Tue, 30 Jun 2015 03:49:58 -0700 (PDT) X-Received: by 10.152.170.165 with SMTP id an5mr19155453lac.100.1435661398829; Tue, 30 Jun 2015 03:49:58 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id da7si37763526lad.99.2015.06.30.03.49.58 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 03:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by lagh6 with SMTP id h6so8079688lag.2 for <patchwork-forward@linaro.org>; Tue, 30 Jun 2015 03:49:58 -0700 (PDT) X-Received: by 10.112.160.165 with SMTP id xl5mr18918866lbb.36.1435661398684; Tue, 30 Jun 2015 03:49:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2352415lbb; Tue, 30 Jun 2015 03:49:57 -0700 (PDT) X-Received: by 10.68.69.70 with SMTP id c6mr34005601pbu.40.1435661396556; Tue, 30 Jun 2015 03:49:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si66313267par.87.2015.06.30.03.49.55; Tue, 30 Jun 2015 03:49:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbbF3Ktz (ORCPT <rfc822;shannon.zhao@linaro.org> + 2 others); Tue, 30 Jun 2015 06:49:55 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34520 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbbF3Kty (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 30 Jun 2015 06:49:54 -0400 Received: by pabvl15 with SMTP id vl15so3844771pab.1 for <stable@vger.kernel.org>; Tue, 30 Jun 2015 03:49:54 -0700 (PDT) X-Received: by 10.66.157.167 with SMTP id wn7mr42241432pab.119.1435661394107; Tue, 30 Jun 2015 03:49:54 -0700 (PDT) Received: from localhost ([120.136.36.232]) by mx.google.com with ESMTPSA id do16sm903985pac.15.2015.06.30.03.49.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 03:49:53 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Marc Zyngier <marc.zyngier@arm.com> Subject: [PATCH for 3.14.y stable 02/22] KVM: ARM: vgic: plug irq injection race Date: Tue, 30 Jun 2015 18:48:50 +0800 Message-Id: <1435661350-8060-3-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1435661350-8060-1-git-send-email-shannon.zhao@linaro.org> References: <1435661350-8060-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 1316e55..2187318 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1387,7 +1387,8 @@ out: int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num, bool level) { - if (vgic_update_irq_state(kvm, cpuid, irq_num, level)) + if (likely(vgic_initialized(kvm)) && + vgic_update_irq_state(kvm, cpuid, irq_num, level)) vgic_kick_vcpus(kvm); return 0;