diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c index 23f1fdfdfcf1..e0a9b0ce4f10 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/elf.h> | 58 | #include <linux/elf.h> |
59 | #include <linux/gfp.h> | 59 | #include <linux/gfp.h> |
60 | #include <linux/migrate.h> | 60 | #include <linux/migrate.h> |
61 | #include <linux/string.h> | ||
61 | 62 | ||
62 | #include <asm/io.h> | 63 | #include <asm/io.h> |
63 | #include <asm/pgalloc.h> | 64 | #include <asm/pgalloc.h> |
@@ -4118,15 +4119,12 @@ void print_vma_addr(char *prefix, unsigned long ip) | |||
4118 | struct file *f = vma->vm_file; | 4119 | struct file *f = vma->vm_file; |
4119 | char *buf = (char *)__get_free_page(GFP_KERNEL); | 4120 | char *buf = (char *)__get_free_page(GFP_KERNEL); |
4120 | if (buf) { | 4121 | if (buf) { |
4121 | char *p, *s; | 4122 | char *p; |
4122 | 4123 | ||
4123 | p = d_path(&f->f_path, buf, PAGE_SIZE); | 4124 | p = d_path(&f->f_path, buf, PAGE_SIZE); |
4124 | if (IS_ERR(p)) | 4125 | if (IS_ERR(p)) |
4125 | p = "?"; | 4126 | p = "?"; |
4126 | s = strrchr(p, '/'); | 4127 | printk("%s%s[%lx+%lx]", prefix, kbasename(p), |
4127 | if (s) | ||
4128 | p = s+1; | ||
4129 | printk("%s%s[%lx+%lx]", prefix, p, | ||
4130 | vma->vm_start, | 4128 | vma->vm_start, |
4131 | vma->vm_end - vma->vm_start); | 4129 | vma->vm_end - vma->vm_start); |
4132 | free_page((unsigned long)buf); | 4130 | free_page((unsigned long)buf); |