Skip to contentSkip to conversation

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

PATCH Applied Arnd Bergmann 4 participants 11 messages Jun 10, 2014 – Jun 12, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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

Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

---

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

drivers/net/xen-netback/interface.c +1 -0
index 6929bcb..852da34 100644
@@ -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>
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

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

Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

Acked-by on v1 1/1
#8 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

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

Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

#2 lore raw
In reply to Wei Liu
Quoted 12 lines · Wei Liu
Quoted 11 lines · Arnd Bergmann

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

Quoted 8 lines
Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

#3 lore raw
In reply to Wei Liu
Quoted 12 lines · Wei Liu
Quoted 11 lines · Arnd Bergmann

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

Quoted 8 lines
Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

maintainer
#4 lore raw
In reply to Wei Liu

From: Wei Liu <[email protected]>
Date: Tue, 10 Jun 2014 09:44:54 +0100

Quoted 12 lines · Arnd Bergmann
Quoted 11 lines

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

Quoted 8 lines
Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

maintainer
#7 lore raw
In reply to Wei Liu

From: Wei Liu <[email protected]>
Date: Tue, 10 Jun 2014 09:44:54 +0100

Quoted 12 lines · Arnd Bergmann
Quoted 11 lines

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

Quoted 8 lines
Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>

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.

maintainer Applied
#9 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Tue, 10 Jun 2014 10:34:36 +0200

Quoted 5 lines

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:

Quoted 7 lines

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

Applied to net-next, thanks.

maintainer Applied
#10 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Tue, 10 Jun 2014 10:34:36 +0200

Quoted 5 lines

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:

Quoted 7 lines

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

Applied to net-next, thanks.

#5 lore raw
In reply to David Miller
Quoted 21 lines · David Miller

From: Wei Liu <[email protected]>
Date: Tue, 10 Jun 2014 09:44:54 +0100

Quoted 18 lines · Arnd Bergmann
Quoted 11 lines

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

Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>
Quoted 8 lines
Quoted 2 lines

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.

#6 lore raw
In reply to David Miller
Quoted 21 lines · David Miller

From: Wei Liu <[email protected]>
Date: Tue, 10 Jun 2014 09:44:54 +0100

Quoted 18 lines · Arnd Bergmann
Quoted 11 lines

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

Quoted 3 lines
Cc Wei Liu <[email protected]>
Cc Andrew J. Bennieston <[email protected]>
Quoted 8 lines
Quoted 2 lines

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.