瀏覽代碼

net: fix compile error of leaking kmemleak.h header

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

Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Shan Wei 13 年之前
父節點
當前提交
7426a5645f
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      net/core/sysctl_net_core.c
  2. 1 0
      net/ipv4/route.c

+ 1 - 0
net/core/sysctl_net_core.c

@@ -14,6 +14,7 @@
 #include <linux/vmalloc.h>
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/slab.h>
+#include <linux/kmemleak.h>
 
 
 #include <net/ip.h>
 #include <net/ip.h>
 #include <net/sock.h>
 #include <net/sock.h>

+ 1 - 0
net/ipv4/route.c

@@ -109,6 +109,7 @@
 #include <net/rtnetlink.h>
 #include <net/rtnetlink.h>
 #ifdef CONFIG_SYSCTL
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
 #include <linux/sysctl.h>
+#include <linux/kmemleak.h>
 #endif
 #endif
 #include <net/secure_seq.h>
 #include <net/secure_seq.h>