diff options
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/locore.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/x86_64/locore.S b/x86_64/locore.S index 612fc493..bbb63252 100644 --- a/x86_64/locore.S +++ b/x86_64/locore.S @@ -1318,6 +1318,7 @@ copyin_fail: */ ENTRY(copyinmsg) xchgq %rsi,%rdi /* Get user source and kernel destination */ + movl %edx,MSGH_MSGH_SIZE(%rdi) /* set msgh_size already */ /* 32 on 64 conversion */ subq $32,%rdx @@ -1330,8 +1331,9 @@ ENTRY(copyinmsg) /* Copy msgh_size */ RECOVER(copyin_fail) lodsl - addl $8,%eax - stosl + /* But don't actually store it: we have already set it above to what we + really copy */ + addl $4,%rdi xorq %rax,%rax /* Copy msgh_remote_port */ |