From patchwork Mon Sep 18 07:47:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13389074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 621C0C46CA1 for ; Mon, 18 Sep 2023 07:48:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4E5E6B02A3; Mon, 18 Sep 2023 03:48:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DFF0E6B02A5; Mon, 18 Sep 2023 03:48:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CECD96B02A6; Mon, 18 Sep 2023 03:48:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BEB486B02A3 for ; Mon, 18 Sep 2023 03:48:50 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 943E5A0C36 for ; Mon, 18 Sep 2023 07:48:50 +0000 (UTC) X-FDA: 81248941620.03.8512721 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf04.hostedemail.com (Postfix) with ESMTP id 510C540016 for ; Mon, 18 Sep 2023 07:48:47 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf04.hostedemail.com: domain of ruanjinjie@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=ruanjinjie@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695023328; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=o6rcYLSICu4XjmQvOaYlKioc7o1tG7/6Vkn88T7a/ms=; b=0tZSSwJyn26/44qFiZa6KBesq4mBOko0oGtdBjJMFFvWQlY1O4b2O9EnUzhN8aj3wDFQQr X2nA8M/qUfwo1sCFQvLAD0aLzQdX2PB+ZEAkvL0RMXyI3nx7pWL9Zp8X3nOrHaoaxNVRGf 8iju3870zTQ9B5v/6spqXayMaUMhP6E= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf04.hostedemail.com: domain of ruanjinjie@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=ruanjinjie@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695023328; a=rsa-sha256; cv=none; b=XCcQfztauKO42+EqE1kxSi9IJGNd6r4Bf1AWKMulkHxp+golev0TzcZtzFJQfHPfVZgc3b DIbeYwpt5mAJUjQHlr6c/YWGu1++GWyqQ+VlITG6DuS8L9mm+lXk8X/fJHHbMGRqG4V49Y BidkHXIJP2iTT7YfjIQEE56wo03K8cU= Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RpxdS2bNfztSWG; Mon, 18 Sep 2023 15:44:28 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 18 Sep 2023 15:48:39 +0800 From: Jinjie Ruan To: , , , , , , , , CC: Subject: [PATCH v2 0/2] mm/damon/core-test: Fix memory leaks in core-test Date: Mon, 18 Sep 2023 15:47:57 +0800 Message-ID: <20230918074759.3895339-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 510C540016 X-Stat-Signature: 3tcqttu3gewoon55twoaqtpy5gdgyjng X-HE-Tag: 1695023327-945467 X-HE-Meta: U2FsdGVkX19YME3/jmbtW6sV3SgNL3wj5Oufyyw8bb9xZRuNsaZxM91IMzSSRaPMSUId7AO0saAoGsMycmJ0mKh9dIZThfKwpLpyENNWjT25vxIkybvhhA72dcz27mstktcgK2e+lo8rGpiA9lkELse6iEYB5gKcrFvW9zSKx/2kO3/PMkTw4p8W5TlQdznLimutLEh/Cv5TSWVYdaf485ilJthA98wg/pzF8afFpaZPI3umXuDSW1Ov+/JEMbtlns4hXjBY4mcYoN9zvRpT+ClYusGV3RONlohCpEkdO4MJ3skH8nqpQpH/IfMhAZnJ8Ndf7Bj2UxyRjkQ4hU/uOkZ7M4p+78LGnE1QMlsBKHqqBGQTiljo2LfCp10IsbQ1zm5XznQbcquD+7X2Bsk5kLMkipAMbJop7fjMS0bLlPq/fSXuIDeAc+4JSk+1hMQvpT1lXYgfB3dh+pykbfgtV98Y7Y9heE38iiUpdhs5XEdyv2N7XI3uXRMGCgSK4ahW3kRDxunQALXiKoG0wyN0EYlsjIEMZCHYK3ndQaRb+AN4LktUS5tC4kKNjIWRzaozPunIfc+5yCz2PMUvrf7K8WEWa4mO5IJznWWvXjDEtbAFJSzABqMnCT58TCGoE05t8fPbq4LvaRN0kIAVFSchXdtSRnPDDcsR2d9GtiIz4aUlMMPZZ45HC9M+yh8QpIlb5oMy0wpNnRhO4bFlbWWWmMEKMksc1fN7xTitdpd7ap7384vzwfvSntGVjhf4Uxiae7OIcYt05ay1JZI10ZQf7g4xk9Gx3y7G5HGeQPVh4I9EiOr94Ee1d/3LuOsXEhep/VsM7X7jzWCd06TFBnb+rbEXS6o6UnACt6M01wZSSwH7W8tymCO/aLo3+OoOB8C3ufsA5oxHPzvJ9ZucIpHe8P83nz6BeMXW/aOKCTmpADRX/3yb1WJwbyUwBPD72pd6+hslF4zgJXaA4gV4lFc 1t4p6IF/ mD5zZiqVsZKv/9V01NsVQUOF2LXPFRxfHD8TujQNjm/A83FrSYbl8/HsSveFQ3oLyagc6Kv3dMBoLQS+cVQWtfI62udcr/mkxcvNcBx52v22zirDDVQo6WSeomQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: There are a few memory leak in core-test which is detected by kmemleak, the patch set fix the above issue. Changes in v2: - Add Reviewed-by. - Rebased on mm-unstable. - Replace the damon_del_region() with damon_destroy_region() rather than calling damon_free_region(). - Update the commit message. Jinjie Ruan (2): mm/damon/core-test: Fix memory leak in damon_new_region() mm/damon/core-test: Fix memory leak in damon_new_ctx() mm/damon/core-test.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)