From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Jarek Poplawski <jarkao2@o2.pl>
Cc: Adrian Bunk <bunk@kernel.org>,
Gabriel C <nix.or.die@googlemail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1)
Date: Mon, 27 Aug 2007 09:23:18 -0700 [thread overview]
Message-ID: <20070827162318.GB8290@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070827063635.GB1703@ff.dom.local>
On Mon, Aug 27, 2007 at 08:36:35AM +0200, Jarek Poplawski wrote:
> On 22-08-2007 19:03, Paul E. McKenney wrote:
> > On Wed, Aug 22, 2007 at 05:41:11PM +0200, Adrian Bunk wrote:
> >> On Wed, Aug 22, 2007 at 05:30:13PM +0200, Gabriel C wrote:
> >>> Got it with a randconfig ( http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/r/randconfig-8 )
> >>>
> >>> ...
> >>>
> >>> net/ipv4/fib_trie.c: In function 'trie_rebalance':
> >>> net/ipv4/fib_trie.c:969: error: lvalue required as unary '&' operand
> >>> net/ipv4/fib_trie.c:971: error: lvalue required as unary '&' operand
> >>> net/ipv4/fib_trie.c:977: error: lvalue required as unary '&' operand
> >>> net/ipv4/fib_trie.c:980: error: lvalue required as unary '&' operand
> >>> ...
> >> Side effect of the git-net removal, temporarily removing
> >> immunize-rcu_dereference-against-crazy-compiler-writers.patch should
> >> work around it.
> >
> > Alternatively, the following one-line patch to net/ipv4/fib_trie.c could
> > be used.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > ---
> >
> > fib_trie.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff -urpNa -X dontdiff linux-2.6.23-rc3-mm1/net/ipv4/fib_trie.c linux-2.6.23-rc3-mm1.compile/net/ipv4/fib_trie.c
> > --- linux-2.6.23-rc3-mm1/net/ipv4/fib_trie.c 2007-08-22 09:20:33.000000000 -0700
> > +++ linux-2.6.23-rc3-mm1.compile/net/ipv4/fib_trie.c 2007-08-22 09:47:33.000000000 -0700
> > @@ -94,7 +94,7 @@ typedef unsigned int t_key;
> > #define T_LEAF 1
> > #define NODE_TYPE_MASK 0x1UL
> > #define NODE_PARENT(node) \
> > - ((struct tnode *)rcu_dereference(((node)->parent & ~NODE_TYPE_MASK)))
> > + ((struct tnode *)(rcu_dereference((node)->parent) & ~NODE_TYPE_MASK))
> ...
>
> After first reading of this thread I've had an impression it's about
> compiler's behavior, but now it seems to me this patch is not an
> alternative, but a 'must be' and only proper way of calling
> rcu_dereference (with a variable instead of an expression)? Am I
> right?
Yes, rcu_dereference() does indeed need to be invoked on a lvalue.
Thanx, Paul
next prev parent reply other threads:[~2007-08-27 16:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070822020648.5ea3a612.akpm@linux-foundation.org>
2007-08-22 15:30 ` net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1) Gabriel C
2007-08-22 15:41 ` Adrian Bunk
2007-08-22 16:32 ` Gabriel C
2007-08-22 17:03 ` Paul E. McKenney
2007-08-27 6:36 ` Jarek Poplawski
2007-08-27 16:23 ` Paul E. McKenney [this message]
[not found] ` <46CC3B27.10604@googlemail.com>
[not found] ` <20070822090953.78a3d90c.akpm@linux-foundation.org>
2007-08-22 17:01 ` 2.6.23-rc3-mm1 Gabriel C
2007-08-22 17:10 ` drivers/net/ppp_generic - __modpost error ( Re: 2.6.23-rc3-mm1 ) Gabriel C
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=20070827162318.GB8290@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=jarkao2@o2.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).