Message ID | 20230914191540.54946-3-brett.creeley@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F16A8EEAA66 for <kvm@archiver.kernel.org>; Thu, 14 Sep 2023 19:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241898AbjINTQJ (ORCPT <rfc822;kvm@archiver.kernel.org>); Thu, 14 Sep 2023 15:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241838AbjINTQG (ORCPT <rfc822;kvm@vger.kernel.org>); Thu, 14 Sep 2023 15:16:06 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2085.outbound.protection.outlook.com [40.107.101.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0555526BC; Thu, 14 Sep 2023 12:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NEr/KN3tm7qEknDJjLO7AKq1oAoTysUwjw4kj6pT+9IR4gcbNKqkn/e2+dgnmqtY6CjfU7eNdYCVW/RlNn7Po2pI4Iu+pn6goD/HiJ0PJIIkjevX2SQBkXtcfgYLsjwZj6UOYxoHHAXhxkB1dgaw+Aod4A2mqmp9TL3HZj7SKBsFoIfDz3frn4gOSeZ33dl4GJLZq6q8MxB7WMJ+EqtSKmeSm+lppj0YpP68bpY34gbpeuMaSnifPIXXNrNNCrV8nZaDbPgejYBNbqXBW9hjZS5zuiSUkEcgml0vj+Ys6a5wDBAJhp32xFnTZzdOe2pIdAyiufAs4pKHjo4im3zH/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GT8A/jR6oeASNo8i5J/kdagx5lvvur+pmWDzd3FILDw=; b=TOZ/mDKUy4ap22XqW4pF9e94vixWNukmCZawAddFKgRs6OSnEgOtgQ7LCiC8PgflnjEyFPsZgI9cSzEglXAl5SCkJs9ZyPiZ7VXi7Ya88djR5kHTSulPqssWalDFY3O2QpNY776f9/ow7M7ZGTiwr8chBP0hDt1aamcYLfZkMKUN8TJM+GC2iOrCrbTx8TryCWJ5mD1gkCbTsYsI4mGtnQDWAycd4p1y+2SQH+idy0ABMce9lxEoV55leIi3kIbDONGeUERW6k2tlq/MMCg7CAlJbVZomT+LQlY1S/PiFbRb4xEnFJmCqEPkzC5urD/yy3idOFTuHK3pMMUIl0PQeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ziepe.ca smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GT8A/jR6oeASNo8i5J/kdagx5lvvur+pmWDzd3FILDw=; b=CFHjA8SF89Q83ueGtSlneSO021FBOLJX+/8dDKl6P1hSrYJkl+szboyoIOQnfhDYgR0Fsd4+C7HKIJmT82HmIlegqvpfNdZWZkD74PRGhAEGTGXLpWJOz8FxLWTq1rJFIDM4maC8LabHgvdP7/Yp/guIdOQrY+X5KLF3f3FvyQQ= Received: from SN6PR16CA0053.namprd16.prod.outlook.com (2603:10b6:805:ca::30) by MW3PR12MB4569.namprd12.prod.outlook.com (2603:10b6:303:57::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19; Thu, 14 Sep 2023 19:15:58 +0000 Received: from SN1PEPF0002636B.namprd02.prod.outlook.com (2603:10b6:805:ca:cafe::99) by SN6PR16CA0053.outlook.office365.com (2603:10b6:805:ca::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21 via Frontend Transport; Thu, 14 Sep 2023 19:15:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636B.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.19 via Frontend Transport; Thu, 14 Sep 2023 19:15:58 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 14 Sep 2023 14:15:55 -0500 From: Brett Creeley <brett.creeley@amd.com> To: <jgg@ziepe.ca>, <yishaih@nvidia.com>, <shameerali.kolothum.thodi@huawei.com>, <kevin.tian@intel.com>, <alex.williamson@redhat.com>, <dan.carpenter@linaro.org> CC: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <brett.creeley@amd.com>, <shannon.nelson@amd.com> Subject: [PATCH vfio 2/3] pds/vfio: Fix mutex lock->magic != lock warning Date: Thu, 14 Sep 2023 12:15:39 -0700 Message-ID: <20230914191540.54946-3-brett.creeley@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230914191540.54946-1-brett.creeley@amd.com> References: <20230914191540.54946-1-brett.creeley@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636B:EE_|MW3PR12MB4569:EE_ X-MS-Office365-Filtering-Correlation-Id: 12e20de4-aaaa-4dc2-c25a-08dbb55706ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HBiLJxniyV8IMp3ZgaBo7UPfUCZdFvZJY4r+rd9fQnEV8Rtq+Pbvxa5UsSg+ct387DM0xDhCOtJsHF20Efy3sK+UkUD1MWae5rDthtR1/BV7gmMlROUs1u1xj/t/2qMZywFa74ZyjZifTvq96fBXYBooBSim7N+h5BbPM0Xsx3lZY7n/cwJ+3PzeQ1feDhVf3o+7296CdsPsUjpgnuVtoLel6rMIGqPkit3bx3TtHUv+4u9wX7Dl4MV48O4C3KAV+JsWW1j/Q+3jMU5eJKVYtrbweJyPobvSCEmUhh6SAyGnTr3kCuSVqgzMXN3ZLjJbnxMKhSXyOkSqypLufPLdHVtACv43A07ZuB1GdalALWZn8H3wX7c7WRm3N0Sow4CHp0clGduLK0TjbmXFAlM2ONn0u0EiHp1fd7gJJfvjYXlfwR7x7OUW9siz+17dFNUsh8F0PdnW7YOTvTkQd1hs0JP2NB5tqld0ehZhrQwc18r04zXb/FT7c+kEJJLZnIC/Eipw8dxJmbKVvZz91bLBGfKF/bL1AKWXYihVad39D4gGqtjsm30tQ1CIxZGFLCGIJQqyRma3FgIImUUDd23kKp3VEy5e7ZKl1Mjaitpx1POLPrVIe5dM+8Wf8laUNeoUsTrWApn58jz4RJVnOY/rMyz19zw1O68q3VaJsV9RHy5yWXzttzhV5+gGIN1sFfaxcRO7tWmO3L1WDE4x7tWHhxwpN7O9MyOvsyjjPLgkaFjPK71UN9YDC0K0oYRo+oTyFlXBTNXAg+bWJCaWaNmKvA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(396003)(39860400002)(136003)(376002)(1800799009)(451199024)(186009)(82310400011)(36840700001)(46966006)(40470700004)(36860700001)(40460700003)(2906002)(47076005)(36756003)(86362001)(82740400003)(81166007)(40480700001)(356005)(4326008)(8936002)(1076003)(8676002)(16526019)(5660300002)(26005)(54906003)(70586007)(110136005)(316002)(2616005)(70206006)(6666004)(41300700001)(45080400002)(478600001)(83380400001)(44832011)(426003)(336012)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2023 19:15:58.1265 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 12e20de4-aaaa-4dc2-c25a-08dbb55706ad X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4569 Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org |
Series |
pds/vfio: Fixes for locking bugs
|
expand
|
diff --git a/drivers/vfio/pci/pds/vfio_dev.c b/drivers/vfio/pci/pds/vfio_dev.c index 147a543a7c39..9db5f2c8f1ea 100644 --- a/drivers/vfio/pci/pds/vfio_dev.c +++ b/drivers/vfio/pci/pds/vfio_dev.c @@ -155,6 +155,7 @@ static int pds_vfio_init_device(struct vfio_device *vdev) pds_vfio->vf_id = vf_id; + mutex_init(&pds_vfio->state_mutex); spin_lock_init(&pds_vfio->reset_lock); vdev->migration_flags = VFIO_MIGRATION_STOP_COPY | VFIO_MIGRATION_P2P; @@ -181,7 +182,6 @@ static int pds_vfio_open_device(struct vfio_device *vdev) if (err) return err; - mutex_init(&pds_vfio->state_mutex); pds_vfio->state = VFIO_DEVICE_STATE_RUNNING; pds_vfio->deferred_reset_state = VFIO_DEVICE_STATE_RUNNING;