From nobody Wed Jul 06 17:05:08 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B95651D0CC4E; Wed, 6 Jul 2022 17:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LdQs05JBHz3CVg; Wed, 6 Jul 2022 17:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657127109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cv/omCK2cKdnLeNB+cehrOkjggf+11cALOnMqex/9lo=; b=iqaLRCuuYi4jlGvo9cIYU+hwaduOJxJ59eNV51e+vYd+scmhhQTIDOZEjrRRSgeDosXgv3 0mTCY3L7+Plnu7dOrQ1PEDBvUJz2DzcTayY4cFXZPv1P9fmSKjD9fbh6qmx7ZKoUKUMhLD ZGW1O5tw7HWoMpDg03y7QXrbpN0AilYiwqa8dQ7+zzUa/ol2FR/URJm6+qph79+v3v3lp8 2Wn417Y2eW4GITdUGoYQsL0GTIgswrANkil4vsEUJLVjp9wS6xQMIuJ5ZrfFm4StwxA8rQ SPchHVVfVBDBSiGdUUN1SnpXexujScJJC74PdOIHOWhNnd/XmNkGcTBIh8A89w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 761611E3F1; Wed, 6 Jul 2022 17:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 266H583p083813; Wed, 6 Jul 2022 17:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 266H58XV083812; Wed, 6 Jul 2022 17:05:08 GMT (envelope-from git) Date: Wed, 6 Jul 2022 17:05:08 GMT Message-Id: <202207061705.266H58XV083812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Moore Subject: git: 895d8b1d3c33 - stable/13 - iommu_gas: Add a missing error-case unlock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 895d8b1d3c33e29d98a91fe96c7cac328557f6e5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657127109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cv/omCK2cKdnLeNB+cehrOkjggf+11cALOnMqex/9lo=; b=b+jEEO8q/iqgwZJmQB86cKr1bg6pVflUt+1hfp98mDv1XTdkcSEyxF6uNYrkQjVVPIodLY DVhlVLv8USu3ZpZfzI9+BlgSmCrqoobg2kx3aXzgizeIPQMg/wm3p2MU/4Zb7jsZ3Ei79x 4Gv156PDznWIUjVHFStjtY1VIibqPX3qK5l1cbYGYH22r+5KtkncrxuIF+oDAO5TbYWK4O jrR02Apq3owla1/ePRlCp2xHha6daT33mJPTfU29HF8VkVeKgLo3omzbdzCwkvvOSq5zLl Nf40L+0PLrPVKquO9vD+DQagi5Ti+trN2jcCH2vxz4sew5Rc3BqmZ/FXV0aXnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657127109; a=rsa-sha256; cv=none; b=W1TdnANPyG+8aqlai/tnGPJ7EvL1/pa8AJKxgCmxlAXLFEOkJYVnCLTyJW6p1hJXrRQRgV nESe0uDUzTiOP/8vxZoyRG02SgtH/Qxj+TQWeunyJhWoqiyVuXoJIqItAXGzjdl5VF6uZz luYvAEBoajIH9iWLwj0wIoZngysdp/WThVsfGMISRA0mODoXDCs1DuVmdhB6pups02nek9 s1nHiQZ7nXZuTUAfaCwhm+qOp5CjVUlLc1WY1kPjWqIs4s4oykCobNG3cYYS4cWL3Jwu6Z rxSnu1GNl0A4LPArgnzvoj0Bd1DgcDrYsTDOxAZRaV65EGZoPfjR9YqwWNczzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=895d8b1d3c33e29d98a91fe96c7cac328557f6e5 commit 895d8b1d3c33e29d98a91fe96c7cac328557f6e5 Author: Alan Cox AuthorDate: 2022-06-21 04:48:31 +0000 Commit: Doug Moore CommitDate: 2022-07-06 16:53:38 +0000 iommu_gas: Add a missing error-case unlock Release the domain lock when iommu_gas_reserve_region_extend()'s call to iommu_gas_reserve_region_locked() fails. MFC after: 2 weeks (cherry picked from commit 0ba1d8608234eee767b475627da6e5903ce7536a) --- sys/dev/iommu/iommu_gas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index aa2763e4e47f..48b27d6e81dc 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -786,8 +786,10 @@ iommu_gas_reserve_region_extend(struct iommu_domain *domain, if (entry_start != entry_end) { error = iommu_gas_reserve_region_locked(domain, entry_start, entry_end, entry); - if (error != 0) + if (error != 0) { + IOMMU_DOMAIN_UNLOCK(domain); break; + } entry = NULL; } IOMMU_DOMAIN_UNLOCK(domain);