Use WARN() in mm/vmalloc.c
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>hifive-unleashed-5.1
parent
b8c512f619
commit
4c8573e25f
|
@ -381,16 +381,14 @@ static void __vunmap(const void *addr, int deallocate_pages)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((PAGE_SIZE-1) & (unsigned long)addr) {
|
if ((PAGE_SIZE-1) & (unsigned long)addr) {
|
||||||
printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
|
WARN(1, KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
|
||||||
WARN_ON(1);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
area = remove_vm_area(addr);
|
area = remove_vm_area(addr);
|
||||||
if (unlikely(!area)) {
|
if (unlikely(!area)) {
|
||||||
printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
|
WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
|
||||||
addr);
|
addr);
|
||||||
WARN_ON(1);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue