Linux block layer
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-block@vger.kernel.org, ZHOU Jiaxiang <me@fxti.xyz>,
	Damien Le Moal <dlemoal@kernel.org>
Subject: [bug report] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
Date: Mon, 21 Sep 2026 22:18:47 +0300	[thread overview]
Message-ID: <arGDF5byCiew-pqQ@stanley.mountain> (raw)

Hello Mark Brown,

Commit a9ce2250a714 ("Merge branch 'for-next' of
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git")
from Sep 18, 2026 (linux-next), leads to the following Smatch static
checker warning:

	block/blk-zoned.c:2200 disk_init_revalidate_args()
	warn: impossible condition '(args->nr_zones > (~0)) => (0-u32max > u32max)'

block/blk-zoned.c
    2195 static int disk_init_revalidate_args(struct gendisk *disk,
    2196                                      struct blk_revalidate_zone_args *args)
    2197 {
    2198         args->disk = disk;
    2199         args->nr_zones = disk_get_nr_zones(disk, args->capacity);
--> 2200         if (args->nr_zones > UINT_MAX)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^

The linux-next merge for linux-block went a bit sideways and
commit 7c431d61b69a ("scsi: block: Fix zones_cond out-of-bounds write on
zone report") needs to be re-done.

    2201                 return -EINVAL;
    2202 
    2203         /* Cached zone conditions: 1 byte per zone */
    2204         args->zones_state = kzalloc(args->nr_zones, GFP_NOIO);
    2205         if (!args->zones_state)
    2206                 return -ENOMEM;
    2207 
    2208         return 0;
    2209 }

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

             reply	other threads:[~2026-09-21 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 19:18 Dan Carpenter [this message]
2026-09-22  3:16 ` [bug report] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git Damien Le Moal

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=arGDF5byCiew-pqQ@stanley.mountain \
    --to=error27@gmail.com \
    --cc=broonie@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=me@fxti.xyz \
    /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