netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryton Lee <brytonlee01@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: stephen@networkplumber.org, netdev@vger.kernel.org
Subject: Re: [PATCH] prevent the read ahead of /proc/slabinfo in ss
Date: Tue, 10 Feb 2015 10:01:06 +0800	[thread overview]
Message-ID: <CAC2pzGf5=XCxLbjX41c8CXkoh2s26PHLHX+tGOJyqEUnwVAfOg@mail.gmail.com> (raw)
In-Reply-To: <20150209.111618.1959932896181412008.davem@davemloft.net>

On Tue, Feb 10, 2015 at 3:16 AM, David Miller <davem@davemloft.net> wrote:
> From: Bryton Lee <brytonlee01@gmail.com>
> Date: Mon,  9 Feb 2015 19:37:10 +0800
>
>> @@ -617,6 +617,7 @@ struct slabstat
>>  };
>>
>>  struct slabstat slabstat;
>> +int slabstat_valid = 0;
>>
>>  static const char *slabstat_ids[] =
>>  {
>
> Nothing sets this to a non-zero value.  If nothing is going to set it to
> a non-zero value, the code it guards should simple be removed instead.
>
when ss runs witch -s paramater slabstat will be used, and if kernel
not support NETLINK ss -t will use slabstat too.  so it's not nothing
sets this to a non-zero value.

> Otherwise, nothing uses this variable outside of this file, and if
> that's intentional it should be static.

Yes, these should be changed to static,  I will submit these change
soon.  thanks!



-- 
Best Regards

Bryton.Lee

      reply	other threads:[~2015-02-10  2:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 11:37 [PATCH] prevent the read ahead of /proc/slabinfo in ss Bryton Lee
2015-02-09 16:07 ` Eric Dumazet
2015-02-09 19:16 ` David Miller
2015-02-10  2:01   ` Bryton Lee [this message]

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='CAC2pzGf5=XCxLbjX41c8CXkoh2s26PHLHX+tGOJyqEUnwVAfOg@mail.gmail.com' \
    --to=brytonlee01@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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).