mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
[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>
This commit is contained in:
parent
5c40f7f373
commit
7ee1dd3fee
2 changed files with 26 additions and 3 deletions
|
@ -356,6 +356,13 @@ retry:
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue