Message ID | 20230918051044.3814018-3-ruanjinjie@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp2441660vqi; Sun, 17 Sep 2023 22:16:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQj6KpQeZ7S1KfoO44pbDbK+AC5Lu7d1piI76GgHFKk9j/5VDs8WU5aulpAVfr8ACawlVV X-Received: by 2002:a17:903:25d4:b0:1c4:4251:68b3 with SMTP id jc20-20020a17090325d400b001c4425168b3mr7469548plb.54.1695014190042; Sun, 17 Sep 2023 22:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695014190; cv=none; d=google.com; s=arc-20160816; b=UlHTq1MX91ADlQiT+snlLGvF8CLp4AO1PGo+iJ96owt2/2GunuyoFFAG5f13h1iZ+Z Z3i0hAfVxnI7nBd6BZg6gAo9ElBow1qCoBxiaTjKewD3M5gQGCEMwwr5eVOpgveWU4IU F93HWKjFyKFyi4cxbsqZ1CThu/7MT0UEeuB508zDGBSzbTC8UPqd9n1afH/sGmDWHFMp kP48RQy30s4RRS+ySe8qx6C1hULRSGiDPni8amnck0zGCsB93od4Gy+QvhVlwm2dDpir OdN54Bk1sTCc9QCXxQzKhDUid+pFzRRFOhdwbkRsddKwyQhMHPXNWDSiLv1dG9/nPN9F 1NYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9ZaTUvZE/pjQ4z9Ivg9EXH3zCdyFK6qIfvk9hks0kD0=; fh=aYKvMLxVtMOnlqtnIoYpQJlk5qPVDBrvQNBY4G56YZA=; b=OADxTnnMxm2dVpHY6x2rZtA3YbN4EdKhYyE729aHMbCFdu/Z9T+JZ7bFRsNQJTBYQE icztjRUvqNXaBJIAqban6/M75uARP1oudPI9s/4YzJC36giq6L7l11fBqGi07ZAq32FP Bk+YLzy0eVlSzpG9koiI6IEDZS6Xcms456nVMttoAxQRLa0V1XaaS5BdOefHUCBnF+0R 7C9pQfPpNkGpS35OpU7MfrNyQIGbDY10qGu5BJ4wmAyyt+AnkxBQY3a5IpdgR2koAut0 4buvWxiWXeMnXV1LSaldt0gTeUx2Uwpp0D+8XJOZTR1HMh3zo1NGQkGNVUrcNNmTPUuV sXhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x7-20020a170902a38700b001bc63c38e17si3823147pla.244.2023.09.17.22.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 22:16:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D6FF580775BF; Sun, 17 Sep 2023 22:12:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239574AbjIRFML (ORCPT <rfc822;kernel.ruili@gmail.com> + 28 others); Mon, 18 Sep 2023 01:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236439AbjIRFL7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 18 Sep 2023 01:11:59 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04BE711C; Sun, 17 Sep 2023 22:11:54 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4RptC05lLcz15NQX; Mon, 18 Sep 2023 13:09:48 +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 13:11:51 +0800 From: Jinjie Ruan <ruanjinjie@huawei.com> To: <sj@kernel.org>, <akpm@linux-foundation.org>, <brendan.higgins@linux.dev>, <feng.tang@intel.com>, <damon@lists.linux.dev>, <linux-mm@kvack.org>, <kunit-dev@googlegroups.com>, <linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <ruanjinjie@huawei.com> Subject: [PATCH RESEND 2/2] mm/damon/core-test: Fix memory leak in damon_new_ctx() Date: Mon, 18 Sep 2023 13:10:44 +0800 Message-ID: <20230918051044.3814018-3-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230918051044.3814018-1-ruanjinjie@huawei.com> References: <20230918051044.3814018-1-ruanjinjie@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 17 Sep 2023 22:12:48 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777351199298826904 X-GMAIL-MSGID: 1777351199298826904 |
Series |
mm/damon/core-test: Fix memory leaks in core-test
|
|
Commit Message
Jinjie Ruan
Sept. 18, 2023, 5:10 a.m. UTC
The damon_ctx which is allocated by kzalloc() in damon_new_ctx() in
damon_test_ops_registration() and damon_test_set_attrs() are not freed and
it causes below memory leak. So use damon_destroy_ctx() to free it.
unreferenced object 0xffff2b49c6968800 (size 512):
comm "kunit_try_catch", pid 350, jiffies 4294895294 (age 557.028s)
hex dump (first 32 bytes):
88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................
00 87 93 03 00 00 00 00 0a 00 00 00 00 00 00 00 ................
backtrace:
[<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368
[<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290
[<00000000b5f89cef>] kmalloc_trace+0x40/0x164
[<00000000eb19e83f>] damon_new_ctx+0x28/0xb4
[<00000000daf6227b>] damon_test_ops_registration+0x34/0x328
[<00000000559c4801>] kunit_try_run_case+0x50/0xac
[<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c
[<000000003c3e9211>] kthread+0x124/0x130
[<0000000028f85bdd>] ret_from_fork+0x10/0x20
unreferenced object 0xffff2b49c1a9cc00 (size 512):
comm "kunit_try_catch", pid 356, jiffies 4294895306 (age 557.000s)
hex dump (first 32 bytes):
88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 ................
backtrace:
[<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368
[<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290
[<00000000b5f89cef>] kmalloc_trace+0x40/0x164
[<00000000eb19e83f>] damon_new_ctx+0x28/0xb4
[<00000000058495c4>] damon_test_set_attrs+0x30/0x1a8
[<00000000559c4801>] kunit_try_run_case+0x50/0xac
[<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c
[<000000003c3e9211>] kthread+0x124/0x130
[<0000000028f85bdd>] ret_from_fork+0x10/0x20
Fixes: d1836a3b2a9a ("mm/damon/core-test: initialise context before test in damon_test_set_attrs()")
Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
mm/damon/core-test.h | 4 ++++
1 file changed, 4 insertions(+)
Comments
On Mon, Sep 18, 2023 at 01:10:44PM +0800, Jinjie Ruan wrote: > The damon_ctx which is allocated by kzalloc() in damon_new_ctx() in > damon_test_ops_registration() and damon_test_set_attrs() are not freed and > it causes below memory leak. So use damon_destroy_ctx() to free it. > > unreferenced object 0xffff2b49c6968800 (size 512): > comm "kunit_try_catch", pid 350, jiffies 4294895294 (age 557.028s) > hex dump (first 32 bytes): > 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ > 00 87 93 03 00 00 00 00 0a 00 00 00 00 00 00 00 ................ > backtrace: > [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 > [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 > [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 > [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 > [<00000000daf6227b>] damon_test_ops_registration+0x34/0x328 > [<00000000559c4801>] kunit_try_run_case+0x50/0xac > [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c > [<000000003c3e9211>] kthread+0x124/0x130 > [<0000000028f85bdd>] ret_from_fork+0x10/0x20 > unreferenced object 0xffff2b49c1a9cc00 (size 512): > comm "kunit_try_catch", pid 356, jiffies 4294895306 (age 557.000s) > hex dump (first 32 bytes): > 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 ................ > backtrace: > [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 > [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 > [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 > [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 > [<00000000058495c4>] damon_test_set_attrs+0x30/0x1a8 > [<00000000559c4801>] kunit_try_run_case+0x50/0xac > [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c > [<000000003c3e9211>] kthread+0x124/0x130 > [<0000000028f85bdd>] ret_from_fork+0x10/0x20 > > Fixes: d1836a3b2a9a ("mm/damon/core-test: initialise context before test in damon_test_set_attrs()") Thanks for the fix! Reviewed-by: Feng Tang <feng.tang@intel.com> > Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration") > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> > --- > mm/damon/core-test.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h > index 255f8c925c00..ce86ed30fb47 100644 > --- a/mm/damon/core-test.h > +++ b/mm/damon/core-test.h > @@ -266,6 +266,8 @@ static void damon_test_ops_registration(struct kunit *test) > > /* Check double-registration failure again */ > KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); > + > + damon_destroy_ctx(c); > } > > static void damon_test_set_regions(struct kunit *test) > @@ -342,6 +344,8 @@ static void damon_test_set_attrs(struct kunit *test) > invalid_attrs = valid_attrs; > invalid_attrs.aggr_interval = 4999; > KUNIT_EXPECT_EQ(test, damon_set_attrs(c, &invalid_attrs), -EINVAL); > + > + damon_destroy_ctx(c); > } > > static void damos_test_new_filter(struct kunit *test) > -- > 2.34.1 >
Hi Jinjie, On Mon, 18 Sep 2023 13:10:44 +0800 Jinjie Ruan <ruanjinjie@huawei.com> wrote: > The damon_ctx which is allocated by kzalloc() in damon_new_ctx() in > damon_test_ops_registration() and damon_test_set_attrs() are not freed and > it causes below memory leak. So use damon_destroy_ctx() to free it. > > unreferenced object 0xffff2b49c6968800 (size 512): > comm "kunit_try_catch", pid 350, jiffies 4294895294 (age 557.028s) > hex dump (first 32 bytes): > 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ > 00 87 93 03 00 00 00 00 0a 00 00 00 00 00 00 00 ................ > backtrace: > [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 > [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 > [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 > [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 > [<00000000daf6227b>] damon_test_ops_registration+0x34/0x328 > [<00000000559c4801>] kunit_try_run_case+0x50/0xac > [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c > [<000000003c3e9211>] kthread+0x124/0x130 > [<0000000028f85bdd>] ret_from_fork+0x10/0x20 > unreferenced object 0xffff2b49c1a9cc00 (size 512): > comm "kunit_try_catch", pid 356, jiffies 4294895306 (age 557.000s) > hex dump (first 32 bytes): > 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 ................ > backtrace: > [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 > [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 > [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 > [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 > [<00000000058495c4>] damon_test_set_attrs+0x30/0x1a8 > [<00000000559c4801>] kunit_try_run_case+0x50/0xac > [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c > [<000000003c3e9211>] kthread+0x124/0x130 > [<0000000028f85bdd>] ret_from_fork+0x10/0x20 Same to the comment on the first patch of this patchset, simply letting others know the name of the tool you used for making this cool output could be helpful. Could you please add it? Also, I prefer adding four spaces indent to quoted command outputs on commit messages. Could you please add that indentation? Also, I cannot 'git am' this patch on top of mm-unstable[1]. Could you please double check and rebase on latest mm-unstable if I din't miss something? [1] https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/log/?h=mm-unstable > > Fixes: d1836a3b2a9a ("mm/damon/core-test: initialise context before test in damon_test_set_attrs()") > Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration") > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> > --- > mm/damon/core-test.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h > index 255f8c925c00..ce86ed30fb47 100644 > --- a/mm/damon/core-test.h > +++ b/mm/damon/core-test.h > @@ -266,6 +266,8 @@ static void damon_test_ops_registration(struct kunit *test) > > /* Check double-registration failure again */ > KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); > + > + damon_destroy_ctx(c); > } > > static void damon_test_set_regions(struct kunit *test) > @@ -342,6 +344,8 @@ static void damon_test_set_attrs(struct kunit *test) > invalid_attrs = valid_attrs; > invalid_attrs.aggr_interval = 4999; > KUNIT_EXPECT_EQ(test, damon_set_attrs(c, &invalid_attrs), -EINVAL); > + > + damon_destroy_ctx(c); > } > > static void damos_test_new_filter(struct kunit *test) Other than above comments, changes look good to me. > -- > 2.34.1 > Thanks, SJ
On 2023/9/18 13:43, SeongJae Park wrote: > Hi Jinjie, > > On Mon, 18 Sep 2023 13:10:44 +0800 Jinjie Ruan <ruanjinjie@huawei.com> wrote: > >> The damon_ctx which is allocated by kzalloc() in damon_new_ctx() in >> damon_test_ops_registration() and damon_test_set_attrs() are not freed and >> it causes below memory leak. So use damon_destroy_ctx() to free it. >> >> unreferenced object 0xffff2b49c6968800 (size 512): >> comm "kunit_try_catch", pid 350, jiffies 4294895294 (age 557.028s) >> hex dump (first 32 bytes): >> 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ >> 00 87 93 03 00 00 00 00 0a 00 00 00 00 00 00 00 ................ >> backtrace: >> [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 >> [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 >> [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 >> [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 >> [<00000000daf6227b>] damon_test_ops_registration+0x34/0x328 >> [<00000000559c4801>] kunit_try_run_case+0x50/0xac >> [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c >> [<000000003c3e9211>] kthread+0x124/0x130 >> [<0000000028f85bdd>] ret_from_fork+0x10/0x20 >> unreferenced object 0xffff2b49c1a9cc00 (size 512): >> comm "kunit_try_catch", pid 356, jiffies 4294895306 (age 557.000s) >> hex dump (first 32 bytes): >> 88 13 00 00 00 00 00 00 a0 86 01 00 00 00 00 00 ................ >> 00 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 ................ >> backtrace: >> [<0000000088e71769>] slab_post_alloc_hook+0xb8/0x368 >> [<0000000073acab3b>] __kmem_cache_alloc_node+0x174/0x290 >> [<00000000b5f89cef>] kmalloc_trace+0x40/0x164 >> [<00000000eb19e83f>] damon_new_ctx+0x28/0xb4 >> [<00000000058495c4>] damon_test_set_attrs+0x30/0x1a8 >> [<00000000559c4801>] kunit_try_run_case+0x50/0xac >> [<000000003932ed49>] kunit_generic_run_threadfn_adapter+0x20/0x2c >> [<000000003c3e9211>] kthread+0x124/0x130 >> [<0000000028f85bdd>] ret_from_fork+0x10/0x20 > > Same to the comment on the first patch of this patchset, simply letting others > know the name of the tool you used for making this cool output could be > helpful. Could you please add it? > > Also, I prefer adding four spaces indent to quoted command outputs on commit > messages. Could you please add that indentation? > > Also, I cannot 'git am' this patch on top of mm-unstable[1]. Could you please > double check and rebase on latest mm-unstable if I din't miss something? > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/log/?h=mm-unstable Sure. Thank you very much! > >> >> Fixes: d1836a3b2a9a ("mm/damon/core-test: initialise context before test in damon_test_set_attrs()") >> Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration") >> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> >> --- >> mm/damon/core-test.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h >> index 255f8c925c00..ce86ed30fb47 100644 >> --- a/mm/damon/core-test.h >> +++ b/mm/damon/core-test.h >> @@ -266,6 +266,8 @@ static void damon_test_ops_registration(struct kunit *test) >> >> /* Check double-registration failure again */ >> KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); >> + >> + damon_destroy_ctx(c); >> } >> >> static void damon_test_set_regions(struct kunit *test) >> @@ -342,6 +344,8 @@ static void damon_test_set_attrs(struct kunit *test) >> invalid_attrs = valid_attrs; >> invalid_attrs.aggr_interval = 4999; >> KUNIT_EXPECT_EQ(test, damon_set_attrs(c, &invalid_attrs), -EINVAL); >> + >> + damon_destroy_ctx(c); >> } >> >> static void damos_test_new_filter(struct kunit *test) > > Other than above comments, changes look good to me. > >> -- >> 2.34.1 >> > > Thanks, > SJ
diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h index 255f8c925c00..ce86ed30fb47 100644 --- a/mm/damon/core-test.h +++ b/mm/damon/core-test.h @@ -266,6 +266,8 @@ static void damon_test_ops_registration(struct kunit *test) /* Check double-registration failure again */ KUNIT_EXPECT_EQ(test, damon_register_ops(&ops), -EINVAL); + + damon_destroy_ctx(c); } static void damon_test_set_regions(struct kunit *test) @@ -342,6 +344,8 @@ static void damon_test_set_attrs(struct kunit *test) invalid_attrs = valid_attrs; invalid_attrs.aggr_interval = 4999; KUNIT_EXPECT_EQ(test, damon_set_attrs(c, &invalid_attrs), -EINVAL); + + damon_destroy_ctx(c); } static void damos_test_new_filter(struct kunit *test)