Skip to content

Commit

Permalink
Use WARN() in mm/vmalloc.c
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
fenrus75 authored and torvalds committed Jul 26, 2008
1 parent b8c512f commit 4c8573e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,14 @@ static void __vunmap(const void *addr, int deallocate_pages)
return;

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

area = remove_vm_area(addr);
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);
WARN_ON(1);
return;
}

Expand Down

0 comments on commit 4c8573e

Please sign in to comment.