public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
       [not found] ` <20120619112823.GB445@1984>
@ 2012-06-19 11:41   ` Fengguang Wu
  2012-06-19 11:56     ` Pablo Neira Ayuso
  2012-06-23  0:41     ` Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Fengguang Wu @ 2012-06-19 11:41 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: LKML

On Tue, Jun 19, 2012 at 01:28:23PM +0200, Pablo Neira Ayuso wrote:
> On Tue, Jun 19, 2012 at 02:00:50PM +0800, wfg@linux.intel.com wrote:
> > Hi Pablo,
> > 
> > There are new sparse warnings show up in
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> > head:   6bdc5f49e365a5403b9fdef01ceb37241ab00f9b
> > commit: 7c62234547255ce4c385a218915965bc2f14fe45 [49/50] netfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled
> > 
> > All sparse warnings:
> > 
> > net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nfnetlink_queue_ct.c:45:18: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nfnetlink_queue_ct.c:63:18: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nfnetlink_queue_ct.c:91:18: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nf_conntrack_netlink.c:1100:27: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> > net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> > 
> > net/netfilter/nfnetlink_queue_ct.c:23:
> >     20		struct nf_conn *ct;
> >     21	
> >     22		/* rcu_read_lock()ed by __nf_queue already. */
> >   > 23		nfq_ct = rcu_dereference(nfq_ct_hook);
> >     24		if (nfq_ct == NULL)
> >     25			return NULL;
> >     26	
> 
> What CF options are you using to make sparse spot this? I cannot hit
> those message here.

I don't specify any options. I do use the sparse compiled from latest
git tree.

        git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git

And changed its code to output "sparse:" rather than "error:"/"warning:"
so that they can be distinguished from the gcc error/warnings.

> I've got a fix but I don't want to send you an untested patch.

Appreciated!

I run a special service for this. If you push a patch to your git tree
containing the line

        Reported-by: Fengguang Wu <wfg@linux.intel.com>

And not containing any "Tested-by:" line, my script will automatically
test it and send a success/failure notification back to you, normally
within one hour.

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
  2012-06-19 11:41   ` [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces) Fengguang Wu
@ 2012-06-19 11:56     ` Pablo Neira Ayuso
  2012-06-19 12:35       ` Eric Dumazet
  2012-06-23  0:41     ` Pablo Neira Ayuso
  1 sibling, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2012-06-19 11:56 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: LKML

On Tue, Jun 19, 2012 at 07:41:13PM +0800, Fengguang Wu wrote:
> On Tue, Jun 19, 2012 at 01:28:23PM +0200, Pablo Neira Ayuso wrote:
> > On Tue, Jun 19, 2012 at 02:00:50PM +0800, wfg@linux.intel.com wrote:
> > > Hi Pablo,
> > > 
> > > There are new sparse warnings show up in
> > > 
> > > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> > > head:   6bdc5f49e365a5403b9fdef01ceb37241ab00f9b
> > > commit: 7c62234547255ce4c385a218915965bc2f14fe45 [49/50] netfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled
> > > 
> > > All sparse warnings:
> > > 
> > > net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nfnetlink_queue_ct.c:45:18: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nfnetlink_queue_ct.c:63:18: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nfnetlink_queue_ct.c:91:18: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nf_conntrack_netlink.c:1100:27: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> > > net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> > > 
> > > net/netfilter/nfnetlink_queue_ct.c:23:
> > >     20		struct nf_conn *ct;
> > >     21	
> > >     22		/* rcu_read_lock()ed by __nf_queue already. */
> > >   > 23		nfq_ct = rcu_dereference(nfq_ct_hook);
> > >     24		if (nfq_ct == NULL)
> > >     25			return NULL;
> > >     26	
> > 
> > What CF options are you using to make sparse spot this? I cannot hit
> > those message here.
> 
> I don't specify any options. I do use the sparse compiled from latest
> git tree.
> 
>         git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
> 
> And changed its code to output "sparse:" rather than "error:"/"warning:"
> so that they can be distinguished from the gcc error/warnings.

I don't hit those errors here with:

make C=2 net/netfilter/nfnetlink_queue_ct.o

using latest sparse from git tree.

I guess it's related to some missing __rcu tag, but I need to make
sure. I don't want to play whack-a-mole game ;-).

> > I've got a fix but I don't want to send you an untested patch.
> 
> Appreciated!
> 
> I run a special service for this. If you push a patch to your git tree
> containing the line
> 
>         Reported-by: Fengguang Wu <wfg@linux.intel.com>

yes, I always try to add that tag.

> And not containing any "Tested-by:" line, my script will automatically
> test it and send a success/failure notification back to you, normally
> within one hour.

Great to know.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
  2012-06-19 11:56     ` Pablo Neira Ayuso
@ 2012-06-19 12:35       ` Eric Dumazet
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2012-06-19 12:35 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Fengguang Wu, LKML

On Tue, 2012-06-19 at 13:56 +0200, Pablo Neira Ayuso wrote:

> I don't hit those errors here with:
> 
> make C=2 net/netfilter/nfnetlink_queue_ct.o
> 
> using latest sparse from git tree.
> 
> I guess it's related to some missing __rcu tag, but I need to make
> sure. I don't want to play whack-a-mole game ;-).

Hint :

CONFIG_SPARSE_RCU_POINTER=y




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
  2012-06-19 11:41   ` [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces) Fengguang Wu
  2012-06-19 11:56     ` Pablo Neira Ayuso
@ 2012-06-23  0:41     ` Pablo Neira Ayuso
  1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2012-06-23  0:41 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: LKML

On Tue, Jun 19, 2012 at 02:00:50PM +0800, wfg@linux.intel.com wrote:
> Hi Pablo,
> 
> There are new sparse warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> head:   6bdc5f49e365a5403b9fdef01ceb37241ab00f9b
> commit: 7c62234547255ce4c385a218915965bc2f14fe45 [49/50] netfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled
> 
> All sparse warnings:
> 
> net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nfnetlink_queue_ct.c:45:18: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nfnetlink_queue_ct.c:63:18: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nfnetlink_queue_ct.c:91:18: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nf_conntrack_netlink.c:1100:27: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> net/netfilter/nf_conntrack_netlink.c:1222:34: sparse: incompatible types in comparison expression (different address spaces)
> 
> net/netfilter/nfnetlink_queue_ct.c:23:
>     20		struct nf_conn *ct;
>     21	
>     22		/* rcu_read_lock()ed by __nf_queue already. */
>   > 23		nfq_ct = rcu_dereference(nfq_ct_hook);
>     24		if (nfq_ct == NULL)
>     25			return NULL;
>     26	

JFYI: I've enqueued the following patch to fix this sparse warning:

http://1984.lsi.us.es/git/nf-next/commit/?id=5a05fae5ca7cd5279567747fc34d60413b504cd6

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-23  0:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120619060050.GA14867@localhost>
     [not found] ` <20120619112823.GB445@1984>
2012-06-19 11:41   ` [net-next:master 49/50] net/netfilter/nfnetlink_queue_ct.c:23:18: sparse: incompatible types in comparison expression (different address spaces) Fengguang Wu
2012-06-19 11:56     ` Pablo Neira Ayuso
2012-06-19 12:35       ` Eric Dumazet
2012-06-23  0:41     ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox