Commit efab7739 authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Linus Torvalds

[PATCH] x86_64: fix new out of line put_user()

The labels after the last put_user patch were misplaced so
exceptions on the real mov instructions would not be handled.

Noted by Brian Gerst <bgerst@didntduck.org>
parent 21b7ef0c
...@@ -49,8 +49,8 @@ __put_user_2: ...@@ -49,8 +49,8 @@ __put_user_2:
jc 20f jc 20f
cmpq threadinfo_addr_limit(%r8),%rcx cmpq threadinfo_addr_limit(%r8),%rcx
jae 20f jae 20f
2: decq %rcx decq %rcx
movw %dx,(%rcx) 2: movw %dx,(%rcx)
xorl %eax,%eax xorl %eax,%eax
ret ret
20: decq %rcx 20: decq %rcx
...@@ -64,8 +64,8 @@ __put_user_4: ...@@ -64,8 +64,8 @@ __put_user_4:
jc 30f jc 30f
cmpq threadinfo_addr_limit(%r8),%rcx cmpq threadinfo_addr_limit(%r8),%rcx
jae 30f jae 30f
3: subq $3,%rcx subq $3,%rcx
movl %edx,(%rcx) 3: movl %edx,(%rcx)
xorl %eax,%eax xorl %eax,%eax
ret ret
30: subq $3,%rcx 30: subq $3,%rcx
...@@ -79,8 +79,8 @@ __put_user_8: ...@@ -79,8 +79,8 @@ __put_user_8:
jc 40f jc 40f
cmpq threadinfo_addr_limit(%r8),%rcx cmpq threadinfo_addr_limit(%r8),%rcx
jae 40f jae 40f
4: subq $7,%rcx subq $7,%rcx
movq %rdx,(%rcx) 4: movq %rdx,(%rcx)
xorl %eax,%eax xorl %eax,%eax
ret ret
40: subq $7,%rcx 40: subq $7,%rcx
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment