[PATCH] net: xen-netback: include linux/vmalloc.h again

Subsystems: networking drivers, the rest, xen network backend driver

STALE4484d

6 messages, 4 authors, 2014-06-12 · open the first message on its own page

[PATCH] net: xen-netback: include linux/vmalloc.h again

From: Arnd Bergmann <arnd@arndb.de>
Date: 2014-06-10 08:34:52

commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wei Liu <redacted>
Cc: Andrew J. Bennieston <redacted>
---

I haven't found another report of this bug, but if someone else already
submitted a fix, please ignore this one.

Incidentally, it's the same bug that Josh fixed before in January,
but it has reappeared now, see https://lkml.org/lkml/2014/1/5/36
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 6929bcb..852da34 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -34,6 +34,7 @@
 #include <linux/ethtool.h>
 #include <linux/rtnetlink.h>
 #include <linux/if_vlan.h>
+#include <linux/vmalloc.h>
 
 #include <xen/events.h>
 #include <asm/xen/hypercall.h>

Re: [PATCH] net: xen-netback: include linux/vmalloc.h again

From: Wei Liu <hidden>
Date: 2014-06-10 08:44:55

On Tue, Jun 10, 2014 at 10:34:36AM +0200, Arnd Bergmann wrote:
commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wei Liu <redacted>
Cc: Andrew J. Bennieston <redacted>
Acked-by: Wei Liu <redacted>

This didn't happen to me when I built it on x86 though. Just curious,
did you build it on othet platform, say, ARM?

Wei.

Re: [Xen-devel] [PATCH] net: xen-netback: include linux/vmalloc.h again

From: Ian Campbell <hidden>
Date: 2014-06-10 08:52:44

On Tue, 2014-06-10 at 09:44 +0100, Wei Liu wrote:
On Tue, Jun 10, 2014 at 10:34:36AM +0200, Arnd Bergmann wrote:
quoted
commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wei Liu <redacted>
Cc: Andrew J. Bennieston <redacted>
Acked-by: Wei Liu <redacted>

This didn't happen to me when I built it on x86 though. Just curious,
did you build it on othet platform, say, ARM?
Arnd comaintains the arm-soc tree, so that's a pretty good bet ;-)

Ian.

Re: [PATCH] net: xen-netback: include linux/vmalloc.h again

From: David Miller <davem@davemloft.net>
Date: 2014-06-11 22:19:01

From: Wei Liu <redacted>
Date: Tue, 10 Jun 2014 09:44:54 +0100
On Tue, Jun 10, 2014 at 10:34:36AM +0200, Arnd Bergmann wrote:
quoted
commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wei Liu <redacted>
Cc: Andrew J. Bennieston <redacted>
Acked-by: Wei Liu <redacted>

This didn't happen to me when I built it on x86 though. Just curious,
did you build it on othet platform, say, ARM?
ARM and PowerPC will both show this problem.

The issue is that x86 get's linux/vmalloc.h implicitly through one of
it's asm/ headers, thus you'll never hit the issue if you only build
test on that arch.

Re: [PATCH] net: xen-netback: include linux/vmalloc.h again

From: David Miller <davem@davemloft.net>
Date: 2014-06-11 22:19:50

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 10 Jun 2014 10:34:36 +0200
commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to net-next, thanks.

Re: [PATCH] net: xen-netback: include linux/vmalloc.h again

From: Wei Liu <hidden>
Date: 2014-06-12 09:07:48

On Wed, Jun 11, 2014 at 03:19:01PM -0700, David Miller wrote:
From: Wei Liu <redacted>
Date: Tue, 10 Jun 2014 09:44:54 +0100
quoted
On Tue, Jun 10, 2014 at 10:34:36AM +0200, Arnd Bergmann wrote:
quoted
commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into
queue struct") added a use of vzalloc/vfree to interface.c, but
removed the #include <linux/vmalloc.h> statement at the same time,
which causes this build error:

drivers/net/xen-netback/interface.c: In function 'xenvif_free':
drivers/net/xen-netback/interface.c:754:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  vfree(vif->queues);
  ^
cc1: some warnings being treated as errors

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wei Liu <redacted>
Cc: Andrew J. Bennieston <redacted>
Acked-by: Wei Liu <redacted>

This didn't happen to me when I built it on x86 though. Just curious,
did you build it on othet platform, say, ARM?
ARM and PowerPC will both show this problem.

The issue is that x86 get's linux/vmalloc.h implicitly through one of
it's asm/ headers, thus you'll never hit the issue if you only build
test on that arch.
Good to know. I shall keep an eye on this in the future.

Thanks
Wei.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help