netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: rostedt@goodmis.org
Cc: tixxdz@opendz.org, ebiederm@xmission.com,
	viro@zeniv.linux.org.uk, netdev@vger.kernel.org
Subject: Re: [PATCH] net: reference the ipv4 sysctl table header
Date: Wed, 28 Mar 2012 16:51:32 -0400 (EDT)	[thread overview]
Message-ID: <20120328.165132.1309449708287640005.davem@davemloft.net> (raw)
In-Reply-To: <20120328163219.GA19778@home.goodmis.org>

From: Steven Rostedt <rostedt@goodmis.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.

  reply	other threads:[~2012-03-28 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 22:23 [PATCH] net: reference the ipv4 sysctl table header Djalal Harouni
2012-03-26 22:24 ` David Miller
2012-03-26 22:42   ` Djalal Harouni
2012-03-28 16:32   ` Steven Rostedt
2012-03-28 20:51     ` David Miller [this message]
2012-03-31 14:29       ` Djalal Harouni
2012-03-26 22:50 ` Eric W. Biederman
2012-03-26 23:21   ` Djalal Harouni
2012-03-28  2:35     ` Eric W. Biederman
2012-03-31 14:25       ` Djalal Harouni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120328.165132.1309449708287640005.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tixxdz@opendz.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).