linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
	Glauber Costa <glommer@parallels.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <js1304@gmail.com>,
	David Rientjes <rientjes@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] mm/slab: Fix /proc/slabinfo unwriteable for slab
Date: Mon, 1 Jul 2013 15:49:54 +0000	[thread overview]
Message-ID: <0000013f9aed0ce5-ff542635-3074-4f9b-842e-d04492ed3e90-000000@email.amazonses.com> (raw)
In-Reply-To: <1372069394-26167-3-git-send-email-liwanp@linux.vnet.ibm.com>

On Mon, 24 Jun 2013, Wanpeng Li wrote:

>  1 file changed, 10 insertions(+)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index d161b81..7fdde79 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -631,10 +631,20 @@ static const struct file_operations proc_slabinfo_operations = {
>  	.release	= seq_release,
>  };
>
> +#ifdef CONFIG_SLAB
> +static int __init slab_proc_init(void)
> +{
> +	proc_create("slabinfo", S_IWUSR | S_IRUSR, NULL, &proc_slabinfo_operations);
> +	return 0;
> +}
> +#endif
> +#ifdef CONFIG_SLUB
>  static int __init slab_proc_init(void)
>  {
>  	proc_create("slabinfo", S_IRUSR, NULL, &proc_slabinfo_operations);
>  	return 0;
>  }

It may be easier to define a macro SLABINFO_RIGHTS and use #ifdefs to
assign the correct one. That way we have only one slab_proc_init().

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-07-01 15:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 10:23 [PATCH 1/3] mm/slab: Fix drain freelist excessively Wanpeng Li
2013-06-24 10:23 ` [PATCH 2/3] mm/slab: Sharing s_next and s_stop between slab and slub Wanpeng Li
2013-06-24 21:23   ` David Rientjes
2013-06-27  0:21     ` Wanpeng Li
2013-06-27  0:21     ` Wanpeng Li
2013-07-01 15:48     ` Christoph Lameter
2013-07-01 23:49       ` Wanpeng Li
2013-07-01 23:49       ` Wanpeng Li
2013-07-07 16:41       ` Pekka Enberg
2013-07-08  0:16         ` Wanpeng Li
2013-07-08  8:03           ` Pekka Enberg
2013-07-08  0:16         ` Wanpeng Li
2013-06-24 10:23 ` [PATCH 3/3] mm/slab: Fix /proc/slabinfo unwriteable for slab Wanpeng Li
2013-07-01 15:49   ` Christoph Lameter [this message]
2013-07-01 23:43     ` Wanpeng Li
2013-07-01 23:43     ` Wanpeng Li
2013-07-01 15:46 ` [PATCH 1/3] mm/slab: Fix drain freelist excessively Christoph Lameter
2013-07-01 23:45   ` Wanpeng Li
2013-07-01 23:45   ` Wanpeng Li

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=0000013f9aed0ce5-ff542635-3074-4f9b-842e-d04492ed3e90-000000@email.amazonses.com \
    --to=cl@linux.com \
    --cc=akpm@linux-foundation.org \
    --cc=glommer@parallels.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liwanp@linux.vnet.ibm.com \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /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