diff options
author | Dima Zavin <dima@android.com> | 2011-07-07 17:55:44 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-07-07 17:55:44 -0700 |
commit | 814cdea670616252e4cdf297a07b02ce59698bf1 (patch) | |
tree | c4a5665995e813c252b07f1e863166059bfb5bcb /fs/proc/base.c | |
parent | 487ffb052891a552fecf865ad4b24bbe7945a413 (diff) | |
parent | fe0d42203cb5616eeff68b14576a0f7e2dd56625 (diff) | |
download | kernel_samsung_espresso10-814cdea670616252e4cdf297a07b02ce59698bf1.zip kernel_samsung_espresso10-814cdea670616252e4cdf297a07b02ce59698bf1.tar.gz kernel_samsung_espresso10-814cdea670616252e4cdf297a07b02ce59698bf1.tar.bz2 |
Merge commit 'v3.0-rc6' into android-3.0
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 1b626e1..cc9c0c3 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2748,6 +2748,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole) struct task_io_accounting acct = task->ioac; unsigned long flags; + if (!ptrace_may_access(task, PTRACE_MODE_READ)) + return -EACCES; + if (whole && lock_task_sighand(task, &flags)) { struct task_struct *t = task; @@ -2879,7 +2882,7 @@ static const struct pid_entry tgid_base_stuff[] = { REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations), #endif #ifdef CONFIG_TASK_IO_ACCOUNTING - INF("io", S_IRUGO, proc_tgid_io_accounting), + INF("io", S_IRUSR, proc_tgid_io_accounting), #endif #ifdef CONFIG_HARDWALL INF("hardwall", S_IRUGO, proc_pid_hardwall), @@ -3221,7 +3224,7 @@ static const struct pid_entry tid_base_stuff[] = { REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations), #endif #ifdef CONFIG_TASK_IO_ACCOUNTING - INF("io", S_IRUGO, proc_tid_io_accounting), + INF("io", S_IRUSR, proc_tid_io_accounting), #endif #ifdef CONFIG_HARDWALL INF("hardwall", S_IRUGO, proc_pid_hardwall), |