netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: macvtap: convert to SKB paged frag API.
@ 2011-09-20  9:17 Dan Carpenter
  2011-09-20 10:05 ` Ian Campbell
  2011-09-20 10:48 ` [PATCH] macvtap: fix warning due to use of uninitialised var Ian Campbell
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-09-20  9:17 UTC (permalink / raw)
  To: Ian.Campbell; +Cc: netdev

Hi Ian,

There is a problem in d1b08284ade "macvtap: convert to SKB paged frag
API."  It removes the initialization of "f" in zerocopy_sg_from_iovec()
which breaks it and causes a compile warning:
drivers/net/macvtap.c:509:5: warning: ‘f’ may be used uninitialized
	in this function [-Wuninitialized]

regards,
dan carpenter

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

* re: macvtap: convert to SKB paged frag API.
  2011-09-20  9:17 macvtap: convert to SKB paged frag API Dan Carpenter
@ 2011-09-20 10:05 ` Ian Campbell
  2011-09-20 10:48 ` [PATCH] macvtap: fix warning due to use of uninitialised var Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-09-20 10:05 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: netdev@vger.kernel.org

On Tue, 2011-09-20 at 10:17 +0100, Dan Carpenter wrote:
> Hi Ian,
> 
> There is a problem in d1b08284ade "macvtap: convert to SKB paged frag
> API."  It removes the initialization of "f" in zerocopy_sg_from_iovec()
> which breaks it and causes a compile warning:
> drivers/net/macvtap.c:509:5: warning: ‘f’ may be used uninitialized
> 	in this function [-Wuninitialized]

Not just a warning but an actual bug -- I'll post a patch.

Thanks for the heads up!

Ian.

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

* [PATCH] macvtap: fix warning due to use of uninitialised var
  2011-09-20  9:17 macvtap: convert to SKB paged frag API Dan Carpenter
  2011-09-20 10:05 ` Ian Campbell
@ 2011-09-20 10:48 ` Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2011-09-20 10:48 UTC (permalink / raw)
  To: netdev; +Cc: Ian Campbell

d1b08284ade "macvtap: convert to SKB paged frag API." accidentally dropped the
initialisation of a variable leading to:
	drivers/net/macvtap.c:509:5: warning: ‘f’ may be used uninitialized
		in this function [-Wuninitialized]

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 drivers/net/macvtap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 7c3f84a..5beda89 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -503,6 +503,7 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
 		skb->truesize += len;
 		atomic_add(len, &skb->sk->sk_wmem_alloc);
 		while (len) {
+			f = &skb_shinfo(skb)->frags[i];
 			__skb_fill_page_desc(
 				skb, i, page[i],
 				base & ~PAGE_MASK,
-- 
1.7.2.5

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

end of thread, other threads:[~2011-09-20 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20  9:17 macvtap: convert to SKB paged frag API Dan Carpenter
2011-09-20 10:05 ` Ian Campbell
2011-09-20 10:48 ` [PATCH] macvtap: fix warning due to use of uninitialised var Ian Campbell

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).