From nobody Tue Feb 13 09:39:39 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 4TYxB365rTz59rd0; Tue, 13 Feb 2024 09:39:39 +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 4TYxB35c3Kz50X0; Tue, 13 Feb 2024 09:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707817179; 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=zVevPtLENGvuBdToAGN0QRxGLSk8OP6oh4xNWtmNecs=; b=V+7SJoyn6zHBByY0b1P+1H3c0u+7VPKb0yCtCPOYzHG5pj7v/45yp9ayEw+wykGSpBM3VS qqT280eShmdKbClZxyKA5y/h/F438ck2weVoEEq8FETNCN7ArWMiW+IE4n76wTEp/XrwlH qJv05r6TGju5dbZH6u+RPbULvTNpQ7HObK0f5c0FnoNAyDudEXQVzfFGI4nzcC178nP1iU Nsq9rWQ1rFbYTTlpsnQox2MFvfaK0xu745LWqzmEoyN1/9ywB7kUvkc9ri7zGglzZzUO8q 4o42PjgLVq9oEYQgABGed2OR1UnjJgbO48tYK5ZI9g03QeGre7hvWlZzR4CAXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707817179; a=rsa-sha256; cv=none; b=imyN6/3/931WG4mhYVgXofUDczzBNZ1z5c00diz7Lpl5rnzxHcyn6w41y/EsY1dJ6TYqm2 EGh7lzcuqEnDMmeG8xq4ACLsAAeERGQL/y37Z31dpZgtlnR/rMsbeZTGwBlhnEHwgTcHFM 75X/C8P1mNcJ7e9p5QBaFAl/6nC2L8b18Cv6mCf38Nw+w7eAIf7JK38fP3aeIM5nme4xCe Rco1MpijcsoQpgTM/d28ccPuF6ORV0N3lhVDvoHvWXYghSsXafFz/wVu3CzpIbqiuTcazQ gCUXElDiodbjulhY3WxfdE+q/Xk0OxyTJCEng4tNcfl140EAjL+YxXSjgsymtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707817179; 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=zVevPtLENGvuBdToAGN0QRxGLSk8OP6oh4xNWtmNecs=; b=fjTF5+OFGGDelCURB24C0Xwxqp/K3XsvdWj38gNatCZRt4ar+ugufbZIM+BlVp8QBZbQs/ xBp4AfghFMp9bcRcwjbAvqhTYreSJQw7C18vZSXs8dvTWrVxYsogK4d3bcEuFb/DmwWCXZ /xauuQVgD18+HLKD+TzqX5LdEa/nxkJkwcWsbiC6cHU1BU/YVNM6KvOlFtVzkeGy8VM/JV ZvALVLMrhjxAiKoDK+g3AOWIIlFgC0QjpS7zDwbr+izZIncDY3mckKvCPhvQD6ZMc/xrwG B4mwGTLOy5RaqWBpyp4wBEoDMqLKAFsXVpCHSAP/cYO3S7Fwt2/q6ZCVsjZCRQ== 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 4TYxB34ZFdz18fr; Tue, 13 Feb 2024 09:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41D9dd68014388; Tue, 13 Feb 2024 09:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41D9ddTr014385; Tue, 13 Feb 2024 09:39:39 GMT (envelope-from git) Date: Tue, 13 Feb 2024 09:39:39 GMT Message-Id: <202402130939.41D9ddTr014385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: 47e99e5bc5bc - main - mana: fix leaking pci resource problem detaching mana deivces 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: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47e99e5bc5bcfa621fe6a3e62386f227c47e8cff Auto-Submitted: auto-generated The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=47e99e5bc5bcfa621fe6a3e62386f227c47e8cff commit 47e99e5bc5bcfa621fe6a3e62386f227c47e8cff Author: Wei Hu AuthorDate: 2024-02-13 09:21:14 +0000 Commit: Wei Hu CommitDate: 2024-02-13 09:38:31 +0000 mana: fix leaking pci resource problem detaching mana deivces Fixing the error messages when detaching the mana gdma devices showed in dmesg: "Device leaked memory resources". Reported by: NetApp MFC after: 3 days Sponsored by: Microsoft --- sys/dev/mana/gdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index e955d9e1d304..13f8a30762b1 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -1562,7 +1562,7 @@ alloc_bar_out: static void mana_gd_free_pci_res(struct gdma_context *gc) { - if (!gc || gc->dev) + if (!gc || !gc->dev) return; if (gc->bar0 != NULL) {