From nobody Tue Jun 21 05:00:18 2022 X-Original-To: dev-commits-src-main@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 74F59876562; Tue, 21 Jun 2022 05:00:18 +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 4LRvTZ2tDKz4ZfG; Tue, 21 Jun 2022 05:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655787618; 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=820ixMDRyH6dB4nWt+KB6GOJrk9yVLR/pATUvXlkWuY=; b=JHMxETzRe72Mpk4Aw4JGA4FGgc6brh8WXmv3yO9FZk3hkmEB6ginds7jxAjUNo0xpR6BPT 16urozq+CKydOcvG7hYWx1UgYLnxluiZ5Qfhkyt3GugAeTZJ9goxL6RU3ccFZk3YE5qOR7 1GtW1LyYd1d0F7MxQjGlg66dIZbVy5NqSdpQYpDUjo/SHTqunOrjQ7Jh8lH6XACvKf2guc sEVjsqVSrzDjz3LQ3uU1p0SQu74MkN1s3lw1KJDqQtvRVoP2ZZz9EmbW35pDcu4edi3H2L MLj26+prd2tCap58eteCZb31iSWjDFtZDfr0mE2rHJq6x+DBMfbHnkAYSedtPw== 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 42CE6342A; Tue, 21 Jun 2022 05:00:18 +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 25L50IFm020534; Tue, 21 Jun 2022 05:00:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25L50IlW020528; Tue, 21 Jun 2022 05:00:18 GMT (envelope-from git) Date: Tue, 21 Jun 2022 05:00:18 GMT Message-Id: <202206210500.25L50IlW020528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 0ba1d8608234 - main - iommu_gas: Add a missing error-case unlock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ba1d8608234eee767b475627da6e5903ce7536a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655787618; 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=820ixMDRyH6dB4nWt+KB6GOJrk9yVLR/pATUvXlkWuY=; b=aNw6xd1m0Ea6uPAiL67ChgiS8D+ofU42F2cDK2Q0INHPySGGMvpMOriU35n7UI4M3e3+mu tIXVz4ZU/idRTYRkoG7tpi8wB4ryPdaRxNwcoXp9Md48w/4x6RdNGtn0c04IzgLnKGsIxt tqK/80KrINbj8qLMeXFoQWIDNvaAd5GD4iyhC/g8KrqN9w7D7AiFvxnIlPbgVVAL2fBn7G zIEWQG+05KwhcA4LHc8U+Ad9Wy5KEwQOVLz430I/Q1GYTYLelPHLc7AvUbJANvONZR/LOH J2TffreerI4Qre/bPsY9TL77blLZkf5nFbTMoaLG4WJZgUyJcixlFcAPOQAeaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655787618; a=rsa-sha256; cv=none; b=klx1TfDoNlR6QhsGNon8VruL+cBYs+6U4jmpa47V2f/ZQpJNb3MO9AnhwNUb1sdMuY7eqC Wy5TCTAgEoX+tqiC9PAMm6bhfz8WrZ9bL21+rROa1JVXO++7q1boHNooJ2ZmFwGC4CsVZR mLLNK0b98E01/LEjReKRCsNX269j5rFT1F4xspR/fsrA8sOfSy3cD5uLyXUgAgZfgME2Of WGtmgS6tYJMkcmcd+oFF5MOnEgGd06X8QbNVJnnXuvk7gamUb/8jB1OvCWaquaAInN4x2l qLQH9raFTGUCfHYvdYLwdS8sJH50GMDgpl6x8HE5LG1ods7j3N4VobrIXFclXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=0ba1d8608234eee767b475627da6e5903ce7536a commit 0ba1d8608234eee767b475627da6e5903ce7536a Author: Alan Cox AuthorDate: 2022-06-21 04:48:31 +0000 Commit: Alan Cox CommitDate: 2022-06-21 04:48:31 +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 --- 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 70eef9a0a1f7..a9c4caa30dd8 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -781,8 +781,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);