From nobody Thu May 19 08:26:32 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 C2D7D1ADF902; Thu, 19 May 2022 08:26:33 +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 4L3jcn26zPz4stY; Thu, 19 May 2022 08:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652948793; 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=7a0NHVJ3tQjJv5E7GXappRoyd2/eOf6AB0y//wL7HcY=; b=WXYUCNHpQl9G9/p1VnlhMUxwXV0uRf15ut65wJLO+xizAv/Hq5zu+FjuofdImKSY3ELisG QiD6FqBKWjzH/VqOdToB/swYxVuw/t1+vRJISiR+0Rsnfz50OJdg36IDksjRmqwFV7xqPF SuB8Bi2gYscXKeLb25SPA5ZnqNWF0OyS4/kV5yIcgB8TniaG76iNwpkWhIAVBcJsdrKQ2y /ksTykCi3lAEsiyEo6kwwBZ6onrZVavPVnzLWS4aGlUug8NXtyLrR/ocWuLylEINsDqD0R CbADL47ViKKM4VfsTHLLrX9vG9WYPoMOsgNB3W/DNAiTy96Hu+T6lsrgLbuWKw== 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 0A5711A1D7; Thu, 19 May 2022 08:26:33 +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 24J8QWnV068317; Thu, 19 May 2022 08:26:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24J8QWCA068316; Thu, 19 May 2022 08:26:32 GMT (envelope-from git) Date: Thu, 19 May 2022 08:26:32 GMT Message-Id: <202205190826.24J8QWCA068316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 527762b2f776 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 527762b2f776381569bd662ce236d2845234c0a7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652948793; 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=7a0NHVJ3tQjJv5E7GXappRoyd2/eOf6AB0y//wL7HcY=; b=TlDNj0mEBTmLAm4wdK7vdI97s0x3Q1QNF3a21V8Ywr8600wVrcFh8klYsCiYz5H6tot1Mb Z8meFITjtVIDantOEb5jMrJTfYZIdmJUrUtzmjCeNkQYsLeFRnt4mYs9tLce/Z4iOpnTD6 ssodTkoYmE4n44gX48M/2MZc49qyVd0I13Pnp2u0brKKjW5oUmFespsEJbnK9f3n/yRV9L pH0brtHh+h7c3IJQdNh4hNaplA7mL10UMKpsHlXaDn07Tgx2SSzS+EQTt1FMxMIeH6JZsz YF3vAEj2VQL5/oHz++9sVSq/8mFZjNFW7keLwvb8eVaB8xu9BtHfBv/hrT910g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652948793; a=rsa-sha256; cv=none; b=SXkl5xDJ67qMOe9tlPY9s2YgFSA0zu7+WaCT+qqBY/LIyA3YCBesGI5g9m7TIXvf4yBIya HNFYsCvTWlPcpQRpHHO2tjFx9yZ97U/2Ts6B17v+IHr/P1HADPxDEXaJ5rRaRqPKnB8iyQ ih6Rrfz5KuuuobpjL9WeF2JQnP4oIwWmZz8hgMZ8b6/VPmB1KgpBbanP76RujqmXMmX8l0 gjB58BsJw15vu4TWs6YhqT/SnA9eFUAvLnoEa8QNzwRh/L2CK/jvGdIpUmecSk2r4k0vU+ /1kjnJK9rHPq795HtD53dszkpm9I4i6S+G80KJz2hoXWnLoiyMEdw/Fv+xD4xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=527762b2f776381569bd662ce236d2845234c0a7 commit 527762b2f776381569bd662ce236d2845234c0a7 Author: Hans Petter Selasky AuthorDate: 2022-05-19 08:10:48 +0000 Commit: Hans Petter Selasky CommitDate: 2022-05-19 08:13:06 +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 MFC after: 1 week Sponsored by: NVIDIA Networking --- 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 68aa7e76c79d..de83a3bf5a76 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_fw.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_fw.c @@ -2702,7 +2702,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);