From: Andrew Morton <akpm@linux-foundation.org>
To: Longlong Xia <xialonglong2025@163.com>
Cc: Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Longlong Xia <xialonglong@kylinos.cn>
Subject: Re: [PATCH 0/2] zram: fix stale scan bounds after reinitialization
Date: Tue, 4 Aug 2026 13:10:46 -0700 [thread overview]
Message-ID: <20260804131046.7c485858542d586bb7c51857@linux-foundation.org> (raw)
In-Reply-To: <20260804065919.3970386-1-xialonglong2025@163.com>
On Tue, 4 Aug 2026 14:59:17 +0800 Longlong Xia <xialonglong2025@163.com> wrote:
> Both writeback_store() and read_block_state() derive their table scan
> bounds from zram->disksize before acquiring dev_lock. If the device is
> reset and reinitialized with a smaller disksize between that read and lock
> acquisition, the bound can describe the old table while the scan operates
> on the new one. This can lead to out-of-bounds slot accesses.
>
> Move both bound calculations under dev_lock so each bound remains
> consistent with the table throughout its scan. Keep the fixes separate
> because the affected interfaces originate from different commits and can
> be backported independently.
Thanks. AI review found several things to be worried about, all are
pre-existing.
https://sashiko.dev/#/patchset/20260804065919.3970386-1-xialonglong2025@163.com
next prev parent reply other threads:[~2026-08-04 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 6:59 [PATCH 0/2] zram: fix stale scan bounds after reinitialization Longlong Xia
2026-08-04 6:59 ` [PATCH 1/2] zram: fix out-of-bounds access in writeback_store() Longlong Xia
2026-08-04 8:41 ` Sergey Senozhatsky
2026-08-04 6:59 ` [PATCH 2/2] zram: fix out-of-bounds access in read_block_state() Longlong Xia
2026-08-04 8:42 ` Sergey Senozhatsky
2026-08-04 20:10 ` Andrew Morton [this message]
2026-08-05 1:42 ` [PATCH 0/2] zram: fix stale scan bounds after reinitialization Sergey Senozhatsky
2026-08-05 11:26 ` Sergey Senozhatsky
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=20260804131046.7c485858542d586bb7c51857@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=xialonglong2025@163.com \
--cc=xialonglong@kylinos.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