Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176233
b: refs/heads/master
c: 4ea2f43
h: refs/heads/master
i:
  176231: 38cb07b
v: v3
  • Loading branch information
Wu Fengguang authored and Linus Torvalds committed Dec 15, 2009
1 parent c6420ab commit ad68871
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 659ace584e7a9fdda872eab4d6d7be1e0afb6cae
refs/heads/master: 4ea2f43f28e30050bc99fe3134b6b679f3bf5b22
14 changes: 6 additions & 8 deletions trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,14 +581,12 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,

if (len > PAGE_SIZE)
len = PAGE_SIZE;
if (len) {
written = copy_from_user(kbuf, buf, len);
if (written) {
if (wrote + virtr)
break;
free_page((unsigned long)kbuf);
return -EFAULT;
}
written = copy_from_user(kbuf, buf, len);
if (written) {
if (wrote + virtr)
break;
free_page((unsigned long)kbuf);
return -EFAULT;
}
len = vwrite(kbuf, (char *)p, len);
count -= len;
Expand Down

0 comments on commit ad68871

Please sign in to comment.