[S390] compat: fix truncate system call wrapper
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 6 Oct 2009 08:34:06 +0000 (10:34 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Tue, 6 Oct 2009 08:35:08 +0000 (10:35 +0200)
The system call takes a signed length parameter. So perform sign
extension instead of zero extension.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/compat_wrapper.S

index 682fb69..cbd9901 100644 (file)
@@ -409,7 +409,7 @@ sys32_munmap_wrapper:
        .globl  sys32_truncate_wrapper
 sys32_truncate_wrapper:
        llgtr   %r2,%r2                 # const char *
-       llgfr   %r3,%r3                 # unsigned long
+       lgfr    %r3,%r3                 # long
        jg      sys_truncate            # branch to system call
 
        .globl  sys32_ftruncate_wrapper