]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arc: kernel: Return -EFAULT if copy_to_user() fails
authorWang Qing <wangqing@vivo.com>
Mon, 1 Mar 2021 12:05:48 +0000 (20:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:13:19 +0000 (13:13 +0200)
commit36eb5f72868cdc7974dd4968fbafbb68bef1e760
treed57900a78b88efca7143959783bec63d4f713d7c
parent7ed40be99f453f80de2cf744190efef70a858a52
arc: kernel: Return -EFAULT if copy_to_user() fails

[ Upstream commit 46e152186cd89d940b26726fff11eb3f4935b45a ]

The copy_to_user() function returns the number of bytes remaining to be
copied, but we want to return -EFAULT if the copy doesn't complete.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arc/kernel/signal.c