]> git.baikalelectronics.ru Git - kernel.git/commit
uaccess: fix nios2 and microblaze get_user_8()
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Feb 2022 14:37:37 +0000 (15:37 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 25 Feb 2022 08:36:00 +0000 (09:36 +0100)
commitd13ce8265c3ce123a62963042e0bb3ee9b551522
treefc414766f8e02eab031b3e5e18590fe36f9f0888
parent19477e71d7975d73edb611604e0e3d8ce57db77b
uaccess: fix nios2 and microblaze get_user_8()

These two architectures implement 8-byte get_user() through
a memcpy() into a four-byte variable, which won't fit.

Use a temporary 64-bit variable instead here, and use a double
cast the way that risc-v and openrisc do to avoid compile-time
warnings.

Fixes: a4b02ca8b8c3 ("arch/microblaze: support get_user() of size 8 bytes")
Fixes: 23e0afeb31a2 ("nios2: Memory management")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/microblaze/include/asm/uaccess.h
arch/nios2/include/asm/uaccess.h