From patchwork Thu Sep 14 19:15:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brett Creeley X-Patchwork-Id: 14012 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp641745vqi; Thu, 14 Sep 2023 14:41:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGe1xXrgpHJTDcrMA9K53kWdVlwblL8WMKodmb7q1Sbuo5zbm53q70n8OatXiAUZb0xgT5h X-Received: by 2002:a17:903:1c6:b0:1c3:e2eb:f79d with SMTP id e6-20020a17090301c600b001c3e2ebf79dmr4398090plh.8.1694727699214; Thu, 14 Sep 2023 14:41:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694727699; cv=pass; d=google.com; s=arc-20160816; b=t/W1DLGCZREV7/IK11bpivdew693AUVXkKaYWXrGJY1sjSW9ri6H2IkPPRUzDvaNd3 iACis4Qm5FSXp1P6yZ+Uy4mmS0kw07vS/jHrbywjvdlCIelwVbWCdb/sfIUgzOB4tQ06 mlR6zBnxdfTJvc1A9eiL8PXVwter2f1EEELTJxYdMo8p4iMYfr7Nzp9e71ndGjd5hCzR 7EnJkK2dgvAIGOXvkXUBWa8HuUlW/asbwl/uB+1CvYNLzEGthVyamMIxdBs7kz/Q490n OjC6kf+pQ9LcjQUzWLA9LJPK2sMIv6wwJKDWRDYZbTG74HFXfzDyu+lXxXIBbP18xt0D yn3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=lpGY4mX3sYfcbli+YvyyUGxQylw2BaNO79x9i5zt+TI=; fh=GbNd0iuihik10v4ZTZpqkH2SVSESc+5QskJdSEY04s4=; b=evspwDyTeyviP1NHOimTHVEGGWImOnVhAlJd6VPCrB+Zpu0f7LW2Wc6SAHafHqtEru UCdTKLLTFg/3HLBJtGkAQNTUyhDIqQ7ofY4Oxa+nXSHxaNZR2VVXgpgmQLJQQwy8jJom 53ZvZPOmDNLRUJht/LgG91hECZLqBteJY+1PZH9Mx9Bc+54tGZ44So9ZHS9lJc/OLdi3 diTopGzd2iL4vaX+rkfQElyO5MJQXIErmc6Nf37jBbE30lyCLN00Hz46+FfoPu64nmvq rjqDO2FXBxYISivJHFR35bSdOV+eE1HdGb+HbGcJWpIsubCeUTypDsLU+/5UD+MD7Cvc s3UA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mgKFx6uk; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t10-20020a170902d14a00b001c3b5a13286si2180951plt.20.2023.09.14.14.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 14:41:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mgKFx6uk; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A323683ACE5C; Thu, 14 Sep 2023 12:16:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241250AbjINTQA (ORCPT + 33 others); Thu, 14 Sep 2023 15:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241568AbjINTP7 (ORCPT ); Thu, 14 Sep 2023 15:15:59 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2058.outbound.protection.outlook.com [40.107.243.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC2D26B2; Thu, 14 Sep 2023 12:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZM8rmgLi/0F1wPJ8BPD4NOMvbjIhBi7Gb2HZeWAAXKMoAecXafTx/+vuvfkaA7tj9WDgYe0eOHQft9hjSwJhXxSQHJz089VJR5xtfiRbkX8MVxzOaCpe7ULVyTMhpImxikJglzXqGpZQ/oSJj1UwjhGh6DMM11kuHXJQj9W2qjcgK/+m5Fg25bQOKzh2H3TObm45OougiIjNhO1oOwnyiax4zMlDbjcP+9k0uKZqnKPJ31ioh/2ArrtNOZAlU6tK487HOcK97qsdzQPVLQl1WrgBvtmsPolKzEx5xMPtIP6UpUIDo8Dozzy11FFeow55CafpMH9e0xgEwjKf+DjtZA== 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=lpGY4mX3sYfcbli+YvyyUGxQylw2BaNO79x9i5zt+TI=; b=Yczc99Wy48Ktd6EWkG6gMosI6mG1NKmpPsAkmJC587wfPyeTCpc5TtXwoesk3I9D7N1pdkhHi0IMUinqyvnuR/EfvSHRPkef1HalMDlnFLKtwmxfO/z6tGhdNf0AP5bmSDvrgyv/bsVsIsbXfGEb2I52/YXZrpzCe4ZCAtWRbHP6JxZ5NuLZRc4/2agtrrODghqgHSTL32m/anbAUpy1gWgs13bZ8ysnKrRhTOB3Ol86lmYImEcDwRttR/lFH4HHgNnFqlgfLLHDI0Nw69KQZNHY+nExCIinkhC92FQfAdfqaV4srZh1BIOfjt5jpZeBMWLvzufmP3X5slVQZp6PMA== 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=lpGY4mX3sYfcbli+YvyyUGxQylw2BaNO79x9i5zt+TI=; b=mgKFx6ukLkALHOfb3g0TzwxG2piUT8O8I4z5sUMe+cpB1CCuFoSIdnSlraKPTY5+pMe0kd6BwhoJrcyPVnUK7JMdJr3AWG7yOodEpTKpK8fxN4/dqVSTuzvmnge4p3db9cny6Qdc7JgiWxWnRJBhKGxay9YZe/xIpuT9fHg3guY= Received: from SN6PR05CA0032.namprd05.prod.outlook.com (2603:10b6:805:de::45) by PH7PR12MB6786.namprd12.prod.outlook.com (2603:10b6:510:1ac::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Thu, 14 Sep 2023 19:15:52 +0000 Received: from SN1PEPF00026367.namprd02.prod.outlook.com (2603:10b6:805:de:cafe::48) by SN6PR05CA0032.outlook.office365.com (2603:10b6:805:de::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.20 via Frontend Transport; Thu, 14 Sep 2023 19:15:52 +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 SN1PEPF00026367.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.20 via Frontend Transport; Thu, 14 Sep 2023 19:15:51 +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:50 -0500 From: Brett Creeley To: , , , , , CC: , , , Subject: [PATCH vfio 0/3] pds/vfio: Fixes for locking bugs Date: Thu, 14 Sep 2023 12:15:37 -0700 Message-ID: <20230914191540.54946-1-brett.creeley@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 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: SN1PEPF00026367:EE_|PH7PR12MB6786:EE_ X-MS-Office365-Filtering-Correlation-Id: ad563476-c442-417e-77e2-08dbb5570300 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VS+p2tRn3yIE03hI+FeILsgpbhG5f8s6HTSQ3rZDYGpP+du9VH4SRzeUOZdRZkH7OI7JlcZkCVgVSWCTuDAACoowweJmrWbVBxa5TYQMsEp2PBprcguDpgRkTjJEVHTs5lvTgRGJNsqgRwP/cR0WZRejA6r652CB/CNGcqhxHpTIPeXmqiNP6LuNaJ+nvHy+N6kWTJlkSLX69PFGylGsqzWZ4vr5mNQHnFtujkbIfryBD4UEFCsDVp8Z+Ze6po8TNjvyKlwe2TW/GKezTv3jJpzJUlZczEpzlnVLebw1FEjPdIQwy4NuKxMDlYRTIq3eUdmp5j20B4ieDPpZqJiHKwoUIexIMFPH2dSkAwp8hlzo90INAOmFNlxShW6gL0x99CoHeJsXwD5DNXRA6aonQDdBHaHHq4g9V2AR1AfEirgsnw/t3jYvgdvCe0nHdw+gpa2NS44jlOLs60XsQNGGRFU5KZQt4JNlEJ1XRAi1hLtfTYfw/MWUVdb4ubdJDyxXmCR65wajxQEoD8mFTJZy20HjNH5qu9mtQNe28/Yv2aXGfdI5sTmQuqrxOdfic+XUYf1xlX9hTJu2QVLgEehFj5nh7vbFlljdml9iO2iF4dlSyDBYraYGwvdQ3s1wl/DOc+Ov+unUDad9LTB52grKCVS918Gj8ZaUXYKQwfqlvWA2V1B9O0QLhpW0VLD0QSnYf+8z9ylxpanct9OT5EXCMAthyMgE+tt/uaa247f8Jt6bDqjqjAjvUd1xPoRlMKstylAYnqBYS2UCr29Bz6NlBQ== 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)(39860400002)(396003)(346002)(136003)(376002)(1800799009)(82310400011)(186009)(451199024)(36840700001)(46966006)(40470700004)(41300700001)(40460700003)(86362001)(2906002)(110136005)(356005)(36756003)(316002)(4744005)(82740400003)(478600001)(966005)(54906003)(70206006)(70586007)(6666004)(40480700001)(83380400001)(2616005)(81166007)(5660300002)(1076003)(47076005)(8936002)(26005)(16526019)(8676002)(44832011)(36860700001)(426003)(4326008)(336012)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2023 19:15:51.9576 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad563476-c442-417e-77e2-08dbb5570300 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: SN1PEPF00026367.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6786 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 12:16:14 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777050791863362332 X-GMAIL-MSGID: 1777050791863362332 This series contains fixes for locking bugs in the recently introduced pds-vfio-pci driver. There was an initial bug reported by Dan Carpenter at: https://lore.kernel.org/kvm/1f9bc27b-3de9-4891-9687-ba2820c1b390@moroto.mountain/ However, more locking bugs were found when looking into the previously mentioned issue. So, all fixes are included in this series. Brett Creeley (3): pds/vfio: Fix spinlock bad magic BUG pds/vfio: Fix mutex lock->magic != lock warning pds/vfio: Fix possible sleep while in atomic context drivers/vfio/pci/pds/vfio_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)