From patchwork Sat Apr 27 00:53:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 2496231 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED28B3FC64 for ; Sat, 27 Apr 2013 00:54:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756172Ab3D0Axs (ORCPT ); Fri, 26 Apr 2013 20:53:48 -0400 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183]:38118 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755775Ab3D0Axr (ORCPT ); Fri, 26 Apr 2013 20:53:47 -0400 Received: from mail181-ch1-R.bigfish.com (10.43.68.225) by CH1EHSOBE014.bigfish.com (10.43.70.64) with Microsoft SMTP Server id 14.1.225.23; Sat, 27 Apr 2013 00:53:46 +0000 Received: from mail181-ch1 (localhost [127.0.0.1]) by mail181-ch1-R.bigfish.com (Postfix) with ESMTP id 4173D40083; Sat, 27 Apr 2013 00:53:46 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1fc6h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1155h) Received: from mail181-ch1 (localhost.localdomain [127.0.0.1]) by mail181-ch1 (MessageSwitch) id 1367024024339412_27441; Sat, 27 Apr 2013 00:53:44 +0000 (UTC) Received: from CH1EHSMHS025.bigfish.com (snatpool3.int.messaging.microsoft.com [10.43.68.227]) by mail181-ch1.bigfish.com (Postfix) with ESMTP id 50B574000A5; Sat, 27 Apr 2013 00:53:44 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS025.bigfish.com (10.43.70.25) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 27 Apr 2013 00:53:44 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Sat, 27 Apr 2013 00:53:43 +0000 Received: from snotra.am.freescale.net ([10.214.82.242]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r3R0reVs003291; Fri, 26 Apr 2013 17:53:42 -0700 From: Scott Wood To: Alexander Graf CC: , , Scott Wood Subject: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write Date: Fri, 26 Apr 2013 19:53:40 -0500 Message-ID: <1367024020-14204-3-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367024020-14204-1-git-send-email-scottwood@freescale.com> References: <1367024020-14204-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Nobody is actually calling these functions with slots_lock held. The srcu read lock, OTOH, is required. Signed-off-by: Scott Wood --- virt/kvm/kvm_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5da9f02..54a14fa 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2828,7 +2828,7 @@ static int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, return off; } -/* kvm_io_bus_write - called under kvm->slots_lock */ +/* kvm_io_bus_write - called under kvm->srcu read lock */ int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, const void *val) { @@ -2856,7 +2856,7 @@ int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, return -EOPNOTSUPP; } -/* kvm_io_bus_read - called under kvm->slots_lock */ +/* kvm_io_bus_read - called under kvm->srcu read lock */ int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, void *val) {