Messages in this thread | | | From | David Howells <> | Subject | Re: fix rcu annotations noise in cred.h | Date | Mon, 08 Aug 2011 09:18:29 +0100 |
| |
Al Viro <viro@ZenIV.linux.org.uk> wrote:
> #define current_cred() \ > - (current->cred) > + (*(__force struct cred **)¤t->cred)
No. You've cast away the const. Please don't do that.
Paul: isn't there some better way of doing this using an RCU wrapper macro?
#define current_cred() \ rcu_dereference_protected(current->cred, 1)
Perhaps?
David
| |