Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358909
b: refs/heads/master
c: bbf344e
h: refs/heads/master
i:
  358907: d00f8c6
v: v3
  • Loading branch information
Hannes Reinecke authored and Nicholas Bellinger committed Feb 13, 2013
1 parent 4af6285 commit a76cebf
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 1b7f390eb3bfc197c979c5478eadbc2a90f07667
refs/heads/master: bbf344e54ed9a76e344d08feedc70ab2c5a8a64c
12 changes: 12 additions & 0 deletions trunk/drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,19 @@ rd_execute_rw(struct se_cmd *cmd)
void *rd_addr;

sg_miter_next(&m);
if (!(u32)m.length) {
pr_debug("RD[%u]: invalid sgl %p len %zu\n",
dev->rd_dev_id, m.addr, m.length);
sg_miter_stop(&m);
return TCM_INCORRECT_AMOUNT_OF_DATA;
}
len = min((u32)m.length, src_len);
if (len > rd_size) {
pr_debug("RD[%u]: size underrun page %d offset %d "
"size %d\n", dev->rd_dev_id,
rd_page, rd_offset, rd_size);
len = rd_size;
}
m.consumed = len;

rd_addr = sg_virt(rd_sg) + rd_offset;
Expand Down

0 comments on commit a76cebf

Please sign in to comment.