diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1994-12-01 08:00:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1994-12-01 08:00:00 +0000 |
commit | 90ecc248e200fee448001248dde0ca540dd3ef64 (patch) | |
tree | a3fe89494ce63b4835f0f9cf5c45e74cde88252b /fs/namei.c | |
parent | 1513ff9b7899ab588401c89db0e99903dbf5f886 (diff) |
Import of Linux/MIPS 1.1.68
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index f5f8b5c14..e383dff93 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -37,13 +37,27 @@ static inline int get_max_filename(unsigned long address) if (vma->vm_end > address) break; } +#if defined (__i386__) if (vma->vm_start > address || !(vma->vm_page_prot & PAGE_USER)) +#elif defined (__mips__) + if (vma->vm_start > address || + vma->vm_start >= 0x80000000 || vma->vm_end >= 0x80000000) +#else +#error "Architecture not supported." +#endif return -EFAULT; + address = vma->vm_end - address; if (address > PAGE_SIZE) return 0; if (vma->vm_next && vma->vm_next->vm_start == vma->vm_end && +#if defined (__i386__) (vma->vm_next->vm_page_prot & PAGE_USER)) +#elif defined (__mips__) + (vma->vm_start >= 0x80000000 || vma->vm_end >= 0x80000000)) +#else +#error "Architecture not supported." +#endif return 0; return address; } |