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>
This commit is contained in:
Родитель
2ea659a9ef
Коммит
a7cc722fff
|
@ -703,7 +703,7 @@ extern struct movsl_mask {
|
||||||
#define unsafe_put_user(x, ptr, err_label) \
|
#define unsafe_put_user(x, ptr, err_label) \
|
||||||
do { \
|
do { \
|
||||||
int __pu_err; \
|
int __pu_err; \
|
||||||
__put_user_size((x), (ptr), sizeof(*(ptr)), __pu_err, -EFAULT); \
|
__put_user_size((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)), __pu_err, -EFAULT); \
|
||||||
if (unlikely(__pu_err)) goto err_label; \
|
if (unlikely(__pu_err)) goto err_label; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче