Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16954
b: refs/heads/master
c: cd140a5
h: refs/heads/master
v: v3
  • Loading branch information
Guillaume Chazarain authored and Linus Torvalds committed Jan 9, 2006
1 parent d669cd3 commit e6a8b44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 025510cd20f4c35c3958bea133d96c9bd7c6ef9e
refs/heads/master: cd140a5c1f456f50897af4a2e9a23d228a5fe719
5 changes: 4 additions & 1 deletion trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
char *tmp;
int ret;
ssize_t ret;

tmp = kmalloc(count + 1, GFP_KERNEL);
if (tmp == NULL)
Expand All @@ -826,6 +826,9 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf,
if (!copy_from_user(tmp, buf, count)) {
tmp[count] = 0;
ret = printk("%s", tmp);
if (ret > count)
/* printk can add a prefix */
ret = count;
}
kfree(tmp);
return ret;
Expand Down

0 comments on commit e6a8b44

Please sign in to comment.