diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2017-07-03 08:44:58 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-07-05 22:08:47 +0200 |
commit | 3908c9839b1077e677ef9e92d2bce7f224519c59 (patch) | |
tree | 4b385dcc6742ce62ba9aeb1bed662cda3993df91 /drivers/scsi/bnx2i/bnx2i_iscsi.c | |
parent | dm raid: stop using BUG() in __rdev_sectors() (diff) | |
download | linux-3908c9839b1077e677ef9e92d2bce7f224519c59.tar.xz linux-3908c9839b1077e677ef9e92d2bce7f224519c59.zip |
dm zoned: fix overflow when converting zone ID to sectors
A zone ID is a 32 bits unsigned int which can overflow when doing the
bit shifts in dmz_start_sect(). With a 256 MB zone size drive, the
overflow happens for a zone ID >= 8192.
Fix this by casting the zone ID to a sector_t before doing the bit
shift. While at it, similarly fix dmz_start_block().
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/scsi/bnx2i/bnx2i_iscsi.c')
0 files changed, 0 insertions, 0 deletions