From: Damien Le Moal <dlemoal@kernel.org>
To: shao.mingyin@zte.com.cn, hch@lst.de, linux-block@vger.kernel.org
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zloop: reject mismatched conventional zone files on restore
Date: Tue, 3 Nov 2026 14:09:45 +0900 [thread overview]
Message-ID: <c65e0bd5-2168-4733-81b8-1cefa806c03c@kernel.org> (raw)
In-Reply-To: <20261031221610676B5VoVcwMgkoDNVZH2bVDO@zte.com.cn>
On 10/31/26 23:16, shao.mingyin@zte.com.cn wrote:
> From: Shao Mingyin <shao.mingyin@zte.com.cn>
>
> When restoring a zloop device, zloop_init_zone() checks that the size of
> each conventional zone file matches the configured zone size. The check
> prints an error and then jumps to out_fput, which releases the zone file
> and returns the value left in "ret" by the preceding vfs_getattr() call,
> that is, zero. zloop_ctl_add() therefore treats the zone as initialized
> and continues with a zone->file pointer that was already released; any
> I/O to that zone then dereferences it.
>
> Return -EINVAL, like the sequential zone path does for the same kind of
> inconsistency.
>
> While at it, print the zone size that is actually compared instead of the
> zone capacity, which may be smaller and only made the message confusing.
>
> Fixes: eb0570c7df23 ("block: new zoned loop block device driver")
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-11-03 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 14:16 shao.mingyin
2026-11-03 5:09 ` Damien Le Moal [this message]
2026-11-03 5:30 ` Christoph Hellwig
2026-11-03 14:31 ` Jens Axboe
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=c65e0bd5-2168-4733-81b8-1cefa806c03c@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®