Searched hist:c97840c8 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/target/ |
H A D | target_core_user.c | c97840c8 Mon Jul 23 14:07:49 CDT 2018 Mike Christie <mchristi@redhat.com> scsi: tcmu: do not set max_blocks if data_bitmap has been setup
This patch prevents a bug where data_bitmap is allocated in tcmu_configure_device, userspace changes the max_blocks setting, the device is mapped to a LUN, then we try to access the data_bitmap based on the new max_blocks limit which may now be out of range.
To prevent this, we just check if data_bitmap has been setup. If it has then we fail the max_blocks update operation.
Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> c97840c8 Mon Jul 23 14:07:49 CDT 2018 Mike Christie <mchristi@redhat.com> scsi: tcmu: do not set max_blocks if data_bitmap has been setup This patch prevents a bug where data_bitmap is allocated in tcmu_configure_device, userspace changes the max_blocks setting, the device is mapped to a LUN, then we try to access the data_bitmap based on the new max_blocks limit which may now be out of range. To prevent this, we just check if data_bitmap has been setup. If it has then we fail the max_blocks update operation. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|