Message ID | 20180917030220.245686-16-alexander.levin@microsoft.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3284214ljw; Sun, 16 Sep 2018 20:25:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalAzEpHE8RTDzvKzpO15RqIiWxkhVfQBjsyVOuo2x8dGa84ZvtrPGP0A1c+RdTpMHio+Lj X-Received: by 2002:a63:6485:: with SMTP id y127-v6mr21307513pgb.393.1537154743098; Sun, 16 Sep 2018 20:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537154743; cv=none; d=google.com; s=arc-20160816; b=dRtrB0vLuxvOEq1SXBHq/9Lr1FlhDMYUHzxsEdyUd/sukHEb9Mbp+aFQdZRzckofAU 3mIVH/TM4pEjUTPqddmeZjDH6VTbEgyFowNTaX/b19cjfXXN8DFJOKT3/P7Mq0+x50QF kM6pVVvXrFFlkym2rUPLXiL7r5QZfpqTiEAZykTs5+hFbgy9gg+znep1dGCfCUX8+KZK YqIKvPoAIwAoqJoIss6sbNnEg2lVzit/Tr7bttLu9D2r6SuH9yVbmham9Dy9xjILDFIl 32jZ24wdEoO5lWIgIOD3RVZfiRqfc6z2gOlfUikBoSfgSlBrYScDRHEXKkgxyskXpJJM 70eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=hHhQw2Hsj08jJSNACwYkFjw3GXTC6SojFZf5DEdNyO0=; b=0Ozw2P/IABcvOxEqd42B9SSEGwcix0jwS7nnhNCVFyQhkNWhuUUrQ9UOHPEae1NYk0 pFPBr+k4NfVVq9/ymRz8Pub5pMN3nD+I/42lDSib/NkC/UPk0qFSHiROmUcaR1fB+aR5 ZG5My9oAAg7rTYJAcoNGxHOnFs5er1vYOT/yVHRRJmuw+InVM8S05xxSpkn1yWSSnIRp hC6SJbEFvRDgRKDaxppruxcsq1bYQNgnQCR2RSqCZVMKOsGbxBmFeUU9RqR3OfovTSbY gcpFu4lz0s41jtaHR7UMRq0EfKm2kMuYJRAjjT2sJDhQs69egDuFCRZdm7ugK5dOw6Fv vExw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=csE9psKt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22-v6si15571064pli.289.2018.09.16.20.25.42; Sun, 16 Sep 2018 20:25:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=csE9psKt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729922AbeIQI2z (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Mon, 17 Sep 2018 04:28:55 -0400 Received: from mail-dm3nam03on0101.outbound.protection.outlook.com ([104.47.41.101]:50080 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729820AbeIQI2y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Sep 2018 04:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hHhQw2Hsj08jJSNACwYkFjw3GXTC6SojFZf5DEdNyO0=; b=csE9psKtkRWEuelSrbvIiU1BwIbwFcgq6ETm4Bq9MQAcwkviiFkV0L9PIeCzu4F5cxnzpPjHg0UwagZkPMhFXL5hzsOl/yNoNBnlm+urV29e8Xh7XAzmBw0M57i9N6Nq0ELvYxSDo3qbyLGJjbjKHElHn9oNQHurKG4N56gCOn4= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0855.namprd21.prod.outlook.com (10.173.192.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.4; Mon, 17 Sep 2018 03:03:35 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:03:35 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Niklas Cassel <niklas.cassel@linaro.org>, Joerg Roedel <jroedel@suse.de>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL 4.14 16/87] iommu/msm: Don't call iommu_device_{,un}link from atomic context Thread-Topic: [PATCH AUTOSEL 4.14 16/87] iommu/msm: Don't call iommu_device_{,un}link from atomic context Thread-Index: AQHUTjLhhE8umt2jFEKqG8kktIrXNg== Date: Mon, 17 Sep 2018 03:02:34 +0000 Message-ID: <20180917030220.245686-16-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0855; 6:oy69AxWpn1gobdqvK6CxLrCE3KTu+4PlKU1SCUt1CQEbxg2tsT8M5k+WiIEo1KCRgNKkcXczXZfuxStf3IXc/KuQ8qX+TbKtVtNVsWwrcE/hDJtp6LJlUREN1gQonKXBddMZtbdR9ZIdbStPMh3e0q3vBrZwrYw4iU61qJhDNaXdZz1YvP0pcnWCKUBIbb9I+AsWgAA99TLF5rbn9x4MB0k+MDPEP68ElyiExzqyjdCK9UYH+HgcHSC0YvpTm5YLIkiwSf+cFUWUVc8R9OmaUeN5NK74gnJ4TnXPc4g+0jlbJDhD7RAuPLnS5ZS+oXo+bQS8oPkcgW+eojrL3hM0nrtIv4PpkdAaoptdO0GC1769sxbahAHU4loUYFi4gk5A12Okd2hdxEl7RU5ATIiUivznkI/2YDIRWwV+1LD8+Knj5filPeysfJuAe0DXQX7i6H0xpJN/wSlSqOW+JGcebA==; 5:9EtfTdJZqI2upobsKM9W39xdIwjTXf8ZtA45p0JvBnDZfgrcZ6f1q0EpSusqbOzX9s27b+XhxTgFkVo1hTyxXHhS5EoPgzuRV2IJQP9sXJ+As1BOEAjGwHsGRS1nWxSg+KiAXsIer2DWu5SDYdnftYUi1AoZrDyfHsU/1H7aJPM=; 7:PXUQ9KVPu3KxZNHjjYCvRirCSx03wXVjhKKyx/GFG1YZ+VIPTkxQYwuZD6qZPpIfgz5D6ursyqRrjwosKXkmyeLGpTKegTGVLSKia9y7BdiTwyOazQTLsfOR3p6hZypv343/x5ulgzFu0INWZ1Hfmi21WCqaAf8FaUspcTktz6pMIELLggXkaSrRSSRUjMGDGq0BaXaOAgiCqRpRzxLZS2hCXPgrK+FBVob0v7ndO749xk1SPYNXrQHQy4eKEOci x-ms-office365-filtering-correlation-id: f29fad0a-3e84-4588-77c8-08d61c4a2884 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0855; x-ms-traffictypediagnostic: CY4PR21MB0855: x-microsoft-antispam-prvs: <CY4PR21MB085578ED85114161E5C94D9BFB1E0@CY4PR21MB0855.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0855; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0855; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(376002)(396003)(136003)(366004)(199004)(189003)(51234002)(6436002)(99286004)(7736002)(110136005)(54906003)(97736004)(5660300001)(66066001)(446003)(72206003)(76176011)(86362001)(86612001)(81166006)(81156014)(2906002)(478600001)(305945005)(68736007)(105586002)(2616005)(106356001)(476003)(11346002)(22452003)(6486002)(10090500001)(10290500003)(8676002)(36756003)(6346003)(6116002)(6506007)(3846002)(102836004)(107886003)(6512007)(1076002)(25786009)(217873002)(4326008)(14454004)(26005)(256004)(14444005)(5024004)(486006)(186003)(316002)(2900100001)(8936002)(53936002)(5250100002)(2501003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0855; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: OnyiknYvvl1WRP3oFVRpftKAA8JffGxkFH5QYWWi1+71dchwvATaQOGzcT8uTkn2de937fSMCqURCu6SXdO1GwlSpQLSqpPICTZcKd2x8wyqDwZzFQxOsH5xOqq/B4vIhHGk2Djrwla40BaH/h+mTYrBlxSobp/NC5ShHxTdNmg3QdwV6peMOF4+HlQ42s3NdgueZ64hBhefYFzGw97ABgORJXV3vrWobq2l169qOzG1NTt7A2zGKwLwnyGMQGLSoYhqDxfHi8NfPw8GnCm/7MToOxLCdA2tbzHC8mbPn0eWunSCPtgQCqMOO4zRrVa+UZ4G11zoF4wd/Lt+6tFBmdRsfAuzaWmgTw94Fw5+qcA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f29fad0a-3e84-4588-77c8-08d61c4a2884 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:34.5563 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0855 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 04f4d51ffacb..92c8c83ce38c 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -395,20 +395,15 @@ static int msm_iommu_add_device(struct device *dev) struct msm_iommu_dev *iommu; struct iommu_group *group; unsigned long flags; - int ret = 0; spin_lock_irqsave(&msm_iommu_lock, flags); - iommu = find_iommu_for_dev(dev); + spin_unlock_irqrestore(&msm_iommu_lock, flags); + if (iommu) iommu_device_link(&iommu->iommu, dev); else - ret = -ENODEV; - - spin_unlock_irqrestore(&msm_iommu_lock, flags); - - if (ret) - return ret; + return -ENODEV; group = iommu_group_get_for_dev(dev); if (IS_ERR(group)) @@ -425,13 +420,12 @@ static void msm_iommu_remove_device(struct device *dev) unsigned long flags; spin_lock_irqsave(&msm_iommu_lock, flags); - iommu = find_iommu_for_dev(dev); + spin_unlock_irqrestore(&msm_iommu_lock, flags); + if (iommu) iommu_device_unlink(&iommu->iommu, dev); - spin_unlock_irqrestore(&msm_iommu_lock, flags); - iommu_group_remove_device(dev); }