All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [PATCH mm-hotfixes-unstable v2] mm/damon/sysfs: skip registration if DAMON core init fails
Date: Mon, 30 Nov 2026 15:12:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-241482@kernel.org> (raw)
In-Reply-To: <20261130150729.88226-1-sj@kernel.org>

> From: Aveline Noir <jm5905938@gmail.com>
> 
> DAMON sysfs registers its interface even if DAMON core initialization
> fails.  If damon_init() fails to allocate damon_region_cache, starting a
> kdamond with an initial region can pass a NULL cache to
> kmem_cache_alloc() via damon_new_region().  As a result, NULL
> dereference can happen.  The initialization failure is unlikely, but the
> consequence is quite bad.
> 
> Check damon_initialized() before creating the DAMON sysfs directory and
> return -ENOMEM if the core is unavailable.
> 
> Fixes: a18709442869 ("mm/damon: improve damon_new_region strategy")
> Cc: <stable@vger.kernel.org> # 6.1.x
> Cc: Lian Wang <lianux.mm@gmail.com>
> Cc: Dawei Li <set_pte_at@outlook.com>
> Signed-off-by: Aveline Noir <jm5905938@gmail.com>
> Reviewed-by: SJ Park <sj@kernel.org>
> Tested-by: Enze Li <lienze@kylinos.cn>
> Reviewed-by: Enze Li <lienze@kylinos.cn>
> Signed-off-by: SJ Park <sj@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130150729.88226-1-sj@kernel.org?part=1

  reply	other threads:[~2026-11-30 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 15:07 [PATCH mm-hotfixes-unstable v2] mm/damon/sysfs: skip registration if DAMON core init fails SJ Park
2026-11-30 15:12 ` sashiko-bot [this message]
2026-12-01  0:26 ` + mm-damon-sysfs-skip-registration-if-damon-core-init-fails.patch added to mm-hotfixes-unstable branch Andrew Morton

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=sashiko-outbox-241482@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --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.