mm: Convert print_symbol to %pSR

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>
This commit is contained in:
Joe Perches 2012-12-12 10:19:12 -08:00 коммит произвёл Jiri Kosina
Родитель 7af584d3b0
Коммит 071361d347
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -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 * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
*/ */
if (vma->vm_ops) if (vma->vm_ops)
print_symbol(KERN_ALERT "vma->vm_ops->fault: %s\n", printk(KERN_ALERT "vma->vm_ops->fault: %pSR\n",
(unsigned long)vma->vm_ops->fault); vma->vm_ops->fault);
if (vma->vm_file && vma->vm_file->f_op) if (vma->vm_file && vma->vm_file->f_op)
print_symbol(KERN_ALERT "vma->vm_file->f_op->mmap: %s\n", printk(KERN_ALERT "vma->vm_file->f_op->mmap: %pSR\n",
(unsigned long)vma->vm_file->f_op->mmap); vma->vm_file->f_op->mmap);
dump_stack(); dump_stack();
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
} }

Просмотреть файл

@ -2040,11 +2040,9 @@ static void print_objinfo(struct kmem_cache *cachep, void *objp, int lines)
} }
if (cachep->flags & SLAB_STORE_USER) { if (cachep->flags & SLAB_STORE_USER) {
printk(KERN_ERR "Last user: [<%p>]", printk(KERN_ERR "Last user: [<%p>](%pSR)\n",
*dbg_userword(cachep, objp)); *dbg_userword(cachep, objp),
print_symbol("(%s)", *dbg_userword(cachep, objp));
(unsigned long)*dbg_userword(cachep, objp));
printk("\n");
} }
realobj = (char *)objp + obj_offset(cachep); realobj = (char *)objp + obj_offset(cachep);
size = cachep->object_size; size = cachep->object_size;