From patchwork Mon Sep 18 12:09:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13389536 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 E2EABC46CA1 for ; Mon, 18 Sep 2023 12:10:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AC8A6B0327; Mon, 18 Sep 2023 08:10:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 65A766B0329; Mon, 18 Sep 2023 08:10:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 571DA6B032B; Mon, 18 Sep 2023 08:10:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4729A6B0327 for ; Mon, 18 Sep 2023 08:10:35 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1FC671A0CCC for ; Mon, 18 Sep 2023 12:10:35 +0000 (UTC) X-FDA: 81249601230.08.935058A Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf05.hostedemail.com (Postfix) with ESMTP id 12E3D100016 for ; Mon, 18 Sep 2023 12:10:31 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of ruanjinjie@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=ruanjinjie@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695039032; 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=Tm8vZOFDm/2VrxK449yfOpzbQAoNjn9dx1ux0gTqcTk=; b=wiGSOz7jksVE6KwiuDjDZXc4zoWPAzOFn3tdPQb45bXTFybrPXx6r+f8SyhyFbnnkDD1cf uSrQZTJvKXUMSG+jJ+AOcgQjPyiOiqA4JvaQHIqfO07I4HThtCLH8BiUeE8GF6ybNiX5wj PXf7YTIiMQDmQfSWCDEe5VXBt1MP8lk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695039032; a=rsa-sha256; cv=none; b=ozbVTg8b2BcXkr7jOyx94vABa1a+FXe4O6/x4E2pQ8ahiP8ywpMyeZ47ZeGxxZLB8pZv0W olpcBCya5QFXRFTrh+qH4VXfPodQK9DW67pSL6+YmMS6OAT0lW69/NcMM9MjAk2LB+QNzL zvimIcaQVA4rsykApgl7WLVdkIZYC0s= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of ruanjinjie@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=ruanjinjie@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Rq3RS3MBfztSZn; Mon, 18 Sep 2023 20:06:12 +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 20:10:24 +0800 From: Jinjie Ruan To: , , , , , , , , CC: Subject: [PATCH v3 0/2] mm/damon/core-test: Fix memory leaks in core-test Date: Mon, 18 Sep 2023 20:09:49 +0800 Message-ID: <20230918120951.2230468-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: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 12E3D100016 X-Rspam-User: X-Stat-Signature: o9erriqhz5hjdm7ggzznynkf8grfrh6z X-Rspamd-Server: rspam03 X-HE-Tag: 1695039031-802135 X-HE-Meta: U2FsdGVkX1/JrTeMtt+YdMahqoZ6M5K17/KlZNhLBgNTOMBLryQ4lLo/1SxKJZ1W917G0omdjYV5byTVXFoEpjCjCPx9kfAA8rixCO9a0+F+E38jgzCXf7O9sHVfduLUwsx7hKKmAgpft9C+EpxlkoWkvjjRX3xXd+aVBK7xCEYg9Pm7E5IP4/Lf4tFDRQ7fEt7niiuf5czNAl4YkRVgPg77j11fu9rJtIbAhX5c5LD8sas1PFk6NeW95Xg6V60i1g84fH0y9n5LovMD5avCbq6KArm6/Njyv2jrL3ndJOqx/FHc10RvLa7D0tr7ESINfA7uqTeERziaV/esWEOBE3liaXMKEOguwjQUO3foIS4lV0Rybx8ae4hIcIuWPKo+SIWU/d5Zl3dSuBfBS25miueD7K6GJsnqla9EyyqW6gjwfoYBm0V5qngesar4ClBF6izq2MEpYWrCy8G++ty/N+owcV2IhsQB3jhmYMSAXm+qvPlKa8iyGRPww052Zj8VUOSlCxWFtntOtwhgRdeZeRoyvLxUsplO9hRWAzCZVrIP7DspUgdLEO3vc6u1ZzgvsCoEBgJtGav+ZApQhIrIsLNRWar/Pn1BYd3GyOkdh0PoGEwzuYSHF8Ljawej1dwMaMUX1KfdL1wLsmp6xca4VWWzo94erWkE6vgPK2bkpI2EfzT5faU2gAGPjdJ9EDs3rm72TZiCja0zYhKWPXVyCMvKUkgIKKudE4zt/wO9ZMD429HYV0nIVvs8hUqo6JPAA/In17eXNNvCR4F4NDjhDQbUujOIzpnq799o7dfJRyjCWwd9T0Tv1wVv1iFsLhqQvNkiOkdehAeAO6qlN4eEHAEVNQmwV9ioO6fNjQLY7soHO0e2lzzW0NhPkEBntkZy2vbR0S6Bla6oHCWe3lBS2AUrTSZ0k4BvMDbM3uLeYc/NVmeiAOa08eOVddjnF1+C+ouQVCoUKsuXiziQzFA /kra6YzF z6oE7IYhyIpVLKZCbE5qWP0J8mvcpPVpF42aP3mVBWghvl+/VMpIe6rGLz+pYiKnLVHiTMH+7dAJxijjFBxEPls/AXk3Stf9ppK+uQiBqUfCblrkLoW+W1VZ9Yw== 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 issue. Changes in v3: - Add new Reviewed-by. - Update the first patch's commit message to make the description more accurate. 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(-)