This is a note to let you know that I've just added the patch titled scsi: sd_zbc: Support disks with more than 2**32 logical blocks to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-sd_zbc-support-disks-with-more-than-2-32-logica.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 2253faad6ab29a6bc2453dce6ec48d61ccd0aa4d Author: Bart Van Assche <bvanassche@xxxxxxx> Date: Fri Sep 17 14:23:14 2021 -0700 scsi: sd_zbc: Support disks with more than 2**32 logical blocks [ Upstream commit 1d479e6c9cb2b40abfb455863a4e9335db882e33 ] This patch addresses the following Coverity report about the zno * sdkp->zone_blocks expression: CID 1475514 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) overflow_before_widen: Potentially overflowing expression zno * sdkp->zone_blocks with type unsigned int (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type sector_t (64 bits, unsigned). Link: https://lore.kernel.org/r/20210917212314.2362324-1-bvanassche@xxxxxxx Fixes: 5795eb443060 ("scsi: sd_zbc: emulate ZONE_APPEND commands") Cc: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> Cc: Damien Le Moal <Damien.LeMoal@xxxxxxx> Cc: Hannes Reinecke <hare@xxxxxxx> Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx> Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index ea8b3f6ee5cd..06ee1f045e97 100644 --- a/drivers/scsi/sd_zbc.c +++ b/drivers/scsi/sd_zbc.c @@ -280,7 +280,7 @@ static void sd_zbc_update_wp_offset_workfn(struct work_struct *work) { struct scsi_disk *sdkp; unsigned long flags; - unsigned int zno; + sector_t zno; int ret; sdkp = container_of(work, struct scsi_disk, zone_wp_offset_work);