Skip to content

Commit 4c8573e

Browse files
fenrus75torvalds
authored andcommitted
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>
1 parent b8c512f commit 4c8573e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎mm/vmalloc.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,16 +381,14 @@ static void __vunmap(const void *addr, int deallocate_pages)
381381
return;
382382

383383
if ((PAGE_SIZE-1) & (unsigned long)addr) {
384-
printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
385-
WARN_ON(1);
384+
WARN(1, KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
386385
return;
387386
}
388387

389388
area = remove_vm_area(addr);
390389
if (unlikely(!area)) {
391-
printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
390+
WARN(1, KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n",
392391
addr);
393-
WARN_ON(1);
394392
return;
395393
}
396394

0 commit comments

Comments
 (0)