[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120328.165132.1309449708287640005.davem@davemloft.net>
Date: Wed, 28 Mar 2012 16:51:32 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: rostedt@...dmis.org
Cc: tixxdz@...ndz.org, ebiederm@...ssion.com, viro@...iv.linux.org.uk,
netdev@...r.kernel.org
Subject: Re: [PATCH] net: reference the ipv4 sysctl table header
From: Steven Rostedt <rostedt@...dmis.org>
Date: Wed, 28 Mar 2012 12:32:20 -0400
> I just started using kmemleak and notice that it reports false positives
> for several __init functions that call register_sysctl_paths(). The fix
> you want is:
>
> {
> sturct ctl_table_header *head;
>
> head = register_sysctl_paths(ipv4_path, ipv4_skeleton);
> BUG_ON(!head);
> kmemleak_ignore(head);
>
>
> No need to waste a pointer just to keep the reference around for
> kmemleak.
That looks a lot saner than the other suggestions, indeed.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists