From nobody Tue Jun 7 06:45:06 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 782AC1BD5DCE; Tue, 7 Jun 2022 06:45:07 +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 4LHLSy5y1vz3ml9; Tue, 7 Jun 2022 06:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584306; 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=xMA1X1zsCbsoJB/KOe8cgaAhNWLYYTycu/mG2/a+q9M=; b=iS+H4znvLIayzC+Sn/nEZpbyOViyJ7nErWlSZx+o78ktcT1nBPnkirOaR5D61B5Ub/5hjl dpzwCupOvcmiVC1NwvS7uc0Pttwc2nhp3ojgXGzj5mfmQ3uEqC3uCEXIbTnQ7fzelfZ6EP n3xyKiUx0uCh41plXbBfVkx/I84MOVwC9V4MufA0AJXlEOQfB7IROCN5UgRk+R4ZkHfLyz BUbzS91VFFS3AUTUPpcEhnqRUWu9qFRbAbV3oZXQ5n3H5FmFNck8La4bbnrQ5jkvQaqyWb +0/lysguUQARLcXsWxRkQn2Iwm+Uq9424mcGdP1AYWu0u6Zob+39wu/gzAMI3A== 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 9A56D15EBA; Tue, 7 Jun 2022 06:45:06 +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 2576j6rq097850; Tue, 7 Jun 2022 06:45:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2576j6SD097849; Tue, 7 Jun 2022 06:45:06 GMT (envelope-from git) Date: Tue, 7 Jun 2022 06:45:06 GMT Message-Id: <202206070645.2576j6SD097849@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: 267e6442d049 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 267e6442d049939cd9c8ab5e3b0134deace39e66 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584306; 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=xMA1X1zsCbsoJB/KOe8cgaAhNWLYYTycu/mG2/a+q9M=; b=krE2UptJBqbnX3e9lH+LZO5Yc5n79WPUhNpZqNMUGpfdQfKEhwZix0lU4/0YVseuvfyTvJ +bzwrE7qpIsR3ahcSgv+pNiPkYwQIuVezVXmhCYeJ/YlqjdmKveooe47wDl3f27jV0LFdi OkvwvimXfMpDMXf4BJastmybfoj+5ylFbos2H1zFXJaG7RVmfgLbEZFSmNe14nFg+uFDKt qF8184j1hETHyB0IDeJhhdV7tggzFVzVQV5yjlun+pF3T7rV5InAoraWNWhLWFnan5Gb4J 3e1jFUV7LJXGSyaHdc2YgcyQF72/+PSXeG0qSCarCzZ6rU2fdo6m/SAFcrTgsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654584306; a=rsa-sha256; cv=none; b=ovD8OqGIiUNa5+7Iqwfpyf+7CY12iPohIPO2NlwAqOirEAEm01mWuo2K6S4xV5yUEfUU0L daxb8wfwb9Z9beuH03Q6jLL/islhNzJknWHu2vUZ0p+Zc1X8mC7c9xCzc9Ktror/datA6Y P73Fbke3ebvS/GszRyQ2SPGUhooAHWUntcy4TXZUDQUrVmmaF8hUbSVh0+y4vp+SN07wl1 epV/ONGTqZMN5W7Q7p1ygkY13n3WMH2yeEit4L7/0eHiZX04GlCsRV4b+Yvkczscwh1u7o FC3uamCkk81PgE6BDN/5LP0L9W/iHofhzpLm3d1J++PJWSYSKCB/ayaExUDpbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=267e6442d049939cd9c8ab5e3b0134deace39e66 commit 267e6442d049939cd9c8ab5e3b0134deace39e66 Author: Hans Petter Selasky AuthorDate: 2022-05-19 08:10:48 +0000 Commit: Hans Petter Selasky CommitDate: 2022-06-07 06:44:28 +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 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);