diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-01-26 11:02:59 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-01-26 11:02:59 +0100 |
commit | 64c96a57b73397415eafa4ac2020ea7d99d7168c (patch) | |
tree | e71719d174d22aab6362858d383c292149ec8ae9 /drivers/scsi/scsi_debug.c | |
parent | e2e64a932556cdfae455497dbe94a8db151fc9fa (diff) | |
parent | 26bc420b59a38e4e6685a73345a0def461136dce (diff) |
Merge branch 'linus' into irq/core
Reason: Pull in upstream fixes on which new patches depend on.
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) req_opcode = cmd[3]; req_sa = get_unaligned_be16(cmd + 4); alloc_len = get_unaligned_be32(cmd + 6); - if (alloc_len < 4 && alloc_len > 0xffff) { + if (alloc_len < 4 || alloc_len > 0xffff) { mk_sense_invalid_fld(scp, SDEB_IN_CDB, 6, -1); return check_condition_result; } @@ -1631,7 +1631,7 @@ resp_rsup_opcodes(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) a_len = 8192; else a_len = alloc_len; - arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_KERNEL); + arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_ATOMIC); if (NULL == arr) { mk_sense_buffer(scp, ILLEGAL_REQUEST, INSUFF_RES_ASC, INSUFF_RES_ASCQ); |