From patchwork Fri May 11 19:06:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 10394917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 452366053A for ; Fri, 11 May 2018 19:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3039228F54 for ; Fri, 11 May 2018 19:08:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2499128F8B; Fri, 11 May 2018 19:08:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99E3528F6C for ; Fri, 11 May 2018 19:08:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A33E6B068F; Fri, 11 May 2018 15:08:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 028ED6B0690; Fri, 11 May 2018 15:08:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E35706B0691; Fri, 11 May 2018 15:08:39 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot0-f198.google.com (mail-ot0-f198.google.com [74.125.82.198]) by kanga.kvack.org (Postfix) with ESMTP id B57CA6B068F for ; Fri, 11 May 2018 15:08:39 -0400 (EDT) Received: by mail-ot0-f198.google.com with SMTP id b5-v6so4294625otf.8 for ; Fri, 11 May 2018 12:08:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=un/DQVwZ9pdAWZ7f4UpQR4jx0g+7jaXhdC8wTrqo2d4=; b=AzHUucdGLbhENLpp/7Nq/znN32tNe90vNFMU9GPMK155yVzflPG1AHGIdaEzyD8bwt rBACsZ8Mgybjv+kK3RhrBP9H/ln4Gw+ZGLadxMYlHh3xcCHXigI1PqhE3xkieTgUiqqw P6a8LMHJsXphhHpP48K2MQ2AclAvAJtH01OQMVWVGEaLkT1bwphyy85/Iif+Bzkypsut N180Gy7zTpTRAbuASwOnaCdXNdHHfiBD6MZc5aGHL6oeZZiDXyG4hNTJfcTN5GT+fntB jvPZkrj+7OKeNCV7AsFQMZJJfUNvEGK61YZl6O7c3+nBfsprjaiRi6ZoYgVo9/YnBIdf NzZw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jean-philippe.brucker@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=jean-philippe.brucker@arm.com X-Gm-Message-State: ALKqPweTQbOYVA0qxmf34JH+PFD8745eM6z1gh0z70ZTKMTLqvG1SY4M VDusWJyry/0JikM8QCKlYvSyZKymLPJgk/+YJ+/J1BEXSVOZJ0NZlWAGc3/eIstiV8mCNbNnYV5 v3r4Dy7GOe28kXzjviqN2kwNEcmgS2yc62yEwg3C4qtAJo/p9Crx6ZPI8/ZUjnC79Mw== X-Received: by 2002:a9d:bea:: with SMTP id 97-v6mr3861975oth.77.1526065719549; Fri, 11 May 2018 12:08:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpqeBjWhVfyWxPy7DBM2F5HG4Jhwkqh+CSKuIpXOj0p7PLpSBO/ibsM+oNuUqjl/tWsZ6GY X-Received: by 2002:a9d:bea:: with SMTP id 97-v6mr3861938oth.77.1526065718937; Fri, 11 May 2018 12:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526065718; cv=none; d=google.com; s=arc-20160816; b=N6+xcFgmh3GpwKJUmL5NWWLdc5CibP/t+dV7iGz6tO0f16FtaeVxZnHG3pmO18eQlH KR1ZFDyKLZBlA/XxATti48vG1jeotpIxGaTOpCbmUQL9eTttvgWnq8S3jhZry5WgS+hr Uim8s7k/irdq+4Gdv3JBatnXAXX1Vr9tagZdm2shf97nkRFG459LJebb/7JlvRvoKOSn a2PPhHbPIn0z8lR+9Mda2cGthvcVy7ApXGA+do8DzN/nYJKAcScRO8+vw0myv779VAwb OYQ7ZxD2CAZ4cPsNUS+TtFxvl35fuCv/gllS+hv2fgsDnhSu6YE737EMA6VzDvwTOiia ecxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=un/DQVwZ9pdAWZ7f4UpQR4jx0g+7jaXhdC8wTrqo2d4=; b=Z8c+bGxCeDLs8L7sa3/6ZicqtuODQU6yvPCq6SA9P9hrAiOE0k7/ULCoIi0N0BfHJG UgMmGlcyrErmtP2QOTisNJMH77myJvH7DZqiNQ7UYiDvDUw2f4eew+Jg43zPMTwGuzAt WykxLMM7a4GnADbA+JeCPTArE9YzqGJKa+BkDJArsUR+cswxs9FkwC7SqCgp24YLs4ca 8a2LGXwHPM1sp1jy5AWurFxRkS9nUiAjp0AFSOfWUbHjpwPRl1IOUjj6gR1HzFvuYpVz yqMOh+CAvUYZA1r3fMajQxAj4iWvMvkm3QhNKAFaehoBj8EaqPEg3BPIVifLtyJ1hLAP eveg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jean-philippe.brucker@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=jean-philippe.brucker@arm.com Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id t92-v6si1324626otb.227.2018.05.11.12.08.38 for ; Fri, 11 May 2018 12:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of jean-philippe.brucker@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jean-philippe.brucker@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=jean-philippe.brucker@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 899F81993; Fri, 11 May 2018 12:08:38 -0700 (PDT) Received: from ostrya.cambridge.arm.com (ostrya.cambridge.arm.com [10.1.210.33]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1FC0C3F23C; Fri, 11 May 2018 12:08:32 -0700 (PDT) From: Jean-Philippe Brucker To: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org Cc: joro@8bytes.org, will.deacon@arm.com, robin.murphy@arm.com, alex.williamson@redhat.com, tn@semihalf.com, liubo95@huawei.com, thunder.leizhen@huawei.com, xieyisheng1@huawei.com, xuzaibo@huawei.com, ilias.apalodimas@linaro.org, jonathan.cameron@huawei.com, liudongdong3@huawei.com, shunyong.yang@hxt-semitech.com, nwatters@codeaurora.org, okaya@codeaurora.org, jcrouse@codeaurora.org, rfranz@cavium.com, dwmw2@infradead.org, jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com, ashok.raj@intel.com, kevin.tian@intel.com, baolu.lu@linux.intel.com, robdclark@gmail.com, christian.koenig@amd.com, bharatku@xilinx.com, rgummal@xilinx.com, akpm@linux-foundation.org Subject: [PATCH v2 12/40] mm: export symbol mmput_async Date: Fri, 11 May 2018 20:06:13 +0100 Message-Id: <20180511190641.23008-13-jean-philippe.brucker@arm.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180511190641.23008-1-jean-philippe.brucker@arm.com> References: <20180511190641.23008-1-jean-philippe.brucker@arm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP In some cases releasing a mm bound to a device might invoke an exit handler, that takes a lock already held by the function calling mmput(). This is the case for VFIO, which needs to call mmput_async to avoid a deadlock. Other drivers using SVA might follow. Since they can be built as modules, export the mmput_async symbol. Cc: akpm@linux-foundation.org Signed-off-by: Jean-Philippe Brucker --- kernel/fork.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/fork.c b/kernel/fork.c index 1062f7450e97..bf05d188c8de 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -999,6 +999,7 @@ void mmput_async(struct mm_struct *mm) schedule_work(&mm->async_put_work); } } +EXPORT_SYMBOL_GPL(mmput_async); #endif /**