Correctly return EFAULT in copyin & copyout on a fault. This fixes NFS
when running FreeBSD on QEMU emulating a Gumstix board. While here remove the use of a magic number in the not-XScale version. Pointed out by: kib Reviewed by: stas
This commit is contained in:
parent
bfba812656
commit
c75943da26
@ -39,6 +39,7 @@
|
||||
#include "assym.s"
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
.L_arm_memcpy:
|
||||
.word _C_LABEL(_arm_memcpy)
|
||||
@ -310,7 +311,7 @@ ENTRY(copyin)
|
||||
RET
|
||||
|
||||
.Lcopyfault:
|
||||
mov r0, #14 /* EFAULT */
|
||||
ldr r0, =EFAULT
|
||||
str r5, [r4, #PCB_ONFAULT]
|
||||
RESTORE_REGS
|
||||
|
||||
|
@ -108,6 +108,7 @@ ENTRY(copyin)
|
||||
ldmfd sp!, {r10-r11, pc}
|
||||
|
||||
.Lcopyin_fault:
|
||||
ldr r0, =EFAULT
|
||||
str r11, [r10, #PCB_ONFAULT]
|
||||
cmp r3, #0x00
|
||||
ldmgtfd sp!, {r4-r7} /* r3 > 0 Restore r4-r7 */
|
||||
@ -559,6 +560,7 @@ ENTRY(copyout)
|
||||
ldmfd sp!, {r10-r11, pc}
|
||||
|
||||
.Lcopyout_fault:
|
||||
ldr r0, =EFAULT
|
||||
str r11, [r10, #PCB_ONFAULT]
|
||||
cmp r3, #0x00
|
||||
ldmgtfd sp!, {r4-r7} /* r3 > 0 Restore r4-r7 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user