diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-02-03 18:54:15 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-03 18:54:15 -0800 |
| commit | 4df5d868efc9a1c3ff3597df384f6e37ee54e672 (patch) | |
| tree | 14783d95264ed989e86ba654d3dc25eff9b9c332 | |
| parent | f33ce2f45fd97dba2d687f7c405d3bdf1ac2075f (diff) | |
[PATCH] Fix ptrace in the vsyscall dso area
From: Roland McGrath <roland@redhat.com>
The #include is the part of this patch that matters, so the #ifdef below
works.
The rest of the patch removes gratuitous duplication due to some strange
aversion to concision in the presence of #ifdef, the kind that is all too
common, utterly pointless, and error prone.
| -rw-r--r-- | include/linux/mm.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3ecd3d633c5f..ffc1e13d0a55 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -12,6 +12,7 @@ #include <linux/mmzone.h> #include <linux/rbtree.h> #include <linux/fs.h> +#include <linux/elf.h> #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr; @@ -643,31 +644,24 @@ kernel_map_pages(struct page *page, int numpages, int enable) #endif #ifndef CONFIG_ARCH_GATE_AREA -#ifdef AT_SYSINFO_EHDR static inline int in_gate_area(struct task_struct *task, unsigned long addr) { +#ifdef AT_SYSINFO_EHDR if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END)) return 1; - else - return 0; +#endif + return 0; } extern struct vm_area_struct gate_vma; static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk) { +#ifdef AT_SYSINFO_EHDR return &gate_vma; -} #else -static inline int in_gate_area(struct task_struct *task, unsigned long addr) -{ return 0; -} - -static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk) -{ - return NULL; -} #endif +} #endif #endif /* __KERNEL__ */ |
