From: Edward Adam Davis <eadavis@sina.com>
To: syzbot+c8564fc0a96e3ecbe4d4@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [dm?] WARNING: zero-size vmalloc in cache_ctr
Date: Mon, 2 Nov 2026 15:15:01 +0800 [thread overview]
Message-ID: <20261102071501.414627-1-eadavis@sina.com> (raw)
In-Reply-To: <6ae61f5d.61c4c7f9.11e392.001b.GAE@google.com>
From: Edward Aadm Davis <eadavis@sina.com>
#syz test
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1a5072425c4a..c405d30938f4 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2455,6 +2455,12 @@ static int cache_create(struct cache_args *ca, struct cache **result)
ca->metadata_dev = ca->origin_dev = ca->cache_dev = NULL;
origin_blocks = cache->origin_sectors = ti->len;
+ if (cache->origin_sectors >> __ffs(DATA_DEV_BLOCK_SIZE_MAX_SECTORS) > 0) {
+ r = -EINVAL;
+ *error = "Origin sectors is too large";
+ goto bad;
+ }
+
origin_blocks = block_div(origin_blocks, ca->block_size);
cache->origin_blocks = to_oblock(origin_blocks);
next prev parent reply other threads:[~2026-11-02 7:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 17:03 syzbot
2026-11-02 7:15 ` Edward Adam Davis [this message]
2026-11-02 7:57 ` syzbot
2026-11-02 8:00 ` Edward Adam Davis
2026-11-02 8:33 ` syzbot
2026-11-02 8:07 ` Edward Adam Davis
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=20261102071501.414627-1-eadavis@sina.com \
--to=eadavis@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+c8564fc0a96e3ecbe4d4@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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®