Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208415
b: refs/heads/master
c: 3094141
h: refs/heads/master
i:
  208413: 8835d6d
  208411: e9dbdc0
  208407: ec836bc
  208399: 85a65ed
  208383: 1622465
v: v3
  • Loading branch information
Julia Lawall authored and Linus Torvalds committed Aug 11, 2010
1 parent 4f1ce30 commit dffa01d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: a737b88df8d0b4476ae53daaa6db137df0541203
refs/heads/master: 3094141c6532a4f748425c21c091001f218da8ae
11 changes: 3 additions & 8 deletions trunk/drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1686,14 +1686,9 @@ static int sg_start_req(Sg_request *srp, unsigned char *cmd)
int len, size = sizeof(struct sg_iovec) * iov_count;
struct iovec *iov;

iov = kmalloc(size, GFP_ATOMIC);
if (!iov)
return -ENOMEM;

if (copy_from_user(iov, hp->dxferp, size)) {
kfree(iov);
return -EFAULT;
}
iov = memdup_user(hp->dxferp, size);
if (IS_ERR(iov))
return PTR_ERR(iov);

len = iov_length(iov, iov_count);
if (hp->dxfer_len < len) {
Expand Down

0 comments on commit dffa01d

Please sign in to comment.