aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2016-03-17 17:19:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 18:09:34 -0400
commit756a025f00091918d9d09ca3229defb160b409c0 (patch)
treed4a6914597ef4b10870a7983bb61cd595e7094a2 /mm/slab.c
parent598d80914e84fa79580850530f5d4a50a99bf4f5 (diff)
mm: coalesce split strings
Kernel style prefers a single string over split strings when the string is 'user-visible'. Miscellanea: - Add a missing newline - Realign arguments Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Tejun Heo <tj@kernel.org> [percpu] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/mm/slab.c b/mm/slab.c
index e1f6c27c3db5..e558f8593a22 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1566,11 +1566,9 @@ static void dump_line(char *data, int offset, int limit)
1566 if (bad_count == 1) { 1566 if (bad_count == 1) {
1567 error ^= POISON_FREE; 1567 error ^= POISON_FREE;
1568 if (!(error & (error - 1))) { 1568 if (!(error & (error - 1))) {
1569 printk(KERN_ERR "Single bit error detected. Probably " 1569 printk(KERN_ERR "Single bit error detected. Probably bad RAM.\n");
1570 "bad RAM.\n");
1571#ifdef CONFIG_X86 1570#ifdef CONFIG_X86
1572 printk(KERN_ERR "Run memtest86+ or a similar memory " 1571 printk(KERN_ERR "Run memtest86+ or a similar memory test tool.\n");
1573 "test tool.\n");
1574#else 1572#else
1575 printk(KERN_ERR "Run a memory test tool.\n"); 1573 printk(KERN_ERR "Run a memory test tool.\n");
1576#endif 1574#endif
@@ -1693,11 +1691,9 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
1693 } 1691 }
1694 if (cachep->flags & SLAB_RED_ZONE) { 1692 if (cachep->flags & SLAB_RED_ZONE) {
1695 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE) 1693 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE)
1696 slab_error(cachep, "start of a freed object " 1694 slab_error(cachep, "start of a freed object was overwritten");
1697 "was overwritten");
1698 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE) 1695 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE)
1699 slab_error(cachep, "end of a freed object " 1696 slab_error(cachep, "end of a freed object was overwritten");
1700 "was overwritten");
1701 } 1697 }
1702 } 1698 }
1703} 1699}
@@ -2398,11 +2394,9 @@ static void cache_init_objs_debug(struct kmem_cache *cachep, struct page *page)
2398 2394
2399 if (cachep->flags & SLAB_RED_ZONE) { 2395 if (cachep->flags & SLAB_RED_ZONE) {
2400 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE) 2396 if (*dbg_redzone2(cachep, objp) != RED_INACTIVE)
2401 slab_error(cachep, "constructor overwrote the" 2397 slab_error(cachep, "constructor overwrote the end of an object");
2402 " end of an object");
2403 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE) 2398 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE)
2404 slab_error(cachep, "constructor overwrote the" 2399 slab_error(cachep, "constructor overwrote the start of an object");
2405 " start of an object");
2406 } 2400 }
2407 /* need to poison the objs? */ 2401 /* need to poison the objs? */
2408 if (cachep->flags & SLAB_POISON) { 2402 if (cachep->flags & SLAB_POISON) {
@@ -2469,8 +2463,8 @@ static void slab_put_obj(struct kmem_cache *cachep,
2469 /* Verify double free bug */ 2463 /* Verify double free bug */
2470 for (i = page->active; i < cachep->num; i++) { 2464 for (i = page->active; i < cachep->num; i++) {
2471 if (get_free_obj(page, i) == objnr) { 2465 if (get_free_obj(page, i) == objnr) {
2472 printk(KERN_ERR "slab: double free detected in cache " 2466 printk(KERN_ERR "slab: double free detected in cache '%s', objp %p\n",
2473 "'%s', objp %p\n", cachep->name, objp); 2467 cachep->name, objp);
2474 BUG(); 2468 BUG();
2475 } 2469 }
2476 } 2470 }
@@ -2901,8 +2895,7 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
2901 if (cachep->flags & SLAB_RED_ZONE) { 2895 if (cachep->flags & SLAB_RED_ZONE) {
2902 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE || 2896 if (*dbg_redzone1(cachep, objp) != RED_INACTIVE ||
2903 *dbg_redzone2(cachep, objp) != RED_INACTIVE) { 2897 *dbg_redzone2(cachep, objp) != RED_INACTIVE) {
2904 slab_error(cachep, "double free, or memory outside" 2898 slab_error(cachep, "double free, or memory outside object was overwritten");
2905 " object was overwritten");
2906 printk(KERN_ERR 2899 printk(KERN_ERR
2907 "%p: redzone 1:0x%llx, redzone 2:0x%llx\n", 2900 "%p: redzone 1:0x%llx, redzone 2:0x%llx\n",
2908 objp, *dbg_redzone1(cachep, objp), 2901 objp, *dbg_redzone1(cachep, objp),
@@ -4028,8 +4021,7 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
4028 unsigned long node_frees = cachep->node_frees; 4021 unsigned long node_frees = cachep->node_frees;
4029 unsigned long overflows = cachep->node_overflow; 4022 unsigned long overflows = cachep->node_overflow;
4030 4023
4031 seq_printf(m, " : globalstat %7lu %6lu %5lu %4lu " 4024 seq_printf(m, " : globalstat %7lu %6lu %5lu %4lu %4lu %4lu %4lu %4lu %4lu",
4032 "%4lu %4lu %4lu %4lu %4lu",
4033 allocs, high, grown, 4025 allocs, high, grown,
4034 reaped, errors, max_freeable, node_allocs, 4026 reaped, errors, max_freeable, node_allocs,
4035 node_frees, overflows); 4027 node_frees, overflows);