From nobody Thu Feb 29 06:54:23 2024 X-Original-To: dev-commits-src-branches@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 4Tlhlz5Z0wz5CKh7; Thu, 29 Feb 2024 06:54:23 +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 4Tlhlz2jRBz4f6K; Thu, 29 Feb 2024 06:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709189663; 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=VIKBXBa/PQV8ZNkVR5q+on+oV0wTA771NBd/0GBsjR0=; b=c9YVGU+AdBnmlTKcnzDngbmmGWbHf/Ylki7egrA3TVA5mzJT3gcoDiz1G9Ea1qYepudtok dRDRIEoKnXWWkYNp4tt7AeHSRFvvKrLYQdM0sJ5qxPfH2Y5VszMcLNHGPqPoNMwZn4XHX1 CpUWFPqcmiYNo0VVVK+29hWb6k6+xdtafzyTs23mc+OCIDMixMC4/O8fzZe3uZrAIVNw2s Q+YVE0kWUIJktTCfFIsb4fmxso52ki5rXndEqCIQGVW9eWDx9S9IGV+Vr9iR7qXyAPjeAr Tb7CC1ysSJ76E+kzGFgUNFvI+jeWRHUURTn8VXGhQ64fv7jcWyeFS7uW2yeeEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709189663; a=rsa-sha256; cv=none; b=a7rZ86K7lgJB+cm6megjM9kwuieJmlgdZm9BfgMVFnC0+sBmUaWpmjnuGmB9jF1Tp9f8o8 sIoN6rRntPKq/Yu59kkhYmMmIyJj18GkoRgTRUjErNQOpi5uuCQ8rOagKUhfzvCzIU3sAo CGcC0curcm3C4jJjUJlCHlShzXeCF8I3DAWWFy8U/IJpRt4Vu/1PRJir5AnLpUa/Pz/807 BgA/D14TEBgGP/Tw4W0Tm77+UrlALEHJivMQklwQ0o+racPRdT9UvZrr04Imqj+TAB9gnP 39SIsKUa5011t7svtkxFAtWSsYkwxqKGLuuyB8+T6mbz+SI323baaLsbxLsHXw== 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=1709189663; 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=VIKBXBa/PQV8ZNkVR5q+on+oV0wTA771NBd/0GBsjR0=; b=xbV7XYDDXXM59lVwYJc8LISMvldE1F4pkp3pqnVRLO0jGBJ1mHkboQz3UgQOu/3ki4fxrl Pj8F5FYElmIc7Zo6uHYulSDTJvt5NKgjDqvEgJLKwVwJ+rFPr5gO1MgxQSYeIzAlLmkAXE 4koPQ/W5gkbCwTiWAnIg7cjdrkIP+IVVv08Gp9yrMkQuGK4EWPvAhWgRixZJIpolwx9POl bUvLJdhDuM9D5gQ1mQ5b7lF9xLrti7pKvoTw1ADThSCCOaR4YIsZPsnJ0bxYEno+qUX0Mp NwM93WR8UzMN+SU5qoogUWJjnhfHJR9OJdICgeD4Favr0a6H0DqLKQb5p9Nx5w== 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 4Tlhlz2JtmzX6w; Thu, 29 Feb 2024 06:54:23 +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 41T6sNkf057304; Thu, 29 Feb 2024 06:54:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T6sNM3057301; Thu, 29 Feb 2024 06:54:23 GMT (envelope-from git) Date: Thu, 29 Feb 2024 06:54:23 GMT Message-Id: <202402290654.41T6sNM3057301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: dda1c30ffe54 - stable/14 - mana: fix leaking pci resource problem detaching mana deivces List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: dda1c30ffe5433952c8d7597ed05c74d1721a73a Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=dda1c30ffe5433952c8d7597ed05c74d1721a73a commit dda1c30ffe5433952c8d7597ed05c74d1721a73a Author: Wei Hu AuthorDate: 2024-02-13 09:21:14 +0000 Commit: Wei Hu CommitDate: 2024-02-29 06:37:23 +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 (cherry picked from commit 47e99e5bc5bcfa621fe6a3e62386f227c47e8cff) --- 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 a601873876cb..e09918496b03 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) {