Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: shao.mingyin@zte.com.cn, catalin.marinas@arm.com,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] mm/kmemleak: fix scan period truncation on 32-bit platforms
Date: Sun, 15 Nov 2026 16:47:37 +0000	[thread overview]
Message-ID: <sashiko-outbox-215659@kernel.org> (raw)
In-Reply-To: <20261115004702358r2RJLihSrqbK4dr026bcI@zte.com.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm/kmemleak: missing Fixes trailer and duplicate subject in
  commit message
--

commit 807561d4895dc6a557b90ff7973974cbbb93309d
Author: Shao Mingyin <shao.mingyin@zte.com.cn>

> mm/kmemleak: fix scan period truncation on 32-bit platforms
>
> mm/kmemleak: fix scan period truncation on 32-bit platforms
>
> kmemleak_write() converts the scan period from seconds to milliseconds
> before clamping it to UINT_MAX. On 32-bit kernels, unsigned secs and
> MSEC_PER_SEC (1000L) are multiplied in a 32-bit unsigned type. The result
> wraps before the clamp can detect overflow.
>
> For example, scan=4294968 produces 704 milliseconds instead of the
> UINT_MAX millisecond limit. Perform the multiplication and keep the
> intermediate result in unsigned long long, preserving the existing
> 64-bit behavior and the later msecs_to_jiffies() clamping.
>
> Commit 54dd200c5a25 ("mm/kmemleak: fix possible wrong memory scanning
> period") added this clamp, but it cannot work after a 32-bit multiply
> has already overflowed.
>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>

[Severity: Low]
Since this fixes the scan period clamping logic, should the commit message
include a Fixes: trailer:

  Fixes: 54dd200c5a25 ("mm/kmemleak: fix possible wrong memory scanning period")

Also, the commit subject line is duplicated as the first line of the commit
message body.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261115004702358r2RJLihSrqbK4dr026bcI@zte.com.cn?part=1


      parent reply	other threads:[~2026-11-15 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 16:47 [PATCH] mm/kmemleak: fix scan period truncation on 32-bit platforms shao.mingyin
2026-11-14 17:33 ` Lorenzo Stoakes (ARM)
2026-11-15 16:47 ` sashiko-bot [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=sashiko-outbox-215659@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-mm@kvack.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shao.mingyin@zte.com.cn \
    /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