summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDamien Le Moal2019-07-01 07:09:18 +0200
committerJens Axboe2019-07-12 04:04:40 +0200
commit26202928fafad8bda8b478edb7e62c885be623d7 (patch)
tree9935d814339a8951e0e709380dc9aad55751387a /drivers/block
parentsd_zbc: Fix report zones buffer allocation (diff)
downloadkernel-qcow2-linux-26202928fafad8bda8b478edb7e62c885be623d7.tar.gz
kernel-qcow2-linux-26202928fafad8bda8b478edb7e62c885be623d7.tar.xz
kernel-qcow2-linux-26202928fafad8bda8b478edb7e62c885be623d7.zip
block: Limit zone array allocation size
Limit the size of the struct blk_zone array used in blk_revalidate_disk_zones() to avoid memory allocation failures leading to disk revalidation failure. Also further reduce the likelyhood of such failures by using kvcalloc() (that is vmalloc()) instead of allocating contiguous pages with alloc_pages(). Fixes: 515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation") Fixes: e76239a3748c ("block: add a report_zones method") Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions