]> git.baikalelectronics.ru Git - kernel.git/commit
fix rcu annotations noise in cred.h
authorAl Viro <viro@ZenIV.linux.org.uk>
Sun, 7 Aug 2011 17:55:11 +0000 (18:55 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 7 Aug 2011 20:42:35 +0000 (13:42 -0700)
commit152966333838b69ef3a27324ac5af93cd1150d7d
tree6df351cb1febbcd011d24fcf99d1b08167c68d5e
parent0ad1246826834cd23acd70f43c3f01e395e20c14
fix rcu annotations noise in cred.h

task->cred is declared as __rcu, and access to other tasks' ->cred is,
indeed, protected.  Access to current->cred does not need rcu_dereference()
at all, since only the task itself can change its ->cred.  sparse, of
course, has no way of knowing that...

Add force-cast in current_cred(), make current_fsuid() et.al. use it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cred.h