Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16361
b: refs/heads/master
c: 7ee1dd3
h: refs/heads/master
i:
  16359: c587df0
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Jan 6, 2006
1 parent 4342195 commit 81b007a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c40f7f373889930d176a515ec375b60a70b5b49
refs/heads/master: 7ee1dd3fee22f15728f545d266403fc977e1eb99
22 changes: 19 additions & 3 deletions trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,28 @@ extern int vmtruncate(struct inode * inode, loff_t offset);
extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access);

static inline int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access)
#ifdef CONFIG_MMU
extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
unsigned long address, int write_access);

static inline int handle_mm_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
int write_access)
{
return __handle_mm_fault(mm, vma, address, write_access) & (~VM_FAULT_WRITE);
return __handle_mm_fault(mm, vma, address, write_access) &
(~VM_FAULT_WRITE);
}
#else
static inline int handle_mm_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
int write_access)
{
/* should never happen if there's no MMU */
BUG();
return VM_FAULT_SIGBUS;
}
#endif

extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
Expand Down
7 changes: 7 additions & 0 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ static int futex_wake_op(unsigned long uaddr1, unsigned long uaddr2, int nr_wake
if (bh1 != bh2)
spin_unlock(&bh2->lock);

#ifndef CONFIG_MMU
/* we don't get EFAULT from MMU faults if we don't have an MMU,
* but we might get them from range checking */
ret = op_ret;
goto out;
#endif

if (unlikely(op_ret != -EFAULT)) {
ret = op_ret;
goto out;
Expand Down

0 comments on commit 81b007a

Please sign in to comment.