diff options
-rw-r--r-- | mm/slab.c | 2 | ||||
-rw-r--r-- | mm/slub.c | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -4579,7 +4579,7 @@ static const struct file_operations proc_slabstats_operations = { | |||
4579 | 4579 | ||
4580 | static int __init slab_proc_init(void) | 4580 | static int __init slab_proc_init(void) |
4581 | { | 4581 | { |
4582 | proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations); | 4582 | proc_create("slabinfo",S_IWUSR|S_IRUSR,NULL,&proc_slabinfo_operations); |
4583 | #ifdef CONFIG_DEBUG_SLAB_LEAK | 4583 | #ifdef CONFIG_DEBUG_SLAB_LEAK |
4584 | proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations); | 4584 | proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations); |
4585 | #endif | 4585 | #endif |
@@ -4386,11 +4386,12 @@ struct slab_attribute { | |||
4386 | }; | 4386 | }; |
4387 | 4387 | ||
4388 | #define SLAB_ATTR_RO(_name) \ | 4388 | #define SLAB_ATTR_RO(_name) \ |
4389 | static struct slab_attribute _name##_attr = __ATTR_RO(_name) | 4389 | static struct slab_attribute _name##_attr = \ |
4390 | __ATTR(_name, 0400, _name##_show, NULL) | ||
4390 | 4391 | ||
4391 | #define SLAB_ATTR(_name) \ | 4392 | #define SLAB_ATTR(_name) \ |
4392 | static struct slab_attribute _name##_attr = \ | 4393 | static struct slab_attribute _name##_attr = \ |
4393 | __ATTR(_name, 0644, _name##_show, _name##_store) | 4394 | __ATTR(_name, 0600, _name##_show, _name##_store) |
4394 | 4395 | ||
4395 | static ssize_t slab_size_show(struct kmem_cache *s, char *buf) | 4396 | static ssize_t slab_size_show(struct kmem_cache *s, char *buf) |
4396 | { | 4397 | { |
@@ -5231,7 +5232,7 @@ static const struct file_operations proc_slabinfo_operations = { | |||
5231 | 5232 | ||
5232 | static int __init slab_proc_init(void) | 5233 | static int __init slab_proc_init(void) |
5233 | { | 5234 | { |
5234 | proc_create("slabinfo", S_IRUGO, NULL, &proc_slabinfo_operations); | 5235 | proc_create("slabinfo", S_IRUSR, NULL, &proc_slabinfo_operations); |
5235 | return 0; | 5236 | return 0; |
5236 | } | 5237 | } |
5237 | module_init(slab_proc_init); | 5238 | module_init(slab_proc_init); |