From nobody Tue Jun 07 06:48:15 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 8F3071BD7541; Tue, 7 Jun 2022 06:48:16 +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 4LHLXc1ZKkz3pSM; Tue, 7 Jun 2022 06:48:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584496; 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=G/dPavTdncZ/9GVnvWwbed6LZ3eG2qtzI7euJBaA74A=; b=AlyQAsU9Zukm/LMlstWg39ONwnBFDl+1hqSNhIGSdm7pM7PmQy8ozf2dq2Izz+tJinv0db +v7ILxPFitQ8V7nBwqIAVtMoH1nMmF7XX6agVJoRHWMIJtW6Wo9iHxuhL4CX8mrvq6FRZM wVuD1uBxOSOc34KAut2Nx81Wp9ObVy18ieryeRvWswlWbozMgEyt8GMs+UtDXfU+AZHF5f ZgzMyc0RoVju5A/YGCnOp0/oT/AoGM9C+RF3a/3BagK7X6v43uJUDb8GS5zwkqzHlS95v+ vZ+xvY+fV29V/C1TtEv6OsmP7fgOTbb0uSMBETEe9aGsdLx+/gL89hBH8j5X6A== 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 D244716145; Tue, 7 Jun 2022 06:48:15 +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 2576mFwu098325; Tue, 7 Jun 2022 06:48:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2576mFBw098324; Tue, 7 Jun 2022 06:48:15 GMT (envelope-from git) Date: Tue, 7 Jun 2022 06:48:15 GMT Message-Id: <202206070648.2576mFBw098324@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: e8215345313a - stable/12 - mlx4core: Fix a memory leak when deleting slave's resources 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: e8215345313aa9ac7aca6cbe0851fa452088a784 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584496; 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=G/dPavTdncZ/9GVnvWwbed6LZ3eG2qtzI7euJBaA74A=; b=oXCwnoTjSTjtHLyKKw23T0ueHG6H9q7aT+nwK+mnpXPW8DKEldPspOCopp1wTzHm8tmKpW FEXTuf7dQmd0pjNJ2lAV2sqyTRwC3xlla0u/LSIkRXppfv0mm6zu5JtgvFdSa4MPmecS66 ghPlR72rFf/TXa5yl6X3P1dUmHUUl9JDci7A0PLcO8DzqkW83r25sF0/nhwCrcoAdpSjlL 9d5h1wJ3hgKjn5za2DKTqiyfi+T13fd2v0Y9yjYTlxGcMcEFcHY0ZIIeFtVPwXGQ7dIlO6 oOLS6cZDQpANmbWEwsRr306unqS9KGZdor+WKVuo7xi2Jlip2u0h3tVMV/aYVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654584496; a=rsa-sha256; cv=none; b=B0h/rvFUDfwKbjDRSEagDRqXWwy1OP9gNDhVywdpfempA23cZQ0f0SNeFpv7SPx5awsuaD FHhRoZ6Q8LMFn7qIm98ylXS7FkIrmVLJjLRcs4mw6JHCl90gZiRo9owXJqsOUMLN9efuyR qYuHPMI3R87yHdgGUo6PHLR72CENk5FNkR4YtL1irkFDSH9AvZk2PIj9DUCm9HsPbGOpUW voS81aQ69Fg85f4Arvnd+9zBOrYYgaLaCHw9+Vxoio0OUUql+Izi1DWxm7WW3QogKRH2vb xwPF625pqigl6It8BBxaVSW4HhZISjUqmu5vyXf2whLfSo912HRFH01HM2f0hQ== 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=e8215345313aa9ac7aca6cbe0851fa452088a784 commit e8215345313aa9ac7aca6cbe0851fa452088a784 Author: Hans Petter Selasky AuthorDate: 2022-05-30 18:11:50 +0000 Commit: Hans Petter Selasky CommitDate: 2022-06-07 06:46:18 +0000 mlx4core: Fix a memory leak when deleting slave's resources mlx4_delete_all_resources_for_slave() in the resource tracker should free all memory allocated for a slave. While releasing memory of fs_rule, it misses releasing memory of fs_rule->mirr_mbox. Linux commit: 461d5f1b59490ce0096dfda45e10038c122a7892 PR: 264249 Sponsored by: NVIDIA Networking (cherry picked from commit f29c9901a41fb650d46fd48f4880a894f54aa737) --- sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c b/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c index 4e4b04758e11..95ab8a8142a5 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c @@ -5063,6 +5063,7 @@ static void rem_slave_fs_rule(struct mlx4_dev *dev, int slave) &tracker->res_tree[RES_FS_RULE]); list_del(&fs_rule->com.list); spin_unlock_irq(mlx4_tlock(dev)); + kfree(fs_rule->mirr_mbox); kfree(fs_rule); state = 0; break;