]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:22 +0000 (10:28 -0500)
commited1f7ee64bf3d8a9a77e792437a8152b3d1e001e
tree82761dc55bdcc1a9afdec9fb9f538e938c8aab4a
parent79db9d04cdb1d19195455fd2218038aeb112bfff
s390: fix handling of -1 in set{,fs}[gu]id16 syscalls

[ Upstream commit 6dd0d2d22aa363fec075cb2577ba273ac8462e94 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
arch/s390/kernel/compat_linux.c