From: David Howells <dhowells@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: fix rcu annotations noise in cred.h
Date: Mon, 08 Aug 2011 09:18:29 +0100 [thread overview]
Message-ID: <13248.1312791509@redhat.com> (raw)
In-Reply-To: <20110807175511.GZ2203@ZenIV.linux.org.uk>
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
next prev parent reply other threads:[~2011-08-08 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-07 17:55 fix rcu annotations noise in cred.h Al Viro
2011-08-08 8:18 ` David Howells [this message]
2011-08-08 8:28 ` Al Viro
2011-08-08 12:34 ` Paul E. McKenney
2011-08-08 12:54 ` David Howells
2011-08-08 14:35 ` Paul E. McKenney
2011-08-08 12:28 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13248.1312791509@redhat.com \
--to=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox