diff options
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 7b8b51bc29b4..4aca1b0378c2 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -1623,7 +1623,7 @@ resp_rsup_opcodes(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) | |||
1623 | req_opcode = cmd[3]; | 1623 | req_opcode = cmd[3]; |
1624 | req_sa = get_unaligned_be16(cmd + 4); | 1624 | req_sa = get_unaligned_be16(cmd + 4); |
1625 | alloc_len = get_unaligned_be32(cmd + 6); | 1625 | alloc_len = get_unaligned_be32(cmd + 6); |
1626 | if (alloc_len < 4 && alloc_len > 0xffff) { | 1626 | if (alloc_len < 4 || alloc_len > 0xffff) { |
1627 | mk_sense_invalid_fld(scp, SDEB_IN_CDB, 6, -1); | 1627 | mk_sense_invalid_fld(scp, SDEB_IN_CDB, 6, -1); |
1628 | return check_condition_result; | 1628 | return check_condition_result; |
1629 | } | 1629 | } |
@@ -1631,7 +1631,7 @@ resp_rsup_opcodes(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) | |||
1631 | a_len = 8192; | 1631 | a_len = 8192; |
1632 | else | 1632 | else |
1633 | a_len = alloc_len; | 1633 | a_len = alloc_len; |
1634 | arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_KERNEL); | 1634 | arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_ATOMIC); |
1635 | if (NULL == arr) { | 1635 | if (NULL == arr) { |
1636 | mk_sense_buffer(scp, ILLEGAL_REQUEST, INSUFF_RES_ASC, | 1636 | mk_sense_buffer(scp, ILLEGAL_REQUEST, INSUFF_RES_ASC, |
1637 | INSUFF_RES_ASCQ); | 1637 | INSUFF_RES_ASCQ); |