s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
authorEugene Syromiatnikov <esyr@redhat.com>
Mon, 15 Jan 2018 19:38:17 +0000 (20:38 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 23 Jan 2018 06:36:54 +0000 (07:36 +0100)
commit6dd0d2d22aa363fec075cb2577ba273ac8462e94
tree0fd63b313c0874957d24686d230af62aa20ca8a3
parent7fbf8315fb7fc7321919e6c880d70077aded515e
s390: fix handling of -1 in set{,fs}[gu]id16 syscalls

For some reason, the implementation of some 16-bit ID system calls
(namely, setuid16/setgid16 and setfsuid16/setfsgid16) used type cast
instead of low2highgid/low2highuid macros for converting [GU]IDs, which
led to incorrect handling of value of -1 (which ought to be considered
invalid).

Discovered by strace test suite.

Cc: stable@vger.kernel.org
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/compat_linux.c