fix unsafe_put_user()

__put_user_size() relies upon its first argument having the same type as what
the second one points to; the only other user makes sure of that and
unsafe_put_user() should do the same.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro a7cc722f 2ea659a9

Changed files
+1 -1
arch
x86
include
asm
+1 -1
arch/x86/include/asm/uaccess.h
··· 703 703 #define unsafe_put_user(x, ptr, err_label) \ 704 704 do { \ 705 705 int __pu_err; \ 706 - __put_user_size((x), (ptr), sizeof(*(ptr)), __pu_err, -EFAULT); \ 706 + __put_user_size((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)), __pu_err, -EFAULT); \ 707 707 if (unlikely(__pu_err)) goto err_label; \ 708 708 } while (0) 709 709