From patchwork Fri Jul 28 03:56:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 127315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp190824vqg; Thu, 27 Jul 2023 21:35:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlEop2ukipkA56bA3UgoCrdtxgqny65icsn01RW9H4+WcuhbEyuheKtH4N1tl5wbjlU+iDC4 X-Received: by 2002:a9d:67d8:0:b0:6b8:794e:f1ff with SMTP id c24-20020a9d67d8000000b006b8794ef1ffmr1474778otn.34.1690518949325; Thu, 27 Jul 2023 21:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690518949; cv=none; d=google.com; s=arc-20160816; b=BKqzrwEEupFgDVp+D69h+odl83BkYgQWOSidnCEfpblZX+ZVn/L0cI9DJaLUGpA33e QdW//stDqzW5XgXeNHyVsfU2NxVDzILGPogrMu7gdVHhRfjUmXOl4w3NUximTNNjpebG S5ggGOpfdHsouS0rgzMK5FNNmte8bozcTGClBZF7n2j1+cTguaiyWfMQdM8LqKYbufOH PAVXtak+XgiDYLuh1osSe+czpay4Wt9W/dff+htjXHw2eqOkDzTMUuK4Q3iV7+akHZjl I7cs4irA0D/rx2makXlD9/hOMmZ18bS8Ye9zGr+VrIf+pGdIV+B2HUsovK9sswakm1l6 SJ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=anotzehS965Qfz/VuQ8/6Xu5j+6SUU0tQfkZVUCA1H0=; fh=bNbne3f+gDFmiyvWk8Q8oWaFEuR3s9BMuk6ra1mnAb4=; b=WcinQ8e7eoiPyovRu4oK36HSPUayO3NIdTBFCq1+zpnjNZHLqkhyzFk1t2YscIsH86 nl1Nl9NCaAy7scWYWa29oDmpg7m1KlOJUP1c4HprpvMb0Fx96rMmFRQa+Y+4QXYM/QQE 2FF0JXp4naOtggc/uX1KTK2jlk0JjzUyl8vGLwwDEtuFzJWC18P/MgbxbEKpeiO6Fpn/ yUg3fem3+7li162UOLx00sVdCgfPRig5BWHl+U8PFHxrukGo0BL0G9Rd89jhCVO484BQ LL99qDvtqkY+GnArrmj4GyyH40F9o/1Afrxd8Sqa/BgXj07UOT+GcbWJR2utVV61yzSL kgiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Kf4ZHBvB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u189-20020a6385c6000000b005635f437affsi2351957pgd.11.2023.07.27.21.35.35; Thu, 27 Jul 2023 21:35:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=Kf4ZHBvB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbjG1D4p (ORCPT + 99 others); Thu, 27 Jul 2023 23:56:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjG1D4n (ORCPT ); Thu, 27 Jul 2023 23:56:43 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 841A52D51; Thu, 27 Jul 2023 20:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1690516600; bh=anotzehS965Qfz/VuQ8/6Xu5j+6SUU0tQfkZVUCA1H0=; h=Date:From:To:Cc:Subject:From; b=Kf4ZHBvB2hSogh+y1z9vz4FWxwZymogZ0X7caGubmIQ7yzHse2yHKJrMSceT1j0+D 1IqaunE0azTPutE2kVuM+U56Kv8iVPBAzr72qBdgUC6SxYMdmPLMfqy+oPfLtdlxp4 elp8ZSIBpI4E8SU2z0oCwD7ysep/50slWUY2Ivz4rYVgH24e1l+mEFyFSVJn/9NAdK aWKtbA5OS0wdfTmMUM4Fr5b1sLEsTh0WkZqCVjzmD1YexsSM0jFhJ2tbfrCjtZwaOZ 5H003ZuhLzkNpkjyDEndQqXVS92zvplGSN1lt5wc3S0bIyp2Q8cl0ZoULvDzpYFtKi UDoEo6dMTRjTw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4RBv2b6kvCz4wbv; Fri, 28 Jul 2023 13:56:39 +1000 (AEST) Date: Fri, 28 Jul 2023 13:56:38 +1000 From: Stephen Rothwell To: Jason Gunthorpe Cc: Jason Gunthorpe , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: manual merge of the iommufd tree with the iommufd-fixes tree Message-ID: <20230728135638.2ac25a2b@canb.auug.org.au> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772637597756196591 X-GMAIL-MSGID: 1772637597756196591 Hi all, Today's linux-next merge of the iommufd tree got a conflict in: drivers/iommu/iommufd/device.c between commit: 99f98a7c0d69 ("iommufd: IOMMUFD_DESTROY should not increase the refcount") from the iommufd-fixes tree and commits: 91a2e17e243f ("iommufd: Replace the hwpt->devices list with iommufd_group") d03f1336fd91 ("iommufd: Move putting a hwpt to a helper function") from the iommufd tree. I fixed it up (I used the latter version of this file and added the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. From: Stephen Rothwell Date: Fri, 28 Jul 2023 13:52:56 +1000 Subject: [PATCH] fix for "iommufd: Move putting a hwpt to a helper function" interacting with "iommufd: IOMMUFD_DESTROY should not increase the refcount" Signed-off-by: Stephen Rothwell --- drivers/iommu/iommufd/iommufd_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h index 5cba9107f873..cc3d534b0caf 100644 --- a/drivers/iommu/iommufd/iommufd_private.h +++ b/drivers/iommu/iommufd/iommufd_private.h @@ -280,7 +280,7 @@ static inline void iommufd_hw_pagetable_put(struct iommufd_ctx *ictx, { lockdep_assert_not_held(&hwpt->ioas->mutex); if (hwpt->auto_domain) - iommufd_object_destroy_user(ictx, &hwpt->obj); + iommufd_object_deref_user(ictx, &hwpt->obj); else refcount_dec(&hwpt->obj.users); }