public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: ebiederm@xmission•com (Eric W. Biederman)
To: Djalal Harouni <tixxdz@opendz•org>
Cc: "David S. Miller" <davem@davemloft•net>,
	Al Viro <viro@zeniv•linux.org.uk>,
	netdev@vger•kernel.org
Subject: Re: [PATCH] net: reference the ipv4 sysctl table header
Date: Tue, 27 Mar 2012 19:35:33 -0700	[thread overview]
Message-ID: <m1sjgtmozu.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20120326232123.GB29626@dztty> (Djalal Harouni's message of "Tue, 27 Mar 2012 00:21:23 +0100")

Djalal Harouni <tixxdz@opendz•org> writes:

> On Mon, Mar 26, 2012 at 03:50:30PM -0700, Eric W. Biederman wrote:
>> Djalal Harouni <tixxdz@opendz•org> writes:
>> 
>> > I've been analysing some kmemleak reports of an internal module, and
>> > found that there are false positive reports of unreferenced objects.
>> >
>> > The following patch is just a clean up for one of those false positives,
>> > this is for the /proc/sys/net/ipv4 sysctl table.
>> > As I've said there are other reports but don't know if it is worth to
>> > write patches for them.
>> 
>> So the problem here is that you register a sysctl and don't keep a
>> pointer to the returned sysctl_header?  So kmemleak complains?
> Right.
>
>> I would expect the other sysctl data structures to have such a pointer,
>> so I don't know why kmemleak would complain.
>> 
>> Does my recent sysctl rewrite affect when this kmemleak is reported?
> Actually yes, after a recent pull (which includes your recent sysctl work),
> some of these false positive reports started to appear.
>
>
> Anyway they seem false positive ones, since keeping a reference to
> sysctl_header as in my previous (ugly) patch will quiet the last two
> ones.

Ok thanks. If that is what it is.  Then clean way to quite this will
ultimately be converting these table to be compatible with my brand
new register_sysctl() and using that to register them.

In fact I am pretty certain we can just do:
register_sysctl("net/ipv4/route", ipv4_route_table);
register_sysctl("net/ipv4/neigh", empty);

instead of:
register_sysctl_paths(ipv4_path, ipv4_skeleton);

And kill ipv4_skeleton and ipv4_path as they are now unused.

There was a tremendous cleanup and speed up that came with not allowing
sysctl tables to support .child entries in the core, and the older
registration routines break apart the tables and return a compatilibty
sysctl_table_header if we do that, and I believe we are just
leaking that compatibility sysctl_table_header.

Eric

  reply	other threads:[~2012-03-28  2:31 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
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 [this message]
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=m1sjgtmozu.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tixxdz@opendz$(echo .)org \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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