mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
vfs: Apply lockdep-based checking to rcu_dereference() uses
Add lockdep-ified RCU primitives to alloc_fd(), files_fdtable() and fcheck_files(). Cc: Alexander Viro <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Alexander Viro <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
497f0ab39c
commit
7dc5215798
4 changed files with 14 additions and 4 deletions
|
|
@ -270,7 +270,9 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p)
|
|||
blocked = p->blocked;
|
||||
collect_sigign_sigcatch(p, &ignored, &caught);
|
||||
num_threads = atomic_read(&p->signal->count);
|
||||
rcu_read_lock(); /* FIXME: is this correct? */
|
||||
qsize = atomic_read(&__task_cred(p)->user->sigpending);
|
||||
rcu_read_unlock();
|
||||
qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur;
|
||||
unlock_task_sighand(p, &flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1095,8 +1095,12 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
|
|||
if (!capable(CAP_AUDIT_CONTROL))
|
||||
return -EPERM;
|
||||
|
||||
if (current != pid_task(proc_pid(inode), PIDTYPE_PID))
|
||||
rcu_read_lock();
|
||||
if (current != pid_task(proc_pid(inode), PIDTYPE_PID)) {
|
||||
rcu_read_unlock();
|
||||
return -EPERM;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
if (count >= PAGE_SIZE)
|
||||
count = PAGE_SIZE - 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue