From nobody Mon May 30 18:22:56 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 DEAA21B49C1A; Mon, 30 May 2022 18:22:56 +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 4LBkKr5s30z3GZ1; Mon, 30 May 2022 18:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653934976; 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=DS+p7fpd8uHKj/Okx4RTePsXrEPr8gU+oGJ60pU6mgA=; b=hL4dw17pw5GV3B3U+j1bfJH3rc2SCzhtr7YBN4ES4gr2m7qMQZIrAWzNDkBZTQeFK6qMPA yAmM7o9VBKsirGe/HJT2Nlo2RkRJE+j/8rEQjFWggclBsaseKURRXw7luGRWlDl3Z2gbf1 SqILWsO0cokCm7kB66022jdwCr8Hm/8XqhTDg7Sxi3+sLQN4yv2yjC0+ball+dGrTcgojn ltYhu3jjNvq/CH7CQq9FNKiaCezv6r4IbldqFr2jXfbiJv96DmWX/xz9j3UQaeo6H4jhKF MzW1NbThALg9SzjviQ8dcFdxlKef/rJx5C5xbdlACUTFK+NaVx43jqqHsJWzRw== 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 A8CC01C2E1; Mon, 30 May 2022 18:22:56 +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 24UIMukk075090; Mon, 30 May 2022 18:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24UIMuA4075089; Mon, 30 May 2022 18:22:56 GMT (envelope-from git) Date: Mon, 30 May 2022 18:22:56 GMT Message-Id: <202205301822.24UIMuA4075089@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: f29c9901a41f - main - 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/main X-Git-Reftype: branch X-Git-Commit: f29c9901a41fb650d46fd48f4880a894f54aa737 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653934976; 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=DS+p7fpd8uHKj/Okx4RTePsXrEPr8gU+oGJ60pU6mgA=; b=CBFSIUwxye0Hz59xyNZAq3CqRMhrqDzkHIKm7UCPNhQZg8sS+s75CXyLgEQ3DULyYF8tKo JqsY5lrlSDsUm43fC8TcrlHzfoktGHHdtJXW/iwHf+6l/IkYCWgy3UbyLQ7PCS0amX0YRZ REoEtBPN14fP/gB6ZTW1jbVyyGF6fe73C7n85OYkyhQtdEZdtGd4CGyZVtERSVI/YNqJ5J wo8NhGQY4tz2mIOqsRerUNYBlx0G/LAVceIJPx2x5aWQnO3XQ9Xx37gyVW11HXNeFYryVx Z4ED0kYQlwdMzvBBlNH/4sEEOXRg4YCoev658LsVm3e0R30mIZH+7DJBdlwsHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653934976; a=rsa-sha256; cv=none; b=sL4ENMBUJuOxR6RMjlo91eQshqWudhWqNYzkxS/ygBOYntUeInLNWId6DimcbyKDoBgLV5 epg6gu0giJf9R0SM4A4yXX62UKtdkzC+KLoInoWJ71HostkuCmCPBY/WJp21b7mdDbyiFo IghxuTa7lUr2odNWruIdr8dA3P04JM6GyLHcJTCnk9XFLVqUdLXXnjJzlY0/j/u9+S8waU 6y5HZ7f9/wktmsLULTRM27XGkZ/G3kKi/v8CRaLMDirbTCi/yo03Jm7P6OmVyFnazIffAI kAjlDZb9EDPdtND94yJYXShqZCH9lmPrZ36Vpl6+xMZRJceUSnYPJyneLgMUYw== 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=f29c9901a41fb650d46fd48f4880a894f54aa737 commit f29c9901a41fb650d46fd48f4880a894f54aa737 Author: Hans Petter Selasky AuthorDate: 2022-05-30 18:11:50 +0000 Commit: Hans Petter Selasky CommitDate: 2022-05-30 18:22: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 MFC after: 1 week Sponsored by: NVIDIA Networking --- 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;