Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292842
b: refs/heads/master
c: 99f730d
h: refs/heads/master
v: v3
  • Loading branch information
Jörn Engel authored and Nicholas Bellinger committed Feb 25, 2012
1 parent 10107ac commit 20cfd82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47f1b8803e1e358ebbf4f82bfdb98971c912a2c3
refs/heads/master: 99f730d88fd0a25c3e2dfc357bde4cf6b8cb5b40
5 changes: 2 additions & 3 deletions trunk/drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ int target_report_luns(struct se_task *se_task)
struct se_lun *se_lun;
struct se_session *se_sess = se_cmd->se_sess;
unsigned char *buf;
u32 cdb_offset = 0, lun_count = 0, offset = 8, i;
u32 lun_count = 0, offset = 8, i;

buf = transport_kmap_data_sg(se_cmd);
if (!buf)
Expand Down Expand Up @@ -679,12 +679,11 @@ int target_report_luns(struct se_task *se_task)
* See SPC2-R20 7.19.
*/
lun_count++;
if ((cdb_offset + 8) >= se_cmd->data_length)
if ((offset + 8) > se_cmd->data_length)
continue;

int_to_scsilun(deve->mapped_lun, (struct scsi_lun *)&buf[offset]);
offset += 8;
cdb_offset += 8;
}
spin_unlock_irq(&se_sess->se_node_acl->device_list_lock);

Expand Down

0 comments on commit 20cfd82

Please sign in to comment.