Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322917
b: refs/heads/master
c: 9b16b9e
h: refs/heads/master
i:
  322915: d94e34c
v: v3
  • Loading branch information
Paolo Bonzini authored and Nicholas Bellinger committed Sep 7, 2012
1 parent 23716df commit be9a19e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d7f1299ca5540b9a63ab6e8bf0e89ea963eb6af
refs/heads/master: 9b16b9edb4fd0dc86ee0fbe1f7ede580e26e85f4
7 changes: 7 additions & 0 deletions trunk/drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,13 @@ int target_report_luns(struct se_cmd *se_cmd)
unsigned char *buf;
u32 lun_count = 0, offset = 8, i;

if (se_cmd->data_length < 16) {
pr_warn("REPORT LUNS allocation length %u too small\n",
se_cmd->data_length);
se_cmd->scsi_sense_reason = TCM_INVALID_CDB_FIELD;
return -EINVAL;
}

buf = transport_kmap_data_sg(se_cmd);
if (!buf)
return -ENOMEM;
Expand Down

0 comments on commit be9a19e

Please sign in to comment.