summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/uaccess.S
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 21:18:01 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 21:18:01 +0100
commitf33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d (patch)
treeb027b5f3429d416b3da5b9195024007dab062a5e /arch/s390/lib/uaccess.S
parent[SCSI] drivers/base/bus.c - export reprobe (diff)
parent[PATCH] Plug kdump shutdown race window (diff)
downloadlinux-f33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d.tar.xz
linux-f33b5d783b4f56be5ace6a1c98fb5f76b2d2d07d.zip
Merge ../linux-2.6
Diffstat (limited to 'arch/s390/lib/uaccess.S')
-rw-r--r--arch/s390/lib/uaccess.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S
index 88fc94fe6488..5d59e2625048 100644
--- a/arch/s390/lib/uaccess.S
+++ b/arch/s390/lib/uaccess.S
@@ -198,12 +198,12 @@ __strnlen_user_asm:
0: srst %r2,%r1
jo 0b
sacf 0
- jh 1f # \0 found in string ?
ahi %r2,1 # strnlen_user result includes the \0
-1: slr %r2,%r3
+ # or return count+1 if \0 not found
+ slr %r2,%r3
br %r14
2: sacf 0
- lhi %r2,-EFAULT
+ slr %r2,%r2 # return 0 on exception
br %r14
.section __ex_table,"a"
.long 0b,2b