提交 fdd33961 编写于 作者: A Al Viro 提交者: Linus Torvalds

amd64: fix get_user() on bitwise

We really need force-cast when converting to final result type;
unsigned long can be silently converted to integer types and
to pointers, but not to bitwise.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c47ffe3d
......@@ -100,7 +100,7 @@ struct exception_table_entry
case 8: __get_user_x(8,__ret_gu,__val_gu,ptr); break; \
default: __get_user_bad(); break; \
} \
(x) = (typeof(*(ptr)))__val_gu; \
(x) = (__force typeof(*(ptr)))__val_gu; \
__ret_gu; \
})
......@@ -192,7 +192,7 @@ struct __large_struct { unsigned long buf[100]; };
int __gu_err; \
unsigned long __gu_val; \
__get_user_size(__gu_val,(ptr),(size),__gu_err); \
(x) = (typeof(*(ptr)))__gu_val; \
(x) = (__force typeof(*(ptr)))__gu_val; \
__gu_err; \
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册