lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: fix rcu annotations noise in cred.h
Date

Al Viro <viro@ZenIV.linux.org.uk> wrote:

> #define current_cred() \
> - (current->cred)
> + (*(__force struct cred **)&current->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


\
 
 \ /
  Last update: 2011-08-08 10:21    [W:1.412 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site