* [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak
@ 2012-04-17 1:41 majianpeng
2012-04-17 5:18 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: majianpeng @ 2012-04-17 1:41 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
>From 582ed93b990e88110287ed0388bcb9057b1b8591 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Tue, 17 Apr 2012 09:36:26 +0800
Subject: [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak.
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
net/ipv4/route.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 167ea10..1984c82 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3504,7 +3504,11 @@ int __init ip_rt_init(void)
* this nonsense will go away.
*/
void __init ip_static_sysctl_init(void)
-{
- register_sysctl_paths(ipv4_path, ipv4_skeleton);
+{
+ struct ctl_table_header *ctl_header;
+
+ ctl_header = register_sysctl_paths(ipv4_path, ipv4_skeleton);
+ if (ctl_header)
+ kmemleak_not_leak(ctl_header);
}
#endif
--
1.7.5.4
--------------
majianpeng
2012-04-17
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak
2012-04-17 1:41 [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak majianpeng
@ 2012-04-17 5:18 ` Eric Dumazet
2012-04-17 5:22 ` Re: [PATCH] net/ipv4:Remove two memleak reports bykmemeleak_not_leak majianpeng
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-04-17 5:18 UTC (permalink / raw)
To: majianpeng; +Cc: netdev
On Tue, 2012-04-17 at 09:41 +0800, majianpeng wrote:
> From 582ed93b990e88110287ed0388bcb9057b1b8591 Mon Sep 17 00:00:00 2001
> From: majianpeng <majianpeng@gmail.com>
> Date: Tue, 17 Apr 2012 09:36:26 +0800
> Subject: [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak.
>
>
> Signed-off-by: majianpeng <majianpeng@gmail.com>
> ---
> net/ipv4/route.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 167ea10..1984c82 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -3504,7 +3504,11 @@ int __init ip_rt_init(void)
> * this nonsense will go away.
> */
> void __init ip_static_sysctl_init(void)
> -{
> - register_sysctl_paths(ipv4_path, ipv4_skeleton);
> +{
> + struct ctl_table_header *ctl_header;
> +
> + ctl_header = register_sysctl_paths(ipv4_path, ipv4_skeleton);
> + if (ctl_header)
> + kmemleak_not_leak(ctl_header);
> }
> #endif
No need for this temp var and conditional.
Just :
kmemleak_not_leak(register_sysctl_paths(ipv4_path, ipv4_skeleton));
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] net/ipv4:Remove two memleak reports bykmemeleak_not_leak
2012-04-17 5:18 ` Eric Dumazet
@ 2012-04-17 5:22 ` majianpeng
0 siblings, 0 replies; 3+ messages in thread
From: majianpeng @ 2012-04-17 5:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
Thanks,I will correct it and resent the patch.
------------------
majianpeng
2012-04-17
-------------------------------------------------------------
发件人:Eric Dumazet
发送日期:2012-04-17 13:18:54
收件人:majianpeng
抄送:netdev
主题:Re: [PATCH] net/ipv4:Remove two memleak reports bykmemeleak_not_leak
On Tue, 2012-04-17 at 09:41 +0800, majianpeng wrote:
> From 582ed93b990e88110287ed0388bcb9057b1b8591 Mon Sep 17 00:00:00 2001
> From: majianpeng <majianpeng@gmail.com>
> Date: Tue, 17 Apr 2012 09:36:26 +0800
> Subject: [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak.
>
>
> Signed-off-by: majianpeng <majianpeng@gmail.com>
> ---
> net/ipv4/route.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 167ea10..1984c82 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -3504,7 +3504,11 @@ int __init ip_rt_init(void)
> * this nonsense will go away.
> */
> void __init ip_static_sysctl_init(void)
> -{
> - register_sysctl_paths(ipv4_path, ipv4_skeleton);
> +{
> + struct ctl_table_header *ctl_header;
> +
> + ctl_header = register_sysctl_paths(ipv4_path, ipv4_skeleton);
> + if (ctl_header)
> + kmemleak_not_leak(ctl_header);
> }
> #endif
No need for this temp var and conditional.
Just :
kmemleak_not_leak(register_sysctl_paths(ipv4_path, ipv4_skeleton));
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-17 5:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 1:41 [PATCH] net/ipv4:Remove two memleak reports by kmemeleak_not_leak majianpeng
2012-04-17 5:18 ` Eric Dumazet
2012-04-17 5:22 ` Re: [PATCH] net/ipv4:Remove two memleak reports bykmemeleak_not_leak majianpeng
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).