From patchwork Tue Dec 1 14:36:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Lalancette X-Patchwork-Id: 63977 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB1Ebe79013557 for ; Tue, 1 Dec 2009 14:37:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbZLAOha (ORCPT ); Tue, 1 Dec 2009 09:37:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753506AbZLAOh3 (ORCPT ); Tue, 1 Dec 2009 09:37:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35793 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753353AbZLAOhH (ORCPT ); Tue, 1 Dec 2009 09:37:07 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB1EbDRX027834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 1 Dec 2009 09:37:13 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB1Eb36S002533; Tue, 1 Dec 2009 09:37:13 -0500 From: Chris Lalancette To: kvm@vger.kernel.org Cc: Chris Lalancette Subject: [PATCH 09/12] Fix missing spin_lock in PIT timer. Date: Tue, 1 Dec 2009 15:36:38 +0100 Message-Id: <1259678201-11203-10-git-send-email-clalance@redhat.com> In-Reply-To: <1259678201-11203-1-git-send-email-clalance@redhat.com> References: <1259678201-11203-1-git-send-email-clalance@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index dc6eff4..ece7e12 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -606,10 +606,13 @@ void kvm_pit_reset(struct kvm_pit *pit) static void pit_mask_notifer(struct kvm_irq_mask_notifier *kimn, bool mask) { struct kvm_pit *pit = container_of(kimn, struct kvm_pit, mask_notifier); + unsigned long flags; if (!mask) { + spin_lock_irqsave(&pit->pit_state.inject_lock, flags); atomic_set(&pit->pit_state.pit_timer.pending, 0); pit->pit_state.irq_ack = 1; + spin_unlock_irqrestore(&pit->pit_state.inject_lock, flags); } }