Skip to contentSkip to conversation

net: fix compile error of leaking kmemleak.h header

PATCH Applied Shan Wei 3 participants 4 messages Apr 19, 2012

Subsystems (3)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 net: fix compile error of leaking kmemleak.h header

From: Shan Wei <[email protected]>

net/core/sysctl_net_core.c: In function ‘sysctl_core_init’:
net/core/sysctl_net_core.c:259: error: implicit declaration of function ‘kmemleak_not_leak’

with same error in net/ipv4/route.c

---
 net/core/sysctl_net_core.c |    1 +
 net/ipv4/route.c           |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
net/core/sysctl_net_core.c +1 -0
index cee5991..247c69b 100644
@@ -14,6 +14,7 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/kmemleak.h>
 
 #include <net/ip.h>
 #include <net/sock.h>
net/ipv4/route.c +1 -0
index bcd4744..a1c115d 100644
@@ -109,6 +109,7 @@
 #include <net/rtnetlink.h>
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
+#include <linux/kmemleak.h>
 #endif
 #include <net/secure_seq.h>
 
Signature · 1 line
1.7.1
author
#1 lore raw

Shan Wei said, at 2012/4/19 12:05:

Quoted 6 lines

From: Shan Wei <[email protected]>

net/core/sysctl_net_core.c: In function ‘sysctl_core_init’:
net/core/sysctl_net_core.c:259: error: implicit declaration of function ‘kmemleak_not_leak’

with same error in net/ipv4/route.c

This is for net-next.....

Acked-by on v1 1/1
#3 lore raw
In reply to Shan Wei
Quoted 30 lines · Shan Wei

From: Shan Wei <[email protected]>

net/core/sysctl_net_core.c: In function ‘sysctl_core_init’:
net/core/sysctl_net_core.c:259: error: implicit declaration of function ‘kmemleak_not_leak’

with same error in net/ipv4/route.c

---
 net/core/sysctl_net_core.c |    1 +
 net/ipv4/route.c           |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
net/core/sysctl_net_core.c +1 -0
index cee5991..247c69b 100644
@@ -14,6 +14,7 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/kmemleak.h>
 
 #include <net/ip.h>
 #include <net/sock.h>
net/ipv4/route.c +0 -0
index bcd4744..a1c115d 100644

net/ipv4/route.c line 115

Quoted 7 lines
net/ipv4/route.c +1 -0
@@ -109,6 +109,7 @@
 #include <net/rtnetlink.h>
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
+#include <linux/kmemleak.h>
 #endif
 #include <net/secure_seq.h>
 

yep, SLAB doesnt include it like SLUB