diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-21 22:00:54 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-09-29 11:14:30 +0200 |
commit | 1cdd2edb8f7ec2fa7f87154bfe5499021fac7bcb (patch) | |
tree | b6204b64ded8edd723205156fa4217a72055b6d3 | |
parent | 9931f8fe5e1b606ea031df159044b4be0983f078 (diff) | |
download | lwn-1cdd2edb8f7ec2fa7f87154bfe5499021fac7bcb.tar.gz lwn-1cdd2edb8f7ec2fa7f87154bfe5499021fac7bcb.zip |
s390: get_user() should zero on failure
commit fd2d2b191fe75825c4c7a6f12f3fef35aaed7dd7 upstream.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | arch/s390/include/asm/uaccess.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 9c33ed4e666f..b6017ace1515 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h @@ -164,28 +164,28 @@ extern int __put_user_bad(void) __attribute__((noreturn)); __chk_user_ptr(ptr); \ switch (sizeof(*(ptr))) { \ case 1: { \ - unsigned char __x; \ + unsigned char __x = 0; \ __gu_err = __get_user_fn(sizeof (*(ptr)), \ ptr, &__x); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \ break; \ }; \ case 2: { \ - unsigned short __x; \ + unsigned short __x = 0; \ __gu_err = __get_user_fn(sizeof (*(ptr)), \ ptr, &__x); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \ break; \ }; \ case 4: { \ - unsigned int __x; \ + unsigned int __x = 0; \ __gu_err = __get_user_fn(sizeof (*(ptr)), \ ptr, &__x); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \ break; \ }; \ case 8: { \ - unsigned long long __x; \ + unsigned long long __x = 0; \ __gu_err = __get_user_fn(sizeof (*(ptr)), \ ptr, &__x); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |