lkml.org 
[lkml]   [2016]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 098/118] s390: get_user() should zero on failure
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Al Viro <viro@zeniv.linux.org.uk>

    commit fd2d2b191fe75825c4c7a6f12f3fef35aaed7dd7 upstream.

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    arch/s390/include/asm/uaccess.h | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    --- a/arch/s390/include/asm/uaccess.h
    +++ b/arch/s390/include/asm/uaccess.h
    @@ -215,28 +215,28 @@ int __put_user_bad(void) __attribute__((
    __chk_user_ptr(ptr); \
    switch (sizeof(*(ptr))) { \
    case 1: { \
    - unsigned char __x; \
    + unsigned char __x = 0; \
    __gu_err = __get_user_fn(&__x, ptr, \
    sizeof(*(ptr))); \
    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
    break; \
    }; \
    case 2: { \
    - unsigned short __x; \
    + unsigned short __x = 0; \
    __gu_err = __get_user_fn(&__x, ptr, \
    sizeof(*(ptr))); \
    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
    break; \
    }; \
    case 4: { \
    - unsigned int __x; \
    + unsigned int __x = 0; \
    __gu_err = __get_user_fn(&__x, ptr, \
    sizeof(*(ptr))); \
    (x) = *(__force __typeof__(*(ptr)) *) &__x; \
    break; \
    }; \
    case 8: { \
    - unsigned long long __x; \
    + unsigned long long __x = 0; \
    __gu_err = __get_user_fn(&__x, ptr, \
    sizeof(*(ptr))); \
    (x) = *(__force __typeof__(*(ptr)) *) &__x; \

    \
     
     \ /
      Last update: 2016-09-23 00:04    [W:4.200 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site