From nobody Sun Oct 27 01:50:43 2024 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 4XbfcM6FRSz5bRQF; Sun, 27 Oct 2024 01:50:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XbfcM5RyRz415t; Sun, 27 Oct 2024 01:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729993843; 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=ZeNYO4a5o5oxJtvcKA3Jj/Qe+6xWjssdYxeN95LrUfI=; b=bc+UbhlEbmNWMeK3wbR4SKc0Y+T1kWwG2WuB8WlRV4Tswcn+HGvje9QFJ3zOrDMDd10tl0 c01izEi/wn/8n5BZizdzszZoykipliFEBDrUZVIhLU02iFxnJDxfJZGp1/cO0og33FiEvQ 8IgcOMm2EPlDTDU45He2FQKKI7QdSOmYJnho/GqwllrBIvZW4LrCF3qNQdu33gkvjbY7NU /0IogRNNr4QPpV6xX/R8DvnMkJy//piAFTBjOnYsz/A4lFwhyvkYJLuQaVRt8jqCWgDksm 0ipAW0Wgz2+qq8V4oHu2dZdM/VJrti0WgLIDMldABoFjABxIrMNI0fMV7u2SOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729993843; 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=ZeNYO4a5o5oxJtvcKA3Jj/Qe+6xWjssdYxeN95LrUfI=; b=sF3vNfzSJ36MWHuaDCvc02ZIq4zMjNpIOc8sWT/mzWag7RXMP0tE/rCwPTYAIolGxWQN12 kegf67gXyF9Qm32fWaSVP7Y1pc2MN788B+zKE/nGka1Sa7hn0RZODjKMDrw23FaPFCpRLO +9kKo/AjXsY1JBmQ2EVLrAQhe3oGrpExjjuZk4g6iFpScmFXBtt2RVmVujzB7ESAofuChw fgDxryzG8JG3/8pk/Fh+Y2a7E2/ukCtsTJBD1bzq3hh8NYEow1uMK1y7mqQH6cG7hblVn7 dLZzscO6itq3pzy6/lGIk8mHtFNu/PUHxFOqrTkJUu9XVvaTYtYhz1Qm4vulfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729993843; a=rsa-sha256; cv=none; b=xgVsCScRkb3mQrpS7IInyrNziIuXl3sg92muMMyOWKyiZsgpqwpobCHecA3K4KA6T2E5K+ uv8iGHl87ER2gYV5bzHLa6BtmNW0PoRvtGc5xg0JnGrsXN3q+DUk6z2rdKN5hRX4yW+sQQ onX9JcmYbStlWOMebwXoIHKG3pb4aEYa8aDNWjhMqX40KWs8CLU9WHaJujKOxwbxgE5ZuR q6F0tWxnP/4xr+fv9lsFzwDL7X8Vr7jD68Mpz6HNqIYp+zbx2hacHaceCOGYBWRuZI5pc7 3XYWhUmnZILma9X5k/PupMoB9lpKdf2JlXFWI1AsvDmmwdkSJk9Nmvhg60acng== 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 4XbfcM4xgLzb10; Sun, 27 Oct 2024 01:50:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49R1ohaJ099165; Sun, 27 Oct 2024 01:50:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49R1ohgr099162; Sun, 27 Oct 2024 01:50:43 GMT (envelope-from git) Date: Sun, 27 Oct 2024 01:50:43 GMT Message-Id: <202410270150.49R1ohgr099162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 439fa16e1fd3 - main - x86: do not leak msi_lock in msix_alloc() on iommu remapping failure 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 439fa16e1fd35181898b61264b205bf3b7103a41 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=439fa16e1fd35181898b61264b205bf3b7103a41 commit 439fa16e1fd35181898b61264b205bf3b7103a41 Author: Konstantin Belousov AuthorDate: 2024-10-27 01:39:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-27 01:50:15 +0000 x86: do not leak msi_lock in msix_alloc() on iommu remapping failure Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/x86/msi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c index c8e7db9469ed..9d5a51f9753c 100644 --- a/sys/x86/x86/msi.c +++ b/sys/x86/x86/msi.c @@ -723,6 +723,7 @@ again: if (error != 0) { msi->msi_dev = NULL; apic_free_vector(cpu, vector, i); + mtx_unlock(&msi_lock); return (error); } msi->msi_remap_cookie = cookie;