Skip to content

Commit 4e1b5a8

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/uaccess: add missing EX_TABLE entries to __clear_user()
For some exception types the instruction address points behind the instruction that caused the exception. Take that into account and add the missing exception table entries. Cc: <stable@vger.kernel.org> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent d6d9875 commit 4e1b5a8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/s390/lib/uaccess.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ unsigned long __clear_user(void __user *to, unsigned long size)
157157
asm volatile(
158158
" lr 0,%[spec]\n"
159159
"0: mvcos 0(%1),0(%4),%0\n"
160-
" jz 4f\n"
160+
"6: jz 4f\n"
161161
"1: algr %0,%2\n"
162162
" slgr %1,%2\n"
163163
" j 0b\n"
@@ -167,11 +167,11 @@ unsigned long __clear_user(void __user *to, unsigned long size)
167167
" clgr %0,%3\n" /* copy crosses next page boundary? */
168168
" jnh 5f\n"
169169
"3: mvcos 0(%1),0(%4),%3\n"
170-
" slgr %0,%3\n"
170+
"7: slgr %0,%3\n"
171171
" j 5f\n"
172172
"4: slgr %0,%0\n"
173173
"5:\n"
174-
EX_TABLE(0b,2b) EX_TABLE(3b,5b)
174+
EX_TABLE(0b,2b) EX_TABLE(6b,2b) EX_TABLE(3b,5b) EX_TABLE(7b,5b)
175175
: "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2)
176176
: "a" (empty_zero_page), [spec] "d" (spec.val)
177177
: "cc", "memory", "0");

0 commit comments

Comments
 (0)