diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
| commit | c40f6f8bbc4cbd2902671aacd587400ddca62627 (patch) | |
| tree | a991e5521e10943f4457fb7f494e00aec75cc7df /arch/blackfin/kernel | |
| parent | 1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5 (diff) | |
| parent | cb6ff208076b5f434db1b8c983429269d719cef5 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu:
NOMMU: Support XIP on initramfs
NOMMU: Teach kobjsize() about VMA regions.
FLAT: Don't attempt to expand the userspace stack to fill the space allocated
FDPIC: Don't attempt to expand the userspace stack to fill the space allocated
NOMMU: Improve procfs output using per-MM VMAs
NOMMU: Make mmap allocation page trimming behaviour configurable.
NOMMU: Make VMAs per MM as for MMU-mode linux
NOMMU: Delete askedalloc and realalloc variables
NOMMU: Rename ARM's struct vm_region
NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area()
Diffstat (limited to 'arch/blackfin/kernel')
| -rw-r--r-- | arch/blackfin/kernel/ptrace.c | 6 | ||||
| -rw-r--r-- | arch/blackfin/kernel/traps.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index d2d388536630..594e325b40e4 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
| @@ -160,15 +160,15 @@ put_reg(struct task_struct *task, int regno, unsigned long data) | |||
| 160 | static inline int is_user_addr_valid(struct task_struct *child, | 160 | static inline int is_user_addr_valid(struct task_struct *child, |
| 161 | unsigned long start, unsigned long len) | 161 | unsigned long start, unsigned long len) |
| 162 | { | 162 | { |
| 163 | struct vm_list_struct *vml; | 163 | struct vm_area_struct *vma; |
| 164 | struct sram_list_struct *sraml; | 164 | struct sram_list_struct *sraml; |
| 165 | 165 | ||
| 166 | /* overflow */ | 166 | /* overflow */ |
| 167 | if (start + len < start) | 167 | if (start + len < start) |
| 168 | return -EIO; | 168 | return -EIO; |
| 169 | 169 | ||
| 170 | for (vml = child->mm->context.vmlist; vml; vml = vml->next) | 170 | vma = find_vma(child->mm, start); |
| 171 | if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end) | 171 | if (vma && start >= vma->vm_start && start + len <= vma->vm_end) |
| 172 | return 0; | 172 | return 0; |
| 173 | 173 | ||
| 174 | for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next) | 174 | for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next) |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 17d8e4172896..5b0667da8d05 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
| 33 | #include <linux/kallsyms.h> | 33 | #include <linux/kallsyms.h> |
| 34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
| 35 | #include <linux/rbtree.h> | ||
| 35 | #include <asm/traps.h> | 36 | #include <asm/traps.h> |
| 36 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
| 37 | #include <asm/cplb.h> | 38 | #include <asm/cplb.h> |
| @@ -83,6 +84,7 @@ static void decode_address(char *buf, unsigned long address) | |||
| 83 | struct mm_struct *mm; | 84 | struct mm_struct *mm; |
| 84 | unsigned long flags, offset; | 85 | unsigned long flags, offset; |
| 85 | unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic(); | 86 | unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic(); |
| 87 | struct rb_node *n; | ||
| 86 | 88 | ||
| 87 | #ifdef CONFIG_KALLSYMS | 89 | #ifdef CONFIG_KALLSYMS |
| 88 | unsigned long symsize; | 90 | unsigned long symsize; |
| @@ -128,9 +130,10 @@ static void decode_address(char *buf, unsigned long address) | |||
| 128 | if (!mm) | 130 | if (!mm) |
| 129 | continue; | 131 | continue; |
| 130 | 132 | ||
| 131 | vml = mm->context.vmlist; | 133 | for (n = rb_first(&mm->mm_rb); n; n = rb_next(n)) { |
| 132 | while (vml) { | 134 | struct vm_area_struct *vma; |
| 133 | struct vm_area_struct *vma = vml->vma; | 135 | |
| 136 | vma = rb_entry(n, struct vm_area_struct, vm_rb); | ||
| 134 | 137 | ||
| 135 | if (address >= vma->vm_start && address < vma->vm_end) { | 138 | if (address >= vma->vm_start && address < vma->vm_end) { |
| 136 | char _tmpbuf[256]; | 139 | char _tmpbuf[256]; |
| @@ -176,8 +179,6 @@ static void decode_address(char *buf, unsigned long address) | |||
| 176 | 179 | ||
| 177 | goto done; | 180 | goto done; |
| 178 | } | 181 | } |
| 179 | |||
| 180 | vml = vml->next; | ||
| 181 | } | 182 | } |
| 182 | if (!in_atomic) | 183 | if (!in_atomic) |
| 183 | mmput(mm); | 184 | mmput(mm); |
