From nobody Tue Jun 07 06:48:14 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 792E81BD75A4; Tue, 7 Jun 2022 06:48:15 +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 4LHLXZ6LSVz3pNq; Tue, 7 Jun 2022 06:48:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584494; 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=iKhBB1MC5QO1fdz+jLBBqa+NKDfDMqAUNhB2NJEQhRY=; b=dvUDWSOZ27ALIcSDNFCtp6B1PfdOl4EkJNwavSBM7vs1xoVho4uBmoITQVOELO4xWI0YCD b0+Qy3oJzs1GKfGTzEXB5cU1drseD++dFH2nDcwLGyXuOi5CxU2itb11/98XlkgPWNs5zv YcdkOQODJGfgDteluL+cEKX7XAJMHRgkUxqo1303iKO6bjkUOSrSJf/tMuaGqQcxQ6M35K OjZxofFL1RJK1ClpRycaOlxbrc3wHn3usQrS7lTa2vCVfYPOHF4FI8kB4FEHYu51QAjZdZ y2klGX9f2bAK0DdAo4Ph1VyxItxx7jz9Gqd9Xxik6687NA7CgqEqeN+ZBzE1YA== 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 A7FAF1630F; Tue, 7 Jun 2022 06:48:14 +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 2576mERl098301; Tue, 7 Jun 2022 06:48:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2576mEVC098300; Tue, 7 Jun 2022 06:48:14 GMT (envelope-from git) Date: Tue, 7 Jun 2022 06:48:14 GMT Message-Id: <202206070648.2576mEVC098300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 936bd793479e - stable/12 - mlx4: Fix a memory leak bug. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 936bd793479e274155fa2c42e770d0e4e35943cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584494; 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=iKhBB1MC5QO1fdz+jLBBqa+NKDfDMqAUNhB2NJEQhRY=; b=x2UbmwCk/3e4SdnEOJXK4VTviogpITyJx0TLsebtXMFBuwoQQfeE02mS5gALSU7d8PvBMk Dc/5uf7TvqUVZ1ej/LIpTqguvdP9+MPVGoMVmQIhOJ0njJzZj9d1lh/LwvdqQmyJM/Mepi V+5VzzY3E2sl3SqcFk0E74OOi14LoMRDQu617V6WYJ9MtRhRZffvFG42ovm/PLHEOcJd2m J+ZvvEGB0pycgUtVNOjvHxVizTHuteqedS3I8RsMWIPx1nGu0Em3xyNWNrw1xJ0cPCHCgq tbN7E6iX2NCa1EOIUZO+BhOwQn1mIUhWxe453ytnlPnXs+VkGvUtGBrFvvBn3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654584494; a=rsa-sha256; cv=none; b=ek07QbM/uoFP6GeKvc8ifCG4kWgySdexy1wt0wMHZFTCZbKhjUesGttgJTLM58KUWyGJuP OCmIvLOBJijYfklQtNEz+/5xG8mIu3g2OldB933wBvLmvlwVP/SwEciQSDBf1k0SKCOV7r PnO7Wn9y7f96Bm5EAw5BRCD1sTXaVwGVIp9VB9AyOf6c8h6DI8mPRYhJ2dJSP15kQRKSbG U4xq/ilS9dzcWazk2MlHowIxpyJyrNwWZGVWWuDZO1LU2hGgaFT37J1Qr8n+SC7Tdhxrko AF9kMTateu3vREnmhqXJzB8706DkGCo7szxL7M7WSVp039uCRLplTVPpwWUrog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=936bd793479e274155fa2c42e770d0e4e35943cc commit 936bd793479e274155fa2c42e770d0e4e35943cc Author: Hans Petter Selasky AuthorDate: 2022-05-19 08:10:48 +0000 Commit: Hans Petter Selasky CommitDate: 2022-06-07 06:46:14 +0000 mlx4: Fix a memory leak bug. In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Linux commit: febfd9d3c7f74063e8e630b15413ca91b567f963 PR: 264056 Sponsored by: NVIDIA Networking (cherry picked from commit 527762b2f776381569bd662ce236d2845234c0a7) --- sys/dev/mlx4/mlx4_core/mlx4_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx4/mlx4_core/mlx4_fw.c b/sys/dev/mlx4/mlx4_core/mlx4_fw.c index 8ad31b812428..44c66becb340 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_fw.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_fw.c @@ -2695,7 +2695,7 @@ void mlx4_opreq_action(struct work_struct *work) if (err) { mlx4_err(dev, "Failed to retrieve required operation: %d\n", err); - return; + goto out; } MLX4_GET(modifier, outbox, GET_OP_REQ_MODIFIER_OFFSET); MLX4_GET(token, outbox, GET_OP_REQ_TOKEN_OFFSET);