Skip to content

Commit

Permalink
Merge "ARM: Improve vmalloc address checking in show_data()"
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux Build Service Account authored and Gerrit - the friendly Code Review server committed Apr 24, 2014
2 parents 22c0374 + 058c968 commit 363fb52
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,10 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
u32 *p;

/*
* don't attempt to dump non-kernel addresses, values that are probably
* just small negative numbers, or vmalloc addresses that may point to
* memory-mapped peripherals
* don't attempt to dump non-kernel addresses or
* values that are probably just small negative numbers
*/
if (addr < PAGE_OFFSET || addr > -256UL ||
is_vmalloc_addr((void *)addr))
if (addr < PAGE_OFFSET || addr > -256UL)
return;

printk("\n%s: %#lx:\n", name, addr);
Expand All @@ -348,7 +346,12 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
printk("%04lx ", (unsigned long)p & 0xffff);
for (j = 0; j < 8; j++) {
u32 data;
if (probe_kernel_address(p, data)) {
/*
* vmalloc addresses may point to
* memory-mapped peripherals
*/
if (is_vmalloc_addr(p) ||
probe_kernel_address(p, data)) {
printk(" ********");
} else {
printk(" %08x", data);
Expand Down

0 comments on commit 363fb52

Please sign in to comment.