diff options
author | David Howells <dhowells@redhat.com> | 2006-01-06 03:11:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:33 -0500 |
commit | 7ee1dd3fee22f15728f545d266403fc977e1eb99 (patch) | |
tree | e2f9f42b0731d5006fa329a590069be6787af1de /kernel/futex.c | |
parent | 5c40f7f373889930d176a515ec375b60a70b5b49 (diff) |
[PATCH] FRV: Make futex code compilable on nommu [try #2]
Make the futex code compilable and usable on NOMMU by making the attempt to
handle page faults conditional on CONFIG_MMU. If this is not enabled, then
we can assume that EFAULT returned from futex_atomic_op_inuser() is not
recoverable, and that the address lies outside of valid memory.
handle_mm_fault() is made to BUG if called on NOMMU without attempting to
invoke the actual handler (__handle_mm_fault).
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 5e71a6bf6f6b..5efa2f978032 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -356,6 +356,13 @@ retry: | |||
356 | if (bh1 != bh2) | 356 | if (bh1 != bh2) |
357 | spin_unlock(&bh2->lock); | 357 | spin_unlock(&bh2->lock); |
358 | 358 | ||
359 | #ifndef CONFIG_MMU | ||
360 | /* we don't get EFAULT from MMU faults if we don't have an MMU, | ||
361 | * but we might get them from range checking */ | ||
362 | ret = op_ret; | ||
363 | goto out; | ||
364 | #endif | ||
365 | |||
359 | if (unlikely(op_ret != -EFAULT)) { | 366 | if (unlikely(op_ret != -EFAULT)) { |
360 | ret = op_ret; | 367 | ret = op_ret; |
361 | goto out; | 368 | goto out; |