diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-09-18 00:23:14 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-09-22 06:52:55 +0300 |
commit | 1d479e6c9cb2b40abfb455863a4e9335db882e33 (patch) | |
tree | 259a407bfe3ed68557c83bbd554898164a2e3cd2 /drivers/scsi/qlogicpti.c | |
parent | 88b099006d83b0bf452379cad4ce494329084726 (diff) | |
download | linux-1d479e6c9cb2b40abfb455863a4e9335db882e33.tar.xz |
scsi: sd_zbc: Support disks with more than 2**32 logical blocks
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@acm.org
Fixes: 5795eb443060 ("scsi: sd_zbc: emulate ZONE_APPEND commands")
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qlogicpti.c')
0 files changed, 0 insertions, 0 deletions