X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fs390%2Flib%2Fuaccess.S;h=5d59e26250481ec325b9740dccaefa0bf57765a3;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=e8029ef42ef2d3c13f679d50626c6aaf0608508b;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S index e8029ef42..5d59e2625 100644 --- a/arch/s390/lib/uaccess.S +++ b/arch/s390/lib/uaccess.S @@ -11,7 +11,7 @@ #include #include -#include +#include .text .align 4 @@ -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