From nobody Tue Jun 07 06:45:07 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 89D5E1BD5FE0; Tue, 7 Jun 2022 06:45:08 +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 4LHLT00TNTz3msx; Tue, 7 Jun 2022 06:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584308; 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=7K656ihao9qMzxSvZXOnUMO8XvAJ6p2AbXY3bLdkUOw=; b=LY+pVOi+OQukeMX3hhvZ5o/2efdKSfxP4AGv+3bxjKdX7KLabxzTJ15+MWkiRrSn7Z7FQ7 SSukeNUe73MYkNYzS+KsHOlSoLc4/yHv8TBQZerYheskiZ5szengqUmuQo9Jr224fuhryo Ofe4NrUKJEQkQK2U8+QXw9s+aemLPD2j2cpWnjnBlwMjINqu04MiOj7Q7QcqQrGmPwgDcE FQRys58HFtD6kRox0MWOSlkwXIcFkNH4C6hjB0Kukz91aCnucCgeYgbT2tEHZvCRvNltkh Ox7GulKBCUkSk8tsZ5L94nnrdeO2DFs2VE8W9+5AKhm9Nald9cFbj+2/6U3qJg== 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 C31DD15EBB; Tue, 7 Jun 2022 06:45:07 +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 2576j7v0097874; Tue, 7 Jun 2022 06:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2576j7sf097873; Tue, 7 Jun 2022 06:45:07 GMT (envelope-from git) Date: Tue, 7 Jun 2022 06:45:07 GMT Message-Id: <202206070645.2576j7sf097873@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: d264494e983a - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: d264494e983ac964dc5cb8a2e51cddbb9d6c3631 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654584308; 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=7K656ihao9qMzxSvZXOnUMO8XvAJ6p2AbXY3bLdkUOw=; b=MxRv+ltFRZ/l9G0WDlJVoaLrWBJn3EHfGbodr8FhXrM3FjiihECbbioOYHmEUxCVO6+t3L dU5WpTqmsIKbutJdywfIH4foHNvi01dOj56ho4PR7kTT6fJQytHGrYTpE+crB6O6gNzSuu 9ufDl41VJKvjog2oxjwXZZofXFSyxQ/Jc2yxDn0QXuJLarB0dW/89mNOYJ5wFvRsvqINT5 tf5lvH28G/3R2vJN2Hft+X+ScKvPHxp6Zdcyl5yLQ4KJ9B32u9+WD8o58qwlfb2pTRE3r/ 9NPPD9otPHW3/Mb6vSlSkaQmpmBGeNosuifjU51xVAgK7TB+TsFtbCoepPFBTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654584308; a=rsa-sha256; cv=none; b=oHBKbao1zQhBLFfjPnuK9AWACtWNM0WWa5BqHhuuFw07JPTqIDvOYxgxUTLKykzHkA0Cjx yz87YNei/x6WQxfwrCFDet3Ih6Ojskb3DznRTKiwrD7F8gbloqrJ3OEmwgHY5p7PQy3eUQ 0/HpPVUWxYAddn/eO9ZznQ32Hj/PmaIegZ6fH17lakGYqxrAmBqdHyaPa28NDZoOscc5OG ZF3TP/l2jTmrZGOhhTe/jvKiZlWc6IPl5DGPpGec5k1kwy5M9z5DdE4tAsHq4iLAhjfx5V dmnTR41AgYDvFnq+kevy8bfGiFVQ++0Csi6eTDnsIx0tR1H04n9H3CdZboL73g== 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=d264494e983ac964dc5cb8a2e51cddbb9d6c3631 commit d264494e983ac964dc5cb8a2e51cddbb9d6c3631 Author: Hans Petter Selasky AuthorDate: 2022-05-30 18:11:50 +0000 Commit: Hans Petter Selasky CommitDate: 2022-06-07 06:44:29 +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;