Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164761
b: refs/heads/master
c: cba8aaf
h: refs/heads/master
i:
  164759: 09b7329
v: v3
  • Loading branch information
Vincent Li authored and Linus Torvalds committed Sep 23, 2009
1 parent 1312390 commit f80afff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: fb92a4b068be96799da3748c11cbd69760e44d7b
refs/heads/master: cba8aafe1e07dfc8bae5ba78be8e02883bd34d31
11 changes: 5 additions & 6 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,17 +1187,16 @@ static ssize_t proc_fault_inject_write(struct file * file,
count = sizeof(buffer) - 1;
if (copy_from_user(buffer, buf, count))
return -EFAULT;
make_it_fail = simple_strtol(buffer, &end, 0);
if (*end == '\n')
end++;
make_it_fail = simple_strtol(strstrip(buffer), &end, 0);
if (*end)
return -EINVAL;
task = get_proc_task(file->f_dentry->d_inode);
if (!task)
return -ESRCH;
task->make_it_fail = make_it_fail;
put_task_struct(task);
if (end - buffer == 0)
return -EIO;
return end - buffer;

return count;
}

static const struct file_operations proc_fault_inject_operations = {
Expand Down

0 comments on commit f80afff

Please sign in to comment.