mm: Convert print_symbol to %pSR
authorJoe Perches <joe@perches.com>
Wed, 12 Dec 2012 18:19:12 +0000 (10:19 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 29 Apr 2013 13:24:33 +0000 (15:24 +0200)
Use the new vsprintf extension to avoid any possible
message interleaving.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
mm/memory.c
mm/slab.c

index 494526ae024a3173fc200d47e36087f6252852c2..a64c2114616c99e1e7187326f2e8eb808748810f 100644 (file)
@@ -714,11 +714,11 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
         * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
         */
        if (vma->vm_ops)
-               print_symbol(KERN_ALERT "vma->vm_ops->fault: %s\n",
-                               (unsigned long)vma->vm_ops->fault);
+               printk(KERN_ALERT "vma->vm_ops->fault: %pSR\n",
+                      vma->vm_ops->fault);
        if (vma->vm_file && vma->vm_file->f_op)
-               print_symbol(KERN_ALERT "vma->vm_file->f_op->mmap: %s\n",
-                               (unsigned long)vma->vm_file->f_op->mmap);
+               printk(KERN_ALERT "vma->vm_file->f_op->mmap: %pSR\n",
+                      vma->vm_file->f_op->mmap);
        dump_stack();
        add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
 }
index 856e4a192d25c73954771b1b0893458f0d9209bb..96079244c8609c7ebe229879ad5e75d6a572f5b2 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2040,11 +2040,9 @@ static void print_objinfo(struct kmem_cache *cachep, void *objp, int lines)
        }
 
        if (cachep->flags & SLAB_STORE_USER) {
-               printk(KERN_ERR "Last user: [<%p>]",
-                       *dbg_userword(cachep, objp));
-               print_symbol("(%s)",
-                               (unsigned long)*dbg_userword(cachep, objp));
-               printk("\n");
+               printk(KERN_ERR "Last user: [<%p>](%pSR)\n",
+                      *dbg_userword(cachep, objp),
+                      *dbg_userword(cachep, objp));
        }
        realobj = (char *)objp + obj_offset(cachep);
        size = cachep->object_size;