mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: Sasha Levin <sashal@kernel.org>
Cc: SJ Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [RFC PATCH 7.3.y] mm/damon/core: error damos_commit_quota_goal() for zero target_value
Date: Mon, 26 Oct 2026 06:30:30 -0700	[thread overview]
Message-ID: <20261026133031.26195-1-sj@kernel.org> (raw)
In-Reply-To: <2026-10-25-1-daily-reply-0011-damon-zero-target-value-decline@kernel.org>

Hi Sasha,

On Sun, 25 Oct 2026 19:29:57 -0400 Sasha Levin <sashal@kernel.org> wrote:

> > Notes for stable kernel porting.  The upstream commit doesn't have
> > Fixes: and therefore not ported to stable kernels.  It turned out it
> > fixes commit 8b549a4fd3c5 ("mm/damon/sysfs-schemes: commit damos quota
> > goals user input to DAMOS") which was merged into v6.8.  The user impact
> > is a race condition that can result in divide-by-zero.  Hence backport.
> 
> The older trees don't need this one. The callers in 7.2, 6.18 and 6.12
> already reject a zero target_value (7.2 also has 06befa61c427
> ("mm/damon/lru_sort: error out for >10000 active_mem_bp") and a16fd3ad9d89
> ("samples/damon/mtier: error out for zero quota goal target values")),

That's true.  DAMON_LRU_SORT and DAMON_SAMPLE_MTIER are patched to be safe from
this issue.  But DAMON sysfs interface can pass zero target_value under a race
condition.

> the
> commit has no Fixes: or Cc: stable,

I didn't know the race condition when I wrote the patch, so didn't add Fixes:
or Cc: stable.

> and it is patch 1/3 of a series whose
> patches 2 and 3 remove those caller-side checks.

I'm not sure if this really matters.

So, I think we still need to add this patch to older kernels.  Please let me
know if I'm missing something.


Thanks,
SJ

[...]

      reply	other threads:[~2026-10-26 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 17:15 SJ Park
2026-10-25 23:29 ` Sasha Levin
2026-10-26 13:30   ` SJ Park [this message]

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=20261026133031.26195-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®