diff options
| author | Shin'ichiro Kawasaki <[email protected]> | 2021-12-07 01:06:38 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-12-07 03:04:35 +0000 |
| commit | 7db0e0c8190a086ef92ce5bb960836cde49540aa (patch) | |
| tree | ff260adc93c44c64474920dbaaa007027c0af0ec /drivers/usb/cdns3/cdns3-plat.c | |
| parent | scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue (diff) | |
| download | kernel-7db0e0c8190a086ef92ce5bb960836cde49540aa.tar.gz kernel-7db0e0c8190a086ef92ce5bb960836cde49540aa.zip | |
scsi: scsi_debug: Fix buffer size of REPORT ZONES command
According to ZBC and SPC specifications, the unit of ALLOCATION LENGTH
field of REPORT ZONES command is byte. However, current scsi_debug
implementation handles it as number of zones to calculate buffer size to
report zones. When the ALLOCATION LENGTH has a large number, this results
in too large buffer size and causes memory allocation failure. Fix the
failure by handling ALLOCATION LENGTH as byte unit.
Link: https://lore.kernel.org/r/[email protected]
Fixes: f0d1cf9378bd ("scsi: scsi_debug: Add ZBC zone commands")
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-plat.c')
0 files changed, 0 insertions, 0 deletions
