public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: linux-next: upstream tree build warnings
       [not found] <20090423163847.200f227e.sfr@canb.auug.org.au>
@ 2009-04-23  7:24 ` David Miller
  2009-04-23 11:55   ` Stephen Rothwell
  2009-04-26 12:23   ` Rusty Russell
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2009-04-23  7:24 UTC (permalink / raw)
  To: sfr; +Cc: linux-next, alex.williamson, rusty, linux-kernel

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 23 Apr 2009 16:38:47 +1000

> Today's linux-next build (powerpc allyesconfig gcc4.4.0) produced these
> warnings:
> 
> drivers/net/virtio_net.c: In function 'virnet_vlan_rx_add_vid':
> include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> drivers/net/virtio_net.c:746: note: 'sg' was declared here
> drivers/net/virtio_net.c: In function 'virnet_vlan_rx_kill_vid':
> include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> drivers/net/virtio_net.c:758: note: 'sg' was declared here
> 
> in each case, sg is uninitialised when its address is passed to
> sg_set_buf() which passes it to gs_set_page() which passes it to
> sg_assign_page() which dereferences it (to use ->page_link).

I wonder if this is a side effect of changes that went in via Rusty's
tree?  I don't remember touching this driver in a while.


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

* Re: linux-next: upstream tree build warnings
  2009-04-23  7:24 ` linux-next: upstream tree build warnings David Miller
@ 2009-04-23 11:55   ` Stephen Rothwell
  2009-04-23 12:51     ` Stephen Rothwell
  2009-04-26 12:23   ` Rusty Russell
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2009-04-23 11:55 UTC (permalink / raw)
  To: David Miller; +Cc: linux-next, alex.williamson, rusty, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

Hi Dave,

On Thu, 23 Apr 2009 00:24:03 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 23 Apr 2009 16:38:47 +1000
> 
> > Today's linux-next build (powerpc allyesconfig gcc4.4.0) produced these
> > warnings:
> > 
> > drivers/net/virtio_net.c: In function 'virnet_vlan_rx_add_vid':
> > include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> > drivers/net/virtio_net.c:746: note: 'sg' was declared here
> > drivers/net/virtio_net.c: In function 'virnet_vlan_rx_kill_vid':
> > include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> > drivers/net/virtio_net.c:758: note: 'sg' was declared here
> > 
> > in each case, sg is uninitialised when its address is passed to
> > sg_set_buf() which passes it to gs_set_page() which passes it to
> > sg_assign_page() which dereferences it (to use ->page_link).
> 
> I wonder if this is a side effect of changes that went in via Rusty's
> tree?  I don't remember touching this driver in a while.

The callers came in throught commit
0bde95690d65653e420d04856c5d5783155c747c ("virtio_net: Add support for
VLAN filtering in the hypervisor") which I assume came in throught the
net tree (it has you SOB on it). Committed Feb 5, 2009, went into Linus'
tree before 2.6.30-rc1.

scatterlist.h hasn't changed since July, 2008.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: upstream tree build warnings
  2009-04-23 11:55   ` Stephen Rothwell
@ 2009-04-23 12:51     ` Stephen Rothwell
  2009-04-23 16:46       ` Alex Williamson
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2009-04-23 12:51 UTC (permalink / raw)
  To: David Miller; +Cc: linux-next, alex.williamson, rusty, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]

Hi Dave,

On Thu, 23 Apr 2009 21:55:33 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> The callers came in throught commit
> 0bde95690d65653e420d04856c5d5783155c747c ("virtio_net: Add support for
> VLAN filtering in the hypervisor") which I assume came in throught the
> net tree (it has you SOB on it). Committed Feb 5, 2009, went into Linus'
> tree before 2.6.30-rc1.
> 
> scatterlist.h hasn't changed since July, 2008.

In other words, I think the bug has always been there and just never hit
(yet).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: upstream tree build warnings
  2009-04-23 12:51     ` Stephen Rothwell
@ 2009-04-23 16:46       ` Alex Williamson
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Williamson @ 2009-04-23 16:46 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, linux-next, rusty, linux-kernel

On Thu, 2009-04-23 at 22:51 +1000, Stephen Rothwell wrote:
> Hi Dave,
> 
> On Thu, 23 Apr 2009 21:55:33 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > The callers came in throught commit
> > 0bde95690d65653e420d04856c5d5783155c747c ("virtio_net: Add support for
> > VLAN filtering in the hypervisor") which I assume came in throught the
> > net tree (it has you SOB on it). Committed Feb 5, 2009, went into Linus'
> > tree before 2.6.30-rc1.
> > 
> > scatterlist.h hasn't changed since July, 2008.
> 
> In other words, I think the bug has always been there and just never hit
> (yet).

Hmm, I can't seem to get the warning on an x86_64 allyesconfig build
with gcc-4.4.0.  Did all the archs other than powerpc miss this warning?
Thanks,

Alex



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

* Re: linux-next: upstream tree build warnings
  2009-04-23  7:24 ` linux-next: upstream tree build warnings David Miller
  2009-04-23 11:55   ` Stephen Rothwell
@ 2009-04-26 12:23   ` Rusty Russell
  2009-04-27  6:32     ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-04-26 12:23 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, linux-next, alex.williamson, linux-kernel

On Thu, 23 Apr 2009 04:54:03 pm David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 23 Apr 2009 16:38:47 +1000
> 
> > Today's linux-next build (powerpc allyesconfig gcc4.4.0) produced these
> > warnings:
> > 
> > drivers/net/virtio_net.c: In function 'virnet_vlan_rx_add_vid':
> > include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> > drivers/net/virtio_net.c:746: note: 'sg' was declared here
> > drivers/net/virtio_net.c: In function 'virnet_vlan_rx_kill_vid':
> > include/linux/scatterlist.h:57: warning: 'sg' is used uninitialized in this function
> > drivers/net/virtio_net.c:758: note: 'sg' was declared here
> > 
> > in each case, sg is uninitialised when its address is passed to
> > sg_set_buf() which passes it to gs_set_page() which passes it to
> > sg_assign_page() which dereferences it (to use ->page_link).
> 
> I wonder if this is a side effect of changes that went in via Rusty's
> tree?  I don't remember touching this driver in a while.

AFAICT gcc is right: it should be sg_init_one().

It doesn't currently *matter*, since no virtio add_buf implementation
does that chained-sg crap (I had a patch once, but it made me barf) and
so the uninitialized lower three bits are ignored.

Alex, if you agree, patch welcome...
Rusty.

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

* Re: linux-next: upstream tree build warnings
  2009-04-26 12:23   ` Rusty Russell
@ 2009-04-27  6:32     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-04-27  6:32 UTC (permalink / raw)
  To: rusty; +Cc: sfr, linux-next, alex.williamson, linux-kernel

From: Rusty Russell <rusty@rustcorp.com.au>
Date: Sun, 26 Apr 2009 21:53:10 +0930

> Alex, if you agree, patch welcome...

And please CC: netdev properly so that the patch gets tracked
in patchwork, thanks.

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

end of thread, other threads:[~2009-04-27  6:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090423163847.200f227e.sfr@canb.auug.org.au>
2009-04-23  7:24 ` linux-next: upstream tree build warnings David Miller
2009-04-23 11:55   ` Stephen Rothwell
2009-04-23 12:51     ` Stephen Rothwell
2009-04-23 16:46       ` Alex Williamson
2009-04-26 12:23   ` Rusty Russell
2009-04-27  6:32     ` David Miller

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