From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,sj@kernel.org,dan.carpenter@linaro.org,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-damon-tests-sysfs-kunit-fix-use-after-free-on-error-path.patch removed from -mm tree
Date: Mon, 24 Nov 2025 15:11:15 -0800 [thread overview]
Message-ID: <20251124231116.4DA90C4CEF1@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/damon/tests/sysfs-kunit: fix use after free on error path
has been removed from the -mm tree. Its filename was
mm-damon-tests-sysfs-kunit-fix-use-after-free-on-error-path.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Dan Carpenter <dan.carpenter@linaro.org>
Subject: mm/damon/tests/sysfs-kunit: fix use after free on error path
Date: Fri, 21 Nov 2025 16:36:38 +0300
Re-order these frees to avoid dereferencing "sysfs_target" after it has
been freed.
Link: https://lkml.kernel.org/r/aSBq5uSPIqsqH8zO@stanley.mountain
Fixes: ee131696794c ("mm/damon/tests/sysfs-kunit: handle alloc failures on damon_sysfs_test_add_targets()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/damon/tests/sysfs-kunit.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/damon/tests/sysfs-kunit.h~mm-damon-tests-sysfs-kunit-fix-use-after-free-on-error-path
+++ a/mm/damon/tests/sysfs-kunit.h
@@ -76,8 +76,8 @@ static void damon_sysfs_test_add_targets
if (!ctx) {
kfree(sysfs_targets->targets_arr);
kfree(sysfs_targets);
- kfree(sysfs_target);
kfree(sysfs_target->regions);
+ kfree(sysfs_target);
kunit_skip(test, "ctx alloc fail");
}
_
Patches currently in -mm which might be from dan.carpenter@linaro.org are
reply other threads:[~2025-11-24 23:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251124231116.4DA90C4CEF1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=dan.carpenter@linaro.org \
--cc=mm-commits@vger.kernel.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.